aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJames <[email protected]>2021-04-10 12:27:32 +0100
committerGitHub <[email protected]>2021-04-10 07:27:32 -0400
commitbcd3a00eaff85262db6903cf194fea563825ad4b (patch)
tree0e14d3789cf6b3c771146d94da8daf24fe031b96 /docs
parentMake the style of external and internal cross-references consistent (diff)
downloaddiscord.py-bcd3a00eaff85262db6903cf194fea563825ad4b.tar.xz
discord.py-bcd3a00eaff85262db6903cf194fea563825ad4b.zip
[commands] Make `commands.Greedy` a `typing.Generic`
Diffstat (limited to 'docs')
-rw-r--r--docs/ext/commands/api.rst22
1 files changed, 1 insertions, 21 deletions
diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst
index 6fa552d6..9c1e3817 100644
--- a/docs/ext/commands/api.rst
+++ b/docs/ext/commands/api.rst
@@ -323,27 +323,7 @@ Converters
.. autoclass:: discord.ext.commands.clean_content
:members:
-.. data:: ext.commands.Greedy
-
- A special converter that greedily consumes arguments until it can't.
- As a consequence of this behaviour, most input errors are silently discarded,
- since it is used as an indicator of when to stop parsing.
-
- When a parser error is met the greedy converter stops converting, undoes the
- internal string parsing routine, and continues parsing regularly.
-
- For example, in the following code:
-
- .. code-block:: python3
-
- @commands.command()
- async def test(ctx, numbers: Greedy[int], reason: str):
- await ctx.send(f"numbers: {numbers}, reason: {reason}")
-
- An invocation of ``[p]test 1 2 3 4 5 6 hello`` would pass ``numbers`` with
- ``[1, 2, 3, 4, 5, 6]`` and ``reason`` with ``hello``\.
-
- For more information, check :ref:`ext_commands_special_converters`.
+.. autoclass:: ext.commands.Greedy()
.. _ext_commands_api_errors: