aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/candy_collection.py
diff options
context:
space:
mode:
authorGravatar Vivaan Parashar <[email protected]>2021-04-15 19:18:47 +0530
committerGravatar Vivaan Parashar <[email protected]>2021-04-15 19:18:47 +0530
commitc25976c654162cd4222b1d1e1088d978971bcabb (patch)
treeb455db8577d1746d7623e7b891a8549432246eea /bot/exts/halloween/candy_collection.py
parentMerge branch 'master' of https://github.com/python-discord/sir-lancebot (diff)
parentMerge pull request #679 from python-discord/vcokltfre/fix/timed-error-help (diff)
Update branch
Diffstat (limited to 'bot/exts/halloween/candy_collection.py')
-rw-r--r--bot/exts/halloween/candy_collection.py3
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