aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-16 17:23:43 -0800
committerGravatar MarkKoz <[email protected]>2020-02-16 17:23:43 -0800
commit4116aca0218138dd1a97db39b942a886945fa05b (patch)
tree8ce3c8aa2b0a75884c5d17d44cc95fe71a27aec8
parentError handler: handle BadUnionArgument (diff)
Error handler: handle ArgumentParsingError
Simply send the error message with the help command.
-rw-r--r--bot/cogs/error_handler.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py
index d67261fc6..07b93283d 100644
--- a/bot/cogs/error_handler.py
+++ b/bot/cogs/error_handler.py
@@ -124,6 +124,8 @@ class ErrorHandler(Cog):
await ctx.invoke(*help_command)
elif isinstance(e, errors.BadUnionArgument):
await ctx.send(f"Bad argument: {e}\n```{e.errors[-1]}```")
+ elif isinstance(e, errors.ArgumentParsingError):
+ await ctx.send(f"Argument parsing error: {e}")
else:
await ctx.send("Something about your input seems off. Check the arguments:")
await ctx.invoke(*help_command)