diff options
| author | 2020-05-10 11:06:53 -0700 | |
|---|---|---|
| committer | 2020-05-10 11:06:53 -0700 | |
| commit | 67702dcb98323091a3681c5badc65403fa7147fe (patch) | |
| tree | 3b259a6d26f1efcf12e8f5bf7c82024bef5f1b38 | |
| parent | Merge pull request #923 from python-discord/feat/util/remove-mention-cmd (diff) | |
ModLog: ignore DMs in the message delete listener
| -rw-r--r-- | bot/cogs/moderation/modlog.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py index beef7a8ef..b434bc4b8 100644 --- a/bot/cogs/moderation/modlog.py +++ b/bot/cogs/moderation/modlog.py @@ -552,6 +552,10 @@ class ModLog(Cog, name="ModLog"): channel = message.channel author = message.author + # Ignore DMs. + if not message.guild: + return + if message.guild.id != GuildConstant.id or channel.id in GuildConstant.modlog_blacklist: return |