[commands] Update Bot.command() decorator docs
This commit is contained in:
parent
367c4b5fd2
commit
af88fc19b3
@ -1237,6 +1237,11 @@ class GroupMixin:
|
|||||||
def command(self, *args, **kwargs):
|
def command(self, *args, **kwargs):
|
||||||
"""A shortcut decorator that invokes :func:`.command` and adds it to
|
"""A shortcut decorator that invokes :func:`.command` and adds it to
|
||||||
the internal command list via :meth:`~.GroupMixin.add_command`.
|
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):
|
def decorator(func):
|
||||||
kwargs.setdefault('parent', self)
|
kwargs.setdefault('parent', self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user