Slightly improved context

This commit is contained in:
Profitroll 2023-04-08 01:17:49 +02:00
parent 0bffe9cf97
commit aa8e77811d

View File

@ -63,8 +63,12 @@ async def cmd_message(app: Client, msg: Message):
await msg.reply_text(
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":
message = await listen_message(app, msg.chat.id)
if (
message is None
or message.text is not None
and message.text == "/cancel"
):
return
sent = await app.forward_messages(
configGet("admin", "groups"), msg.chat.id, message.id