diff options
| author | 2020-02-16 13:23:56 -0800 | |
|---|---|---|
| committer | 2020-02-16 13:32:05 -0800 | |
| commit | 8cdbec386d50e5866dcfd7cc0aeee359bb182317 (patch) | |
| tree | fb77e04d5ccd3950550f5d0222e3c8c99607ed56 | |
| parent | Error handler: handle TooManyArguments (diff) | |
Error handler: handle BadUnionArgument
Send a message specifying the parameter name, the converters used, and
the last error message from the converters.
| -rw-r--r-- | bot/cogs/error_handler.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index 5cf95e71a..d67261fc6 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -122,6 +122,8 @@ class ErrorHandler(Cog): elif isinstance(e, errors.BadArgument): await ctx.send(f"Bad argument: {e}\n") await ctx.invoke(*help_command) + elif isinstance(e, errors.BadUnionArgument): + await ctx.send(f"Bad argument: {e}\n```{e.errors[-1]}```") else: await ctx.send("Something about your input seems off. Check the arguments:") await ctx.invoke(*help_command) |