mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Fix ROYALNET-AE (Matchmaking timed out)
This commit is contained in:
parent
c9d614421e
commit
8a0d577a3d
1 changed files with 12 additions and 8 deletions
|
@ -475,14 +475,18 @@ def on_callback_query(bot: telegram.Bot, update: telegram.Update):
|
||||||
inline_keyboard = IKMarkup([([IKButton(strings.MATCHMAKING.BUTTONS[key], callback_data=key)]) for key in strings.MATCHMAKING.BUTTONS])
|
inline_keyboard = IKMarkup([([IKButton(strings.MATCHMAKING.BUTTONS[key], callback_data=key)]) for key in strings.MATCHMAKING.BUTTONS])
|
||||||
else:
|
else:
|
||||||
inline_keyboard = None
|
inline_keyboard = None
|
||||||
try:
|
while True:
|
||||||
bot.edit_message_text(message_id=update.callback_query.message.message_id,
|
try:
|
||||||
chat_id=config["Telegram"]["announcement_group"],
|
bot.edit_message_text(message_id=update.callback_query.message.message_id,
|
||||||
text=match.generate_text(session),
|
chat_id=config["Telegram"]["announcement_group"],
|
||||||
reply_markup=inline_keyboard,
|
text=match.generate_text(session),
|
||||||
parse_mode="HTML")
|
reply_markup=inline_keyboard,
|
||||||
except BadRequest:
|
parse_mode="HTML")
|
||||||
pass
|
break
|
||||||
|
except BadRequest:
|
||||||
|
break
|
||||||
|
except TimedOut:
|
||||||
|
pass
|
||||||
except Exception:
|
except Exception:
|
||||||
try:
|
try:
|
||||||
bot.answer_callback_query(update.callback_query.id,
|
bot.answer_callback_query(update.callback_query.id,
|
||||||
|
|
Loading…
Reference in a new issue