[commands] Re-order error handler arguments.

They now have Context as the first argument to be consistent with other
context-passing functions.
This commit is contained in:
Rapptz
2017-05-10 17:49:42 -04:00
parent 6b063deda9
commit a2c9cefac9
2 changed files with 7 additions and 7 deletions

View File

@@ -740,13 +740,13 @@ class BotBase(GroupMixin):
try:
yield from ctx.command.invoke(ctx)
except CommandError as e:
yield from ctx.command.dispatch_error(e, ctx)
yield from ctx.command.dispatch_error(ctx, e)
else:
ctx.command_failed = False
self.dispatch('command_completion', ctx)
elif ctx.invoked_with:
exc = CommandNotFound('Command "{}" is not found'.format(ctx.invoked_with))
self.dispatch('command_error', exc, ctx)
self.dispatch('command_error', ctx, exc)
@asyncio.coroutine
def process_commands(self, message):