aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/stats.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/cogs/stats.py b/bot/cogs/stats.py
index 4ebb6423c..d42f55466 100644
--- a/bot/cogs/stats.py
+++ b/bot/cogs/stats.py
@@ -36,7 +36,8 @@ class Stats(Cog):
if message.guild.id != Guild.id:
return
- if message.channel.category.id == Categories.modmail:
+ cat = getattr(message.channel, "category", None)
+ if cat is not None and cat.id == Categories.modmail:
if message.channel.id != Channels.incidents:
# Do not report modmail channels to stats, there are too many
# of them for interesting statistics to be drawn out of this.