aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/candy_collection.py
diff options
context:
space:
mode:
authorGravatar Sougata das <[email protected]>2021-04-12 11:45:06 +0530
committerGravatar GitHub <[email protected]>2021-04-12 11:45:06 +0530
commit1a9558c478cea69dfcf62d3c0b9e278c4e24d4e8 (patch)
tree68c027a3e804b0fc859887dd3daf9d23f0779131 /bot/exts/halloween/candy_collection.py
parentMerge pull request #1 from rijusougata13/rijusougata13-patch-1 (diff)
parentMerge pull request #672 from python-discord/feature/timed-execution (diff)
Merge branch 'main' into main
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