[commands] Unify Command.handle_local_error into general dispatcher.

This commit is contained in:
Rapptz
2016-06-05 00:35:27 -04:00
parent 661645ac97
commit b9c7b05176
2 changed files with 11 additions and 9 deletions

View File

@@ -641,8 +641,7 @@ class Bot(GroupMixin, discord.Client):
try:
yield from command.invoke(ctx)
except CommandError as e:
command.handle_local_error(e, ctx)
self.dispatch('command_error', e, ctx)
command.dispatch_error(e, ctx)
else:
self.dispatch('command_completion', command, ctx)
else: