Merge pull request #140 from ThomasRubini/discordbotUpdates

update discord bot status when games are deleted
This commit is contained in:
Djalim Simaila 2023-04-01 19:16:02 +02:00 committed by GitHub
commit 70159744e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,7 @@ def cleanup():
games_to_delete.append(game_id)
for game_id in games_to_delete:
del game_logic.games_list[game_id]
discord_bot.update_games_presence()
# API specification is documented in api_doc.yml
@ -282,5 +283,6 @@ def check_anwser():
json_game_results = game.generate_game_results()
socket_io.emit("gamefinished", json_game_results, room="game."+game.game_id)
del game_logic.games_list[game.game_id]
discord_bot.update_games_presence()
response = {"error": 0}
return response