mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 11:26:51 +00:00
[commands] Add Cog.has_app_command_error_handler
This commit is contained in:
parent
531795b23d
commit
d0625154ed
@ -519,6 +519,13 @@ class Cog(metaclass=CogMeta):
|
|||||||
"""
|
"""
|
||||||
return not hasattr(self.cog_command_error.__func__, '__cog_special_method__')
|
return not hasattr(self.cog_command_error.__func__, '__cog_special_method__')
|
||||||
|
|
||||||
|
def has_app_command_error_handler(self) -> bool:
|
||||||
|
""":class:`bool`: Checks whether the cog has an app error handler.
|
||||||
|
|
||||||
|
.. versionadded:: 2.1
|
||||||
|
"""
|
||||||
|
return not hasattr(self.cog_app_command_error.__func__, '__cog_special_method__')
|
||||||
|
|
||||||
@_cog_special_method
|
@_cog_special_method
|
||||||
async def cog_load(self) -> None:
|
async def cog_load(self) -> None:
|
||||||
"""|maybecoro|
|
"""|maybecoro|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user