Просмотр исходного кода

[Debug] More info in error message to Discord

Foppe Hemminga 5 лет назад
Родитель
Сommit
af5379be54
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      cron.py

+ 3 - 3
cron.py

@@ -6,7 +6,7 @@ import time
 import settings
 from pprint import pprint, pformat
 
-debug = True
+debug = False
 
 def dprint(text):
     if debug:
@@ -108,9 +108,9 @@ def cron():
             if not player_json:
                 continue
             if 'error' in player_json:
-                dprint(f"{player['maintainer']}")
+                print(f"{player['maintainer']}")
                 pprint(player_json)
-                _send(player['maintainer'], '```'+pformat(player_json)+'```')
+                _send(player['maintainer'], 'Maintainer: '+player['maintainer']+', Player: '+player+' ```'+pformat(player_json)+'```')
                 break
 
             # Check for changes