mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Don't crash if ship is sent without args
This commit is contained in:
parent
b92702548d
commit
bca018520a
1 changed files with 1 additions and 1 deletions
|
@ -332,7 +332,7 @@ def cmd_eat(bot: Bot, update: Update):
|
||||||
def cmd_ship(bot: Bot, update: Update):
|
def cmd_ship(bot: Bot, update: Update):
|
||||||
try:
|
try:
|
||||||
_, name_one, name_two = update.message.text.split(" ", 2)
|
_, 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"
|
bot.send_message(update.message.chat.id, "⚠️ Non hai specificato correttamente i due nomi!\n"
|
||||||
"Sintassi corretta: `/ship <nome> <nome>`", parse_mode="Markdown")
|
"Sintassi corretta: `/ship <nome> <nome>`", parse_mode="Markdown")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue