From 7dd266ed1b208b9ec9f5eb21cd11d15f0eb22cc2 Mon Sep 17 00:00:00 2001 From: Djalim Simaila Date: Sat, 1 Apr 2023 19:11:31 +0200 Subject: [PATCH] update discord bot status when games are deleted --- truthinquiry/routes/routes_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/truthinquiry/routes/routes_api.py b/truthinquiry/routes/routes_api.py index f4b1ffd..ed21037 100644 --- a/truthinquiry/routes/routes_api.py +++ b/truthinquiry/routes/routes_api.py @@ -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