don't markov-learn what looks like a command
This commit is contained in:
parent
826f34e866
commit
aa71fc3232
|
@ -1,6 +1,8 @@
|
|||
"""Observe Markov chains from Discord."""
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from bot import hitomi
|
||||
from markov import lib
|
||||
|
||||
|
@ -15,6 +17,11 @@ def on_message(message):
|
|||
logger.debug("markov ignoring message authored by self")
|
||||
return
|
||||
|
||||
# ignore commands
|
||||
if message.content[0] == settings.DISCORD_BOT_COMMAND_PREFIX:
|
||||
logger.debug("markov ignoring message that looks like a command")
|
||||
return
|
||||
|
||||
if message.channel.is_private:
|
||||
# DMs have a context of the author
|
||||
context_name = message.author
|
||||
|
|
Loading…
Reference in New Issue