1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00

Don't crash if bridge is sent without args

This commit is contained in:
Steffo 2018-11-07 19:34:17 +01:00
parent 3d163b1736
commit b92702548d

View file

@ -376,6 +376,7 @@ def cmd_bridge(bot: Bot, update: Update):
except IndexError: except IndexError:
bot.send_message(update.message.chat.id, "⚠ Non hai specificato un comando!\n" bot.send_message(update.message.chat.id, "⚠ Non hai specificato un comando!\n"
"Sintassi corretta: `/bridge <comando> <argomenti>`", parse_mode="Markdown") "Sintassi corretta: `/bridge <comando> <argomenti>`", parse_mode="Markdown")
return
discord_connection.send(f"!{data}") discord_connection.send(f"!{data}")
result = discord_connection.recv() result = discord_connection.recv()
if result == "error": if result == "error":