Update notify.py
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import requests
|
||||
|
||||
# ✅ Your Discord webhook URL
|
||||
WEBHOOK_URL = "https://discord.com/api/webhooks/847569410839150662/lJo0y5aah72zj-ML-9jMMAEPzD5M0gafC4xUe2d5HlKZaW0Z187wjCW912fmJqV5c74a"
|
||||
WEBHOOK_URL2 = "https://discord.com/api/webhooks/847569410839150662/lJo0y5aah72zj-ML-9jMMAEPzD5M0gafC4xUe2d5HlKZaW0Z187wjCW912fmJqV5c74a"
|
||||
WEBHOOK_URL = "https://discord.com/api/webhooks/1403835326509744211/OjqbGjCvwAEDfWSqAU-YVcqcgsT4d9U84oEM4a89Ec7Jsi5GO_jIg8zl9nwB9KDB0gmr"
|
||||
|
||||
def hooknotify(server_time, title, resource, surplus):
|
||||
"""Send Discord notification with surplus info."""
|
||||
@@ -12,6 +13,7 @@ def hooknotify(server_time, title, resource, surplus):
|
||||
)
|
||||
data = { "content": message }
|
||||
try:
|
||||
response = requests.post(WEBHOOK_URL2, json=data)
|
||||
response = requests.post(WEBHOOK_URL, json=data)
|
||||
if response.status_code == 204:
|
||||
print(f"📨 Notification sent for {resource}")
|
||||
|
||||
Reference in New Issue
Block a user