check before trying to add to markov

This commit is contained in:
Tomáš Mládek 2019-07-03 16:26:05 +02:00
parent 645570adc6
commit 66b12c2caf

View file

@ -463,7 +463,7 @@ class DelojzaBot:
else: else:
self.last_hashtags[update.message.chat.id] = update.message.from_user, datetime.now(), hashtags self.last_hashtags[update.message.chat.id] = update.message.from_user, datetime.now(), hashtags
else: else:
if self.markov: if self.markov and update.message.text:
self.markov.add_to_corpus(update.message.text) self.markov.add_to_corpus(update.message.text)
def _get_tag_dirs(self): def _get_tag_dirs(self):