diff options
| author | 2021-04-06 10:29:46 +0200 | |
|---|---|---|
| committer | 2021-04-06 10:29:46 +0200 | |
| commit | 6241e9db8a2489c1bbdd0079cabd9dbd7b5b9b61 (patch) | |
| tree | ceb61a295c6a4456d6e077e35e9c56a55df06475 /bot/exts/halloween/candy_collection.py | |
| parent | Issues: ignore bots (diff) | |
| parent | Merge pull request #658 from python-discord/ks123/ghcr-token-to-github (diff) | |
Merge remote-tracking branch 'origin/main' into akarys/630/automatic-linking-everywhere
Diffstat (limited to 'bot/exts/halloween/candy_collection.py')
| -rw-r--r-- | bot/exts/halloween/candy_collection.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/halloween/candy_collection.py b/bot/exts/halloween/candy_collection.py index 0cb37ecd..40e21f40 100644 --- a/bot/exts/halloween/candy_collection.py +++ b/bot/exts/halloween/candy_collection.py @@ -47,6 +47,9 @@ class CandyCollection(commands.Cog): @commands.Cog.listener() async def on_message(self, message: discord.Message) -> None: """Randomly adds candy or skull reaction to non-bot messages in the Event channel.""" + # Ignore messages in DMs + if not message.guild: + return # make sure its a human message if message.author.bot: return |