diff --git a/files/helpers/discord.py b/files/helpers/discord.py index 9eeade0f1..7ebacadca 100644 --- a/files/helpers/discord.py +++ b/files/helpers/discord.py @@ -57,8 +57,8 @@ def set_nick(user, nick): data={"nick": nick} requests.patch(url, headers=headers, json=data, timeout=5) -def send_message(message): - url=f"https://discordapp.com/api/channels/924485611715452940/messages" +def send_discord_message(message): headers = {"Authorization": f"Bot {BOT_TOKEN}"} data={"content": message} - requests.post(url, headers=headers, data=data, timeout=5) \ No newline at end of file + requests.post(f"https://discordapp.com/api/channels/924485611715452940/messages", headers=headers, data=data, timeout=5) + requests.post(f"https://discordapp.com/api/channels/924486091795484732/messages", headers=headers, data=data, timeout=5) \ No newline at end of file diff --git a/files/routes/posts.py b/files/routes/posts.py index 7fe7d3b26..b07aa48dd 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -7,7 +7,7 @@ from files.helpers.sanitize import * from files.helpers.filters import * from files.helpers.markdown import * from files.helpers.alerts import * -from files.helpers.discord import send_message +from files.helpers.discord import send_discord_message from files.helpers.const import * from files.classes import * from flask import * @@ -1176,7 +1176,7 @@ def submit_post(v): cache.delete_memoized(frontlist) cache.delete_memoized(User.userpagelisting) if v.admin_level > 1 and ("[changelog]" in new_post.title or "(changelog)" in new_post.title) and not new_post.private: - send_message(f"https://{site}{new_post.permalink}") + send_discord_message(f"https://{site}{new_post.permalink}") cache.delete_memoized(changeloglist) g.db.commit()