mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 10:49:24 +00:00
Add missing decorator signs for interaction documentation
This commit is contained in:
parent
507975e56d
commit
354d4bace4
@ -1908,7 +1908,7 @@ class Group:
|
|||||||
auto_locale_strings: bool = True,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:
|
) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:
|
||||||
"""Creates an application command under this group.
|
"""A decorator that creates an application command from a regular function under this group.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
------------
|
------------
|
||||||
|
@ -842,7 +842,7 @@ class CommandTree(Generic[ClientT]):
|
|||||||
auto_locale_strings: bool = True,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[CommandCallback[Group, P, T]], Command[Group, P, T]]:
|
) -> Callable[[CommandCallback[Group, P, T]], Command[Group, P, T]]:
|
||||||
"""Creates an application command directly under this tree.
|
"""A decorator that creates an application command from a regular function directly under this tree.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
------------
|
------------
|
||||||
@ -911,7 +911,7 @@ class CommandTree(Generic[ClientT]):
|
|||||||
auto_locale_strings: bool = True,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[ContextMenuCallback], ContextMenu]:
|
) -> Callable[[ContextMenuCallback], ContextMenu]:
|
||||||
"""Creates an application command context menu from a regular function directly under this tree.
|
"""A decorator that creates an application command context menu from a regular function directly under this tree.
|
||||||
|
|
||||||
This function must have a signature of :class:`~discord.Interaction` as its first parameter
|
This function must have a signature of :class:`~discord.Interaction` as its first parameter
|
||||||
and taking either a :class:`~discord.Member`, :class:`~discord.User`, or :class:`~discord.Message`,
|
and taking either a :class:`~discord.Member`, :class:`~discord.User`, or :class:`~discord.Message`,
|
||||||
|
@ -472,6 +472,16 @@ CommandTree
|
|||||||
|
|
||||||
.. autoclass:: discord.app_commands.CommandTree
|
.. autoclass:: discord.app_commands.CommandTree
|
||||||
:members:
|
:members:
|
||||||
|
:exclude-members: error, command, context_menu
|
||||||
|
|
||||||
|
.. automethod:: CommandTree.command(*, name=..., description=..., nsfw=False, guild=..., guilds=..., auto_locale_strings=True, extras=...)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
|
.. automethod:: CommandTree.context_menu(*, name=..., nsfw=False, guild=..., guilds=..., auto_locale_strings=True, extras=...)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
|
.. automethod:: CommandTree.error(coro)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
Commands
|
Commands
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
@ -483,6 +493,13 @@ Command
|
|||||||
|
|
||||||
.. autoclass:: discord.app_commands.Command
|
.. autoclass:: discord.app_commands.Command
|
||||||
:members:
|
:members:
|
||||||
|
:exclude-members: error, autocomplete
|
||||||
|
|
||||||
|
.. automethod:: Command.autocomplete(name)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
|
.. automethod:: Command.error(coro)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
Parameter
|
Parameter
|
||||||
++++++++++
|
++++++++++
|
||||||
@ -499,6 +516,10 @@ ContextMenu
|
|||||||
|
|
||||||
.. autoclass:: discord.app_commands.ContextMenu
|
.. autoclass:: discord.app_commands.ContextMenu
|
||||||
:members:
|
:members:
|
||||||
|
:exclude-members: error
|
||||||
|
|
||||||
|
.. automethod:: ContextMenu.error(coro)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
Group
|
Group
|
||||||
++++++
|
++++++
|
||||||
@ -507,6 +528,13 @@ Group
|
|||||||
|
|
||||||
.. autoclass:: discord.app_commands.Group
|
.. autoclass:: discord.app_commands.Group
|
||||||
:members:
|
:members:
|
||||||
|
:exclude-members: error, command
|
||||||
|
|
||||||
|
.. automethod:: Group.command(*, name=..., description=..., nsfw=False, auto_locale_strings=True, extras=...)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
|
.. automethod:: Group.error(coro)
|
||||||
|
:decorator:
|
||||||
|
|
||||||
Decorators
|
Decorators
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
Loading…
x
Reference in New Issue
Block a user