You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
792 B
19 lines
792 B
import requests
|
|
|
|
DISCORD_FAILED_CALLS_WEBHOOK_URL = 'https://discord.com/api/webhooks/1248191778134163486/sSoTL6cULCElWr2YFwyllsg7IXxHcCx_YMDJA_cUHtVUU4WOfN-5M7drCJuwNBBfAk9a'
|
|
DISCORD_LOGS_WEBHOOK_URL = 'https://discord.com/api/webhooks/1257987637449588736/TtOUwzYgSlQH2d3Ps7SfIKRcFALQVa3hfkC-j9K4_UAcWtsfiw4v8NUPbnX2_ZPOYzuv'
|
|
|
|
def send_discord_failed_calls_message(message):
|
|
send_discord_message(DISCORD_FAILED_CALLS_WEBHOOK_URL, message)
|
|
|
|
def send_discord_log_message(message):
|
|
send_discord_message(DISCORD_LOGS_WEBHOOK_URL, message)
|
|
|
|
def send_discord_message(webhook_url, content):
|
|
try:
|
|
data = {
|
|
"content": content
|
|
}
|
|
requests.post(webhook_url, json=data)
|
|
except Exception as e:
|
|
print(f"Failed to send Discord message: {str(e)}")
|
|
|