From cc3e714338e02eaddfacbf465d58655b8f6e9bf4 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 11 May 2022 03:20:57 -0400 Subject: [PATCH] Fix typo in documentation and mention name kwarg interaction --- docs/ext/commands/commands.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ext/commands/commands.rst b/docs/ext/commands/commands.rst index d3dc47c28..dbae2e871 100644 --- a/docs/ext/commands/commands.rst +++ b/docs/ext/commands/commands.rst @@ -920,7 +920,7 @@ This means that decorators that refer to a parameter by name will use the flag n async def ban(ctx, *, flags: BanFlags): ... -For ease of use, the :func:`~ext.commands.flag` function accepts a ``descriptor`` keyword argument to allow you to pass descriptions inline: +For ease of use, the :func:`~ext.commands.flag` function accepts a ``description`` keyword argument to allow you to pass descriptions inline: .. code-block:: python3 @@ -935,6 +935,8 @@ For ease of use, the :func:`~ext.commands.flag` function accepts a ``descriptor` ... +Likewise, use of the ``name`` keyword argument allows you to pass renames for the parameter, similar to the :func:`~discord.app_commands.rename` decorator. + Note that in hybrid command form, a few annotations are unsupported due to Discord limitations: - :data:`typing.Tuple`