discord ids as constants

master
justcool393 2022-10-14 11:46:39 -07:00
parent 0753d73f32
commit 419ed61dd3
2 changed files with 5 additions and 3 deletions

View File

@ -156,6 +156,8 @@ AGENDAPOSTER_MSG_HTML = """<p>Hi <a href="/id/{id}"><img loading="lazy" src="/pp
<p>Don't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your {type} with <code>{AGENDAPOSTER_PHRASE}</code> included.</p> <p>Don't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your {type} with <code>{AGENDAPOSTER_PHRASE}</code> included.</p>
<p><em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>""" <p><em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>"""
DISCORD_CHANGELOG_CHANNEL_IDS = [924485611715452940, 1013992002624426015]
WPD_CHANNEL_ID = 1013990963846332456
################################################################################ ################################################################################
### SITE SPECIFIC CONSTANTS ### SITE SPECIFIC CONSTANTS

View File

@ -46,9 +46,9 @@ def set_nick(user, nick):
def send_changelog_message(message): def send_changelog_message(message):
data={"content": message} data={"content": message}
requests.post("https://discordapp.com/api/channels/924485611715452940/messages", headers=headers, data=data, timeout=5) for id in DISCORD_CHANGELOG_CHANNEL_IDS:
requests.post("https://discordapp.com/api/channels/1013992002624426015/messages", headers=headers, data=data, timeout=5) requests.post(f"https://discordapp.com/api/channels/{id}/messages", headers=headers, data=data, timeout=5)
def send_wpd_message(message): def send_wpd_message(message):
data={"content": message} data={"content": message}
requests.post("https://discordapp.com/api/channels/1013990963846332456/messages", headers=headers, data=data, timeout=5) requests.post(f"https://discordapp.com/api/channels/{WPD_CHANNEL_ID}/messages", headers=headers, data=data, timeout=5)