diff options
| author | 2020-02-16 13:17:03 -0800 | |
|---|---|---|
| committer | 2020-02-16 13:17:03 -0800 | |
| commit | 6fa0ba18a6b4daa265e6716f9d360117378c67ab (patch) | |
| tree | 50dd48e9426e79c1c96d014dcca9d7969a03cbff | |
| parent | Error handler: handle MissingRequiredArgument (diff) | |
Error handler: handle TooManyArguments
Send a message specifying the error reason.
| -rw-r--r-- | bot/cogs/error_handler.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index ffb36d10a..5cf95e71a 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -116,6 +116,9 @@ class ErrorHandler(Cog): if isinstance(e, errors.MissingRequiredArgument): await ctx.send(f"Missing required argument `{e.param.name}`.") await ctx.invoke(*help_command) + elif isinstance(e, errors.TooManyArguments): + await ctx.send(f"Too many arguments provided.") + await ctx.invoke(*help_command) elif isinstance(e, errors.BadArgument): await ctx.send(f"Bad argument: {e}\n") await ctx.invoke(*help_command) |