From 66b12c2caf2a98a1f053272964c55ecfc9e01184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 3 Jul 2019 16:26:05 +0200 Subject: [PATCH] check before trying to add to markov --- delojza.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delojza.py b/delojza.py index 2c58a8e..61237b6 100755 --- a/delojza.py +++ b/delojza.py @@ -463,7 +463,7 @@ class DelojzaBot: else: self.last_hashtags[update.message.chat.id] = update.message.from_user, datetime.now(), hashtags else: - if self.markov: + if self.markov and update.message.text: self.markov.add_to_corpus(update.message.text) def _get_tag_dirs(self):