fix report webhook
This commit is contained in:
parent
d14afb495e
commit
93794671f3
@ -341,8 +341,12 @@ def chat_message(sid, msg, pl=None):
|
||||
data = "\n".join(ses.game.rpc_log[:-1]).strip()
|
||||
response = requests.post("http://hastebin.com/documents", data)
|
||||
key = json.loads(response.text).get('key')
|
||||
if "DISCORD_WEBHOOK" in os.environ and os.environ['DISCORD_WEBHOOK'].len > 0:
|
||||
webhook = DiscordWebhook(url=os.environ['DISCORD_WEBHOOK'], content=f'New bug report, replay at https://hastebin.com/{key}')
|
||||
response = webhook.execute()
|
||||
else:
|
||||
print("WARNING: DISCORD_WEBHOOK not found")
|
||||
print(f'New bug report, replay at https://hastebin.com/{key}')
|
||||
return
|
||||
if '/replay' in msg:
|
||||
_cmd = msg.split()
|
||||
|
Loading…
Reference in New Issue
Block a user