diff --git a/royalnet/bots/discord.py b/royalnet/bots/discord.py index 4b9660f7..776109e4 100644 --- a/royalnet/bots/discord.py +++ b/royalnet/bots/discord.py @@ -121,6 +121,9 @@ class DiscordBot(GenericBot): with message.channel.typing(): try: await command.run(CommandArgs(parameters), data=data) + except InvalidInputError as e: + await data.reply(f":warning: {' '.join(e.args)}\n" + f"Syntax: [c]/{command.name} {command.syntax}[/c]") except Exception as e: sentry_sdk.capture_exception(e) error_message = f"{e.__class__.__name__}\n" diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index 70ccbc0b..dee2d610 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -174,6 +174,9 @@ class TelegramBot(GenericBot): # Run the command try: await command.run(CommandArgs(parameters), data) + except InvalidInputError as e: + await data.reply(f"⚠️ {' '.join(e.args)}\n" + f"Syntax: [c]/{command.name} {command.syntax}[/c]") except Exception as e: sentry_sdk.capture_exception(e) error_message = f"⛔️ [b]{e.__class__.__name__}[/b]\n"