aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/stats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/stats.py b/bot/exts/info/stats.py
index 64bff9632..65a4b5b6c 100644
--- a/bot/exts/info/stats.py
+++ b/bot/exts/info/stats.py
@@ -42,7 +42,7 @@ class Stats(Cog):
return
channel = message.channel
- if hasattr(channel, 'parent'):
+ if hasattr(channel, 'parent') and channel.parent:
channel = channel.parent
reformatted_name = CHANNEL_NAME_OVERRIDES.get(channel.id, channel.name)
reformatted_name = "".join(char if char in ALLOWED_CHARS else '_' for char in reformatted_name)