Data export, warnings' improvements, bug fixes #35

Merged
profitroll merged 30 commits from dev into master 2023-04-02 23:27:31 +03:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 43e71c95c4 - Show all commits

View File

@ -16,6 +16,10 @@ 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})
try:
await app.listen.Cancel(filters.user(msg.from_user.id))
except:
pass
if col_applications.find_one({"user": msg.from_user.id}) is None:
await msg.reply_text(
locale("cancel_reapply", "message", locale=msg.from_user),

View File

@ -64,6 +64,8 @@ async def cmd_message(app: Client, msg: Message):
locale("message_enter", "message", locale=msg.from_user)
)
message = await listen_message(app, msg.chat.id, timeout=None)
if message.text is not None and message.text == "/cancel":
return
sent = await app.forward_messages(
configGet("admin", "groups"), msg.chat.id, message.id
)