diff --git a/telegrambot.py b/telegrambot.py index 8ba82669..b75025bd 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -468,7 +468,7 @@ def parse_timestring(timestring: str) -> typing.Union[datetime.timedelta, dateti def cmd_newevent(bot: Bot, update: Update): try: _, timestring, name_desc = update.message.text.split(" ", 2) - except (ValueError, IndexError): + except ValueError: bot.send_message(update.message.chat.id, "⚠️ Sintassi del comando non valida.\n" "Sintassi corretta:\n" "```/newevent