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

And again again

This commit is contained in:
Steffo 2019-02-15 22:34:45 +01:00
parent 1d4497144b
commit 378f21f617

View file

@ -435,7 +435,11 @@ def on_callback_query(bot: telegram.Bot, update: telegram.Update):
match.closed = True match.closed = True
for player in match.players: for player in match.players:
if int(player.status) >= 1: if int(player.status) >= 1:
try:
reply_msg(bot, player.user.telegram_id, strings.MATCHMAKING.GAME_START[int(player.status)], **match.format_dict()) reply_msg(bot, player.user.telegram_id, strings.MATCHMAKING.GAME_START[int(player.status)], **match.format_dict())
except Unauthorized:
reply_msg(bot, main_group_id, strings.TELEGRAM.ERRORS.UNAUTHORIZED_USER,
mention=player.mention())
elif update.callback_query.data == "match_cancel": elif update.callback_query.data == "match_cancel":
if not (match.creator == user or user.telegram_id == 25167391): if not (match.creator == user or user.telegram_id == 25167391):
bot.answer_callback_query(update.callback_query.id, bot.answer_callback_query(update.callback_query.id,