diff options
author | 2019-12-12 20:34:10 -0800 | |
---|---|---|
committer | 2019-12-12 20:34:10 -0800 | |
commit | c9cc19c27f3a3458910012e4c15442b0974b9fb3 (patch) | |
tree | 8d3f660fdb65b552c55818993bda4777371271a1 | |
parent | Verification: delete bots' messages (#689) (diff) |
Verification: check channel before checking for bot messages
-rw-r--r-- | bot/cogs/verification.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py index 2d759f885..ec0f9627e 100644 --- a/bot/cogs/verification.py +++ b/bot/cogs/verification.py @@ -56,6 +56,9 @@ class Verification(Cog): @Cog.listener() async def on_message(self, message: Message) -> None: """Check new message event for messages to the checkpoint channel & process.""" + if message.channel.id != Channels.verification: + return # Only listen for #checkpoint messages + if message.author.bot: # They're a bot, delete their message after the delay. # But not the periodic ping; we like that one. @@ -63,9 +66,6 @@ class Verification(Cog): await message.delete(delay=BOT_MESSAGE_DELETE_DELAY) return - if message.channel.id != Channels.verification: - return # Only listen for #checkpoint messages - # if a user mentions a role or guild member # alert the mods in mod-alerts channel if message.mentions or message.role_mentions: |