[commands] Copy on_error handlers in Command.copy
This fixes the issue of error handlers not applying.
This commit is contained in:
parent
f15cf7c845
commit
ac6e55353a
@ -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…
x
Reference in New Issue
Block a user