[commands] Implement commands.parameter

This commit is contained in:
James Hilton-Balfe
2022-04-04 23:01:21 +01:00
committed by GitHub
parent deb7958797
commit 55c5be78cf
11 changed files with 435 additions and 148 deletions

View File

@ -429,6 +429,35 @@ Flag Converter
.. autofunction:: discord.ext.commands.flag
Defaults
--------
.. autoclass:: discord.ext.commands.Parameter()
:members:
.. autofunction:: discord.ext.commands.parameter
.. autofunction:: discord.ext.commands.param
.. data:: discord.ext.commands.Author
A default :class:`.Parameter` which returns the :attr:`~.Context.author` for this context.
.. versionadded:: 2.0
.. data:: discord.ext.commands.CurrentChannel
A default :class:`.Parameter` which returns the :attr:`~.Context.channel` for this context.
.. versionadded:: 2.0
.. data:: discord.ext.commands.CurrentGuild
A default :class:`.Parameter` which returns the :attr:`~.Context.guild` for this context. This will never be ``None``.
.. versionadded:: 2.0
.. _ext_commands_api_errors:
Exceptions