User bans, emoji and other bug fixes, age limiter, etc #26
@ -101,6 +101,7 @@
|
||||
"nearby_result": "Результати пошуку:\n\n{0}",
|
||||
"nearby_empty": "Здається, нікого поблизу немає.",
|
||||
"cancel": "Всі поточні операції скасовано.",
|
||||
"cancel_reapply": "Всі поточні операції скасовано.\nЩоб знову заповнити анкету користуйся /reapply",
|
||||
"identify_invalid_syntax": "Неправильний синтаксис!\nТреба: `/identify ID/NAME/USERNAME`",
|
||||
"identify_not_found": "Не знайдено користувачів за запитом **{0}**",
|
||||
"identify_success": "Користувач `{0}`\n\nІм'я: {1}\nЮзернейм: {2}\nЄ в чаті: {3}\nЄ адміном: {4}\nРоль: {5}\nНаявна анкета: {6}\nНаявне спонсорство: {7}",
|
||||
|
@ -3,7 +3,7 @@ from pyrogram import filters
|
||||
from pyrogram.types import Message, ReplyKeyboardRemove
|
||||
from pyrogram.client import Client
|
||||
from modules.utils import should_quote, logWrite, locale
|
||||
from modules.database import col_tmp, col_spoilers
|
||||
from modules.database import col_tmp, col_spoilers, col_applications
|
||||
from modules import custom_filters
|
||||
|
||||
# Cancel command ===============================================================================================================
|
||||
@ -11,6 +11,9 @@ from modules import custom_filters
|
||||
async def command_cancel(app: Client, msg: Message):
|
||||
col_tmp.delete_many( {"user": msg.from_user.id, "sent": False} )
|
||||
col_spoilers.delete_many( {"user": msg.from_user.id, "completed": False} )
|
||||
if col_applications.find_one( {"user": msg.from_user.id} ) is None:
|
||||
await msg.reply_text(locale("cancel_reapply", "message", locale=msg.from_user), quote=should_quote(msg), reply_markup=ReplyKeyboardRemove())
|
||||
else:
|
||||
await msg.reply_text(locale("cancel", "message", locale=msg.from_user), quote=should_quote(msg), reply_markup=ReplyKeyboardRemove())
|
||||
logWrite(f"Cancelling all ongoing tmp operations for {msg.from_user.id}")
|
||||
# ==============================================================================================================================
|
Reference in New Issue
Block a user