diff options
| author | 2020-06-07 16:04:38 -0400 | |
|---|---|---|
| committer | 2020-06-07 16:04:38 -0400 | |
| commit | f9df6e2214a9c5be909c34ddcfd603c0f95e94eb (patch) | |
| tree | dc7caf29552ec9ceca14b9d63572e0be53a6fd66 | |
| parent | Enable the 'redis' / 'aiohttp' Sentry integrations (diff) | |
| parent | Merge 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.py | 3 |
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. |