[commands] Use has_error_handler instead in command_error
This commit is contained in:
parent
cc6edccc0c
commit
1c553f51fb
@ -167,11 +167,12 @@ class BotBase(GroupMixin):
|
|||||||
if self.extra_events.get('on_command_error', None):
|
if self.extra_events.get('on_command_error', None):
|
||||||
return
|
return
|
||||||
|
|
||||||
if hasattr(context.command, 'on_error'):
|
command = context.command
|
||||||
|
if command and command.has_error_handler():
|
||||||
return
|
return
|
||||||
|
|
||||||
cog = context.cog
|
cog = context.cog
|
||||||
if cog and Cog._get_overridden_method(cog.cog_command_error) is not None:
|
if cog and cog.has_error_handler():
|
||||||
return
|
return
|
||||||
|
|
||||||
print(f'Ignoring exception in command {context.command}:', file=sys.stderr)
|
print(f'Ignoring exception in command {context.command}:', file=sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user