Skip to content

Commit 7346131

Browse files
authored
Merge pull request #1882 from python-discord/fix-attr-error
2 parents 5f2eebf + 976a0e9 commit 7346131

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/exts/moderation/modlog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def is_channel_ignored(self, channel_id: int) -> bool:
539539
channel = self.bot.get_channel(channel_id)
540540

541541
# Ignore not found channels, DMs, and messages outside of the main guild.
542-
if not channel or channel.guild and channel.guild.id != GuildConstant.id:
542+
if not channel or not hasattr(channel, "guild") or channel.guild.id != GuildConstant.id:
543543
return True
544544

545545
# Look at the parent channel of a thread.

0 commit comments

Comments
 (0)