aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dennis Pham <[email protected]>2020-06-07 16:04:38 -0400
committerGravatar GitHub <[email protected]>2020-06-07 16:04:38 -0400
commitf9df6e2214a9c5be909c34ddcfd603c0f95e94eb (patch)
treedc7caf29552ec9ceca14b9d63572e0be53a6fd66
parentEnable the 'redis' / 'aiohttp' Sentry integrations (diff)
parentMerge branch 'master' into bug/backend/stats-category-check (diff)
Merge pull request #983 from python-discord/bug/backend/stats-category-check
Fix AttributeError for category check
-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.