aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXua <[email protected]>2020-05-08 21:48:44 +1200
committerRapptz <[email protected]>2020-05-10 16:48:59 -0400
commit4e6942194f9578f5b999fb98a971f18323fc9da7 (patch)
tree8c1920ed2b323fd8d2c233c606dd14a74992759b
parentadd support for allowed_mentions with message edit (diff)
downloaddiscord.py-4e6942194f9578f5b999fb98a971f18323fc9da7.tar.xz
discord.py-4e6942194f9578f5b999fb98a971f18323fc9da7.zip
[commands] Document that cog_command_error must be async
-rw-r--r--discord/ext/commands/cog.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py
index fc4d43e2..5c81e4a5 100644
--- a/discord/ext/commands/cog.py
+++ b/discord/ext/commands/cog.py
@@ -312,14 +312,14 @@ class Cog(metaclass=CogMeta):
return True
@_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
is dispatched inside this cog.
This is similar to :func:`.on_command_error` except only applying
to the commands inside this cog.
- This function **can** be a coroutine.
+ This **must** be a coroutine.
Parameters
-----------