Skip to content

Commit

Permalink
Fix MessageNotModified not being handled in the datacenters section
Browse files Browse the repository at this point in the history
  • Loading branch information
SyberiaK committed Mar 23, 2024
1 parent efb4f37 commit a79a4ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ async def send_dc_south_korea(client: BotClient, session: UserSession, bot_messa
await send_dc_state(client, session, bot_message, datacenter_handlers.south_korea, keyboards.dc_asia_markup)


@ignore_message_not_modified
async def send_dc_state(client: BotClient, session: UserSession, bot_message: Message,
dc_state_func: Callable[[Locale], str | State], reply_markup: ExtendedIKM):
try:
Expand All @@ -293,6 +292,8 @@ async def send_dc_state(client: BotClient, session: UserSession, bot_message: Me
state += f'{format_datetime(game_servers_datetime, "HH:mm:ss, dd MMM", locale=lang_code).title()} (UTC)'

await bot_message.edit(state, reply_markup=reply_markup(session.locale))
except MessageNotModified:
pass
except Exception as e:
return await handle_exceptions_in_callback(client, session, bot_message, e)

Expand Down

0 comments on commit a79a4ba

Please sign in to comment.