chat emit report confirm

This commit is contained in:
Giulio 2021-12-17 22:47:03 +01:00
parent 93794671f3
commit 88b5db2afe

View File

@ -344,6 +344,7 @@ def chat_message(sid, msg, pl=None):
if "DISCORD_WEBHOOK" in os.environ and os.environ['DISCORD_WEBHOOK'].len > 0: 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}') webhook = DiscordWebhook(url=os.environ['DISCORD_WEBHOOK'], content=f'New bug report, replay at https://hastebin.com/{key}')
response = webhook.execute() response = webhook.execute()
sio.emit('chat_message', room=sid, data={'color': f'green','text':f'Report OK'})
else: else:
print("WARNING: DISCORD_WEBHOOK not found") print("WARNING: DISCORD_WEBHOOK not found")
print(f'New bug report, replay at https://hastebin.com/{key}') print(f'New bug report, replay at https://hastebin.com/{key}')