You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fixed an issue where the script may error out indefinitely, printing an error message every 15 seconds - at one point this app was spending about 2 gigabytes of ram lmao
# if the game has changed, restart the rich presence client with that new app ID
379
386
if (oldGameName!=gameNameandgameName!=None) or (app_id==DEFAULT_APP_IDandscraped==True):
380
387
startTime=round(time())
381
-
print(f"game changed to \"{gameName}\"")
388
+
ifcycles<=20:
389
+
print(f"game changed to \"{gameName}\"")
382
390
383
391
app_id=get_game_id(gameName)
384
392
ifapp_id==DEFAULT_APP_IDandscraped==True:
@@ -400,13 +408,16 @@ def program():
400
408
sleep(45)
401
409
402
410
403
-
deftry_running():
411
+
deftry_running(cycles=0):
404
412
try:
405
-
program()
413
+
program(cycles)
406
414
exceptExceptionase:
407
-
print(f"could not connect to discord: {e}")
415
+
ifcycles<=20:
416
+
print(f"could not connect to discord: {e}")
417
+
ifcycles==20:
418
+
print("failed to connect 20 times, the script will now stop logging errors - as if it continues to do so this script will end up taking gigabytes worth of memory in a couple hours")
0 commit comments