Browse Source
[commands] Update Bot.command() decorator docs
pull/5801/head
Skye Im
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
0 deletions
-
discord/ext/commands/core.py
|
|
@ -1237,6 +1237,11 @@ class GroupMixin: |
|
|
|
def command(self, *args, **kwargs): |
|
|
|
"""A shortcut decorator that invokes :func:`.command` and adds it to |
|
|
|
the internal command list via :meth:`~.GroupMixin.add_command`. |
|
|
|
|
|
|
|
Returns |
|
|
|
-------- |
|
|
|
Callable[..., :class:`Command`] |
|
|
|
A decorator that converts the provided method into a Command, adds it to the bot, then returns it |
|
|
|
""" |
|
|
|
def decorator(func): |
|
|
|
kwargs.setdefault('parent', self) |
|
|
|