From 976a0e92e3f45fc7051abfbcd95c52544eb2d18b Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sun, 17 Oct 2021 12:51:28 +0100 Subject: Fix attr error in ModLog command Fixes #1881 Fixes BOT-1NX --- bot/exts/moderation/modlog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.3