[commands] Implement commands.parameter

This commit is contained in:
James Hilton-Balfe authored and GitHub committed 2022-04-04 18:01:21 -04:00
1 parent deb7958797
commit 55c5be78cf
11 files changed
+435 -148

No files matched your search

+29
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