Skip to content

Commit

Permalink
[f] fix key error
Browse files Browse the repository at this point in the history
  • Loading branch information
grisha765 committed Oct 22, 2024
1 parent 2c77b64 commit 75dc57e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/tg.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ async def handle_ttt_join(client, callback_query):
async def handle_ttt_move(client, callback_query):
session_id, position = callback_query.data.split('_')
session_id = int(session_id)
await move_ttt(client, callback_query, sessions[session_id], int(position), session_id, get_translation, save_points)
session = sessions.get(session_id)
if session != None:
await move_ttt(client, callback_query, sessions[session_id], int(position), session_id, get_translation, save_points)
else:
await callback_query.answer(get_translation(callback_query.from_user.language_code, 'complete'))

async def start_bot():
logging.info("Launching the bot...")
Expand Down

0 comments on commit 75dc57e

Please sign in to comment.