From 2fb59ded77fe703366eac01dcffd1ebf12266f22 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Fri, 28 Sep 2018 10:50:10 +0200 Subject: Ignore all DMs in the antispam cog --- bot/cogs/antispam.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/cogs/antispam.py b/bot/cogs/antispam.py index 7a33ba9e8..d5b72718c 100644 --- a/bot/cogs/antispam.py +++ b/bot/cogs/antispam.py @@ -56,7 +56,8 @@ class AntiSpam: async def on_message(self, message: Message): if ( - message.guild.id != GuildConfig.id + not message.guild + or message.guild.id != GuildConfig.id or message.author.bot or (message.channel.id in WHITELISTED_CHANNELS and not DEBUG_MODE) or (message.author.top_role.id in WHITELISTED_ROLES and not DEBUG_MODE) -- cgit v1.2.3