aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/filters/antimalware.py2
-rw-r--r--bot/exts/filters/antispam.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/filters/antimalware.py b/bot/exts/filters/antimalware.py
index 0eedeb0fb..e708e5149 100644
--- a/bot/exts/filters/antimalware.py
+++ b/bot/exts/filters/antimalware.py
@@ -63,7 +63,7 @@ class AntiMalware(Cog):
return
# Ignore code jam channels
- if hasattr(message.channel, "category") and message.channel.category.name == JAM_CATEGORY_NAME:
+ if getattr(message.channel, "category", None) and message.channel.category.name == JAM_CATEGORY_NAME:
return
# Check if user is staff, if is, return
diff --git a/bot/exts/filters/antispam.py b/bot/exts/filters/antispam.py
index fe79a5d62..70c1168bf 100644
--- a/bot/exts/filters/antispam.py
+++ b/bot/exts/filters/antispam.py
@@ -166,7 +166,7 @@ class AntiSpam(Cog):
not message.guild
or message.guild.id != GuildConfig.id
or message.author.bot
- or (hasattr(message.channel, "category") and message.channel.category.name == JAM_CATEGORY_NAME)
+ or (getattr(message.channel, "category", None) and message.channel.category.name == JAM_CATEGORY_NAME)
or (message.channel.id in Filter.channel_whitelist and not DEBUG_MODE)
or (any(role.id in Filter.role_whitelist for role in message.author.roles) and not DEBUG_MODE)
):