diff --git a/markov/markov.py b/markov/markov.py index c686070..508e56e 100644 --- a/markov/markov.py +++ b/markov/markov.py @@ -139,7 +139,7 @@ class Markov(commands.Cog): async def on_message(self, message): # updates model content = message.content - if not content or message.author == message.guild.me: + if not content or not message.guild or message.author == message.guild.me: return # check if this is a bot message