1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Let's try deleting before sending messages

This commit is contained in:
Steffo 2020-06-11 18:47:25 +02:00
parent b1a2900b62
commit 7221f5f730
Signed by: steffo
GPG key ID: 896A80F55F7C97F0

View file

@ -331,6 +331,10 @@ class MatchmakingCommand(rc.Command):
bot.unregister_keyboard_key(f"mm{mmevent.mmid}_DELETE") bot.unregister_keyboard_key(f"mm{mmevent.mmid}_DELETE")
bot.unregister_keyboard_key(f"mm{mmevent.mmid}_START") bot.unregister_keyboard_key(f"mm{mmevent.mmid}_START")
await self.interface.serf.api_call(client.delete_message,
chat_id=mmevent.interface_data.chat_id,
message_id=mmevent.interface_data.message_id)
if interrupt == Interrupts.TIME_RAN_OUT or interrupt == Interrupts.MANUAL_START: if interrupt == Interrupts.TIME_RAN_OUT or interrupt == Interrupts.MANUAL_START:
await asyncify(client.send_message, await asyncify(client.send_message,
chat_id=self.config["Telegram"]["main_group_id"], chat_id=self.config["Telegram"]["main_group_id"],
@ -364,11 +368,6 @@ class MatchmakingCommand(rc.Command):
parse_mode="HTML", parse_mode="HTML",
disable_webpage_preview=True disable_webpage_preview=True
) )
await self.interface.serf.api_call(client.delete_message,
chat_id=mmevent.interface_data.chat_id,
message_id=mmevent.interface_data.message_id)
else: else:
raise rc.UnsupportedError() raise rc.UnsupportedError()
# The end! # The end!