diff options
| author | 2020-07-13 15:24:58 +0200 | |
|---|---|---|
| committer | 2020-07-13 15:24:58 +0200 | |
| commit | 311936991d5543e35dbe4a5a5a13261fb44c27f4 (patch) | |
| tree | c5b2579167387081e2fd098a587f6b8f91cc4ea6 | |
| parent | Only mods+ may use the commands in this cog. (diff) | |
Don't run on_message if self.webhook is None.
https://github.com/python-discord/bot/issues/667
| -rw-r--r-- | bot/cogs/dm_relay.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/dm_relay.py b/bot/cogs/dm_relay.py index 67411f57b..3d16db8a0 100644 --- a/bot/cogs/dm_relay.py +++ b/bot/cogs/dm_relay.py @@ -64,7 +64,7 @@ class DMRelay(Cog): async def on_message(self, message: discord.Message) -> None: """Relays the message's content and attachments to the dm_log channel.""" # Only relay DMs from humans - if message.author.bot or message.guild: + if message.author.bot or message.guild or self.webhook is None: return clean_content = message.clean_content |