Browse Source

[commands] Document that cog_command_error must be async

pull/4088/head
Xua 5 years ago
committed by Rapptz
parent
commit
4e6942194f
  1. 4
      discord/ext/commands/cog.py

4
discord/ext/commands/cog.py

@ -312,14 +312,14 @@ class Cog(metaclass=CogMeta):
return True return True
@_cog_special_method @_cog_special_method
def cog_command_error(self, ctx, error): async def cog_command_error(self, ctx, error):
"""A special method that is called whenever an error """A special method that is called whenever an error
is dispatched inside this cog. is dispatched inside this cog.
This is similar to :func:`.on_command_error` except only applying This is similar to :func:`.on_command_error` except only applying
to the commands inside this cog. to the commands inside this cog.
This function **can** be a coroutine. This **must** be a coroutine.
Parameters Parameters
----------- -----------

Loading…
Cancel
Save