mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-18 19:32:29 +12:00
add check incase message is in dm
This commit is contained in:
parent
380356bff5
commit
f22f889b81
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue