[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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user