From fe7221481c49f88d4a9e526d335b9988d33da1ce Mon Sep 17 00:00:00 2001 From: tropii <97747461+TropiiDev@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:08:10 -0500 Subject: [PATCH] Set ALERT_MESSAGE to target channels --- bot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index a4142c1..a36cb4d 100644 --- a/bot.py +++ b/bot.py @@ -68,8 +68,11 @@ class MyBot(commands.Bot): for guild in self.guilds: # find the channel named "commands" - owner = guild.owner - await owner.send("Hello Again!\n\nThis is an official message from the developer of Blob. We are continuing development of Blob and it will resume normal operations shortly.\n\nA lot has changed since the last time Blob was online. We are here to address your issues with our new discord server. Please join [now](https://discord.gg/A2EQDvA6sN).\n\nI (Tropii) hate to send messages to server owners like you with stuff like this, I do apologize. For further information please join the support server below!\n\nTake care - Tropii.\n\nHave any conerns? Feel free to add me `fstropii`\n\nIf you see this message more than once please let me know ASAP!") + if discord.utils.get(guild.text_channels, name="general"): + channel = discord.utils.get(guild.text_channels, name="general") + await channel.send("Hello Again!\n\nThis is an official message from the developer of Blob. We are continuing development of Blob and it will resume normal operations shortly.\n\nA lot has changed since the last time Blob was online. We are here to address your issues with our new discord server. Please join [now](https://discord.gg/A2EQDvA6sN).\n\nI (Tropii) hate to send messages to through servers with stuff like this, I do apologize. For further information please join the support server below!\n\nTake care - Tropii.\n\nHave any conerns? Feel free to add me `fstropii`\n\nIf you see this message more than once please let me know ASAP!") + else: + pass # making var for commands in this file bot = MyBot()