From e08e6bc62ccdd2566a7da1ef765bd8b385350d35 Mon Sep 17 00:00:00 2001 From: trigg Date: Sat, 26 Sep 2020 19:54:36 +0100 Subject: [PATCH] - Added log when not able to connect to dicord client --- discover.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discover.py b/discover.py index 0c3ece2..c92bad5 100755 --- a/discover.py +++ b/discover.py @@ -269,10 +269,13 @@ def sub_all_voice(ws): sub_all_voice_guild(ws, guild) def do_read(): - global ws, win, userlist, list_altered + global ws, win, userlist, list_altered, warn_connection if not ws: # Reconnect if needed connect() + if warn_connection: + print("Unable to connect to Discord client") + warn_connection=False return True # Recreate a list of users in current room newlist = [] @@ -1055,4 +1058,5 @@ if __name__ == "__main__": settings=None ind=None menu=None + warn_connection=True main()