aboutsummaryrefslogtreecommitdiff
path: root/markov/markov.py
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-03-06 18:19:57 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-03-06 18:19:57 +0000
commit39950d062098dee2ac85a5b3dc5ef512260dd436 (patch)
tree0deb7e29f7aa29629b66aea9e699157a0a49188e /markov/markov.py
parent7182456f0447af09cab8490eef9d1d886af7c733 (diff)
downloadaps-cogs-39950d062098dee2ac85a5b3dc5ef512260dd436.tar
aps-cogs-39950d062098dee2ac85a5b3dc5ef512260dd436.tar.gz
aps-cogs-39950d062098dee2ac85a5b3dc5ef512260dd436.zip
markov: ignore non-guild messages
Diffstat (limited to 'markov/markov.py')
-rw-r--r--markov/markov.py2
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():