From 39950d062098dee2ac85a5b3dc5ef512260dd436 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Wed, 6 Mar 2024 13:19:57 -0500 Subject: markov: ignore non-guild messages --- markov/markov.py | 2 ++ 1 file changed, 2 insertions(+) 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(): -- cgit v1.2.3-57-g22cb