1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Don't crash if ship is sent without args

This commit is contained in:
Steffo 2018-11-07 19:37:47 +01:00
parent b92702548d
commit bca018520a

View file

@ -332,7 +332,7 @@ def cmd_eat(bot: Bot, update: Update):
def cmd_ship(bot: Bot, update: Update):
try:
_, name_one, name_two = update.message.text.split(" ", 2)
except IndexError:
except ValueError:
bot.send_message(update.message.chat.id, "⚠️ Non hai specificato correttamente i due nomi!\n"
"Sintassi corretta: `/ship <nome> <nome>`", parse_mode="Markdown")
return