diff options
| author | 2021-05-13 20:28:20 +0100 | |
|---|---|---|
| committer | 2021-05-13 20:28:20 +0100 | |
| commit | 196c435c586b3bc2d30aa6a9865b8d4498d9c5b8 (patch) | |
| tree | c9585d2a668d75bbbda0fab5c1b80962a9946bb7 /bot/exts/halloween/candy_collection.py | |
| parent | Remove redundant comments in bookmark cog (diff) | |
| parent | Merge pull request #727 from python-discord/reddit-revoke (diff) | |
Merge branch 'main' into bookmark-react-for-copy
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 | 
