diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2024-03-06 18:19:57 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2024-03-06 18:19:57 +0000 |
commit | 39950d062098dee2ac85a5b3dc5ef512260dd436 (patch) | |
tree | 0deb7e29f7aa29629b66aea9e699157a0a49188e /markov | |
parent | 7182456f0447af09cab8490eef9d1d886af7c733 (diff) | |
download | aps-cogs-39950d062098dee2ac85a5b3dc5ef512260dd436.tar aps-cogs-39950d062098dee2ac85a5b3dc5ef512260dd436.tar.gz aps-cogs-39950d062098dee2ac85a5b3dc5ef512260dd436.zip |
markov: ignore non-guild messages
Diffstat (limited to 'markov')
-rw-r--r-- | markov/markov.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/markov/markov.py b/markov/markov.py index 39a3da9..ba3e47b 100644 --- a/markov/markov.py +++ b/markov/markov.py @@ -34,6 +34,8 @@ class Markov(commands.Cog): @commands.Cog.listener() async def on_message_without_command(self, message): + if message.guild is None: + return if not await self.config.guild(message.guild).use_messages(): return if not await self.config.channel(message.channel).use_messages(): |