From 5fbff785bf80974c04415ce2f9841075122629b6 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 8 Aug 2018 22:13:12 +0200 Subject: [PATCH] many things --- telegrambot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegrambot.py b/telegrambot.py index da559992..cc48924c 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -577,7 +577,7 @@ def cmd_markov(bot: Bot, update: Update): return try: _, first_word = update.message.text.split(" ", 1) - except IndexError: + except ValueError: sentence = model.make_sentence(tries=1000) if sentence is None: bot.send_message(update.message.chat.id, "⚠ Complimenti! Hai vinto la lotteria di Markov!\n"