aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Karlis Suvi <[email protected]>2021-10-17 15:12:02 +0300
committerGravatar GitHub <[email protected]>2021-10-17 15:12:02 +0300
commit73461312cf082a95f65641e996333e0228e6a5ee (patch)
treec23c1f3f63086f87252983cdc7adf0f506702088
parentMerge pull request #1795 from Numerlor/doc-repetitive-outdated-warn (diff)
parentFix attr error in ModLog command (diff)
Merge pull request #1882 from python-discord/fix-attr-error
-rw-r--r--bot/exts/moderation/modlog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/modlog.py b/bot/exts/moderation/modlog.py
index b09eb2d14..900c3b610 100644
--- a/bot/exts/moderation/modlog.py
+++ b/bot/exts/moderation/modlog.py
@@ -539,7 +539,7 @@ class ModLog(Cog, name="ModLog"):
channel = self.bot.get_channel(channel_id)
# Ignore not found channels, DMs, and messages outside of the main guild.
- if not channel or channel.guild and channel.guild.id != GuildConstant.id:
+ if not channel or not hasattr(channel, "guild") or channel.guild.id != GuildConstant.id:
return True
# Look at the parent channel of a thread.