From bc7f1784626185cd6456e73cdea29148c743ad96 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Thu, 11 Feb 2021 18:19:58 -0500 Subject: [PATCH] fixes #191 --- the_prestige.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/the_prestige.py b/the_prestige.py index 103d34b..a66e831 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -1164,6 +1164,7 @@ active_tournaments = [] active_leagues = [] active_standings = {} setupmessages = {} +watching = False thread1 = threading.Thread(target=main_controller.update_loop) thread1.start() @@ -1195,8 +1196,10 @@ def config(): async def on_ready(): db.initialcheck() print(f"logged in as {client.user} with token {config()['token']} to {len(client.guilds)} servers") - watch_task = asyncio.create_task(game_watcher()) - await watch_task + if not watching: + watching = True + watch_task = asyncio.create_task(game_watcher()) + await watch_task @client.event