Fixed context handler

This commit is contained in:
Profitroll 2023-10-15 17:56:20 +02:00
parent 6bd1234d3d
commit c4d31c955f
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -256,7 +256,9 @@ async def cmd_remove(app: PyroClient, msg: Message):
await msg.reply_text(app._("remove_request", "message", locale=user.locale))
answer_id = await listen_message(app, msg.chat.id, timeout=600)
answer_id = await app.listen.Message(
filters.text & ~filters.me, id=filters.user(msg.from_user.id), timeout=600
)
USERS_WITH_CONTEXT.remove(msg.from_user.id)
@ -287,7 +289,9 @@ async def cmd_remove(app: PyroClient, msg: Message):
USERS_WITH_CONTEXT.append(msg.from_user.id)
answer_kind = await listen_message(app, msg.chat.id, timeout=600)
answer_kind = await app.listen.Message(
filters.text & ~filters.me, id=filters.user(msg.from_user.id), timeout=600
)
USERS_WITH_CONTEXT.remove(msg.from_user.id)