Browse Source

[commands] Copy on_error handlers in Command.copy

This fixes the issue of error handlers not applying.
pull/1929/head
Rapptz 6 years ago
parent
commit
ac6e55353a
  1. 4
      discord/ext/commands/core.py

4
discord/ext/commands/core.py

@ -270,6 +270,10 @@ class Command(_BaseCommand):
ret = self.__class__(self.callback, **self.__original_kwargs__)
ret._before_invoke = self._before_invoke
ret._after_invoke = self._after_invoke
try:
ret.on_error = self.on_error
except AttributeError:
pass
return ret
def _update_copy(self, kwargs):

Loading…
Cancel
Save