2022-05-04 23:09:46 +00:00
|
|
|
import requests
|
2022-10-16 08:14:15 +00:00
|
|
|
|
2022-05-04 23:09:46 +00:00
|
|
|
from .const import *
|
|
|
|
|
2022-07-10 14:25:42 +00:00
|
|
|
headers = {"Authorization": f"Bot {DISCORD_BOT_TOKEN}"}
|
|
|
|
|
2022-08-30 02:03:48 +00:00
|
|
|
def send_changelog_message(message):
|
2022-05-04 23:09:46 +00:00
|
|
|
data={"content": message}
|
2022-10-14 18:46:39 +00:00
|
|
|
for id in DISCORD_CHANGELOG_CHANNEL_IDS:
|
|
|
|
requests.post(f"https://discordapp.com/api/channels/{id}/messages", headers=headers, data=data, timeout=5)
|
2022-07-10 14:25:42 +00:00
|
|
|
|
|
|
|
def send_wpd_message(message):
|
|
|
|
data={"content": message}
|
2022-10-14 18:46:39 +00:00
|
|
|
requests.post(f"https://discordapp.com/api/channels/{WPD_CHANNEL_ID}/messages", headers=headers, data=data, timeout=5)
|