Add docs for added params

This commit is contained in:
Gnome 2021-09-01 14:44:24 +01:00
parent 667c8e7caa
commit 6faea43c99
3 changed files with 29 additions and 1 deletions

View File

@ -1228,6 +1228,20 @@ class Bot(BotBase, discord.Client):
the ``command_prefix`` is set to ``!``. Defaults to ``False``. the ``command_prefix`` is set to ``!``. Defaults to ``False``.
.. versionadded:: 1.7 .. versionadded:: 1.7
message_commands: Optional[:class:`bool`]
Whether to process commands based on messages.
Can be overwritten per command in the command decorators or when making
a :class:`Command` object via the ``message_command`` parameter
.. versionadded:: 2.0
slash_commands: Optional[:class:`bool`]
Whether to upload and process slash commands.
Can be overwritten per command in the command decorators or when making
a :class:`Command` object via the ``slash_command`` parameter
.. versionadded:: 2.0
""" """
async def setup(self): async def setup(self):
if not self.slash_commands: if not self.slash_commands:

View File

@ -292,11 +292,25 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
extras: :class:`dict` extras: :class:`dict`
A dict of user provided extras to attach to the Command. A dict of user provided extras to attach to the Command.
.. versionadded:: 2.0
.. note:: .. note::
This object may be copied by the library. This object may be copied by the library.
message_command: Optional[:class:`bool`]
Whether to process this command based on messages.
This overwrites the global ``message_commands`` parameter of :class:`.Bot`.
.. versionadded:: 2.0 .. versionadded:: 2.0
slash_command: Optional[:class:`bool`]
Whether to upload and process this command as a slash command.
This overwrites the global ``slash_commands`` parameter of :class:`.Bot`.
.. versionadded:: 2.0
""" """
__original_kwargs__: Dict[str, Any] __original_kwargs__: Dict[str, Any]