aboutsummaryrefslogtreecommitdiff
path: root/docs/ext/commands
diff options
context:
space:
mode:
authorRapptz <[email protected]>2018-09-24 23:39:25 -0400
committerRapptz <[email protected]>2018-09-24 23:39:25 -0400
commit99b1390e5aae363df994d3f36420206a78f82147 (patch)
tree37ec0a1a518a63da284623c97682b15638287490 /docs/ext/commands
parentOptimise tight loops in DiscordGateway.received_message (diff)
downloaddiscord.py-99b1390e5aae363df994d3f36420206a78f82147.tar.xz
discord.py-99b1390e5aae363df994d3f36420206a78f82147.zip
[commands] Elaborate more on disallowed types in Greedy and Optional
Diffstat (limited to 'docs/ext/commands')
-rw-r--r--docs/ext/commands/api.rst2
-rw-r--r--docs/ext/commands/commands.rst7
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst
index 936a76b6..34fa311d 100644
--- a/docs/ext/commands/api.rst
+++ b/docs/ext/commands/api.rst
@@ -185,7 +185,7 @@ Converters
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, it undos the
+ 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:
diff --git a/docs/ext/commands/commands.rst b/docs/ext/commands/commands.rst
index 0a7b8689..f268c7ad 100644
--- a/docs/ext/commands/commands.rst
+++ b/docs/ext/commands/commands.rst
@@ -471,6 +471,10 @@ Consider the following example:
In this example, since the argument could not be converted into an ``int``, the default of ``99`` is passed and the parser
resumes handling, which in this case would be to pass it into the ``liquid`` parameter.
+.. note::
+
+ This converter only works in regular positional parameters, not variable parameters or keyword-only parameters.
+
Greedy
^^^^^^^^
@@ -533,6 +537,9 @@ This command can be invoked any of the following ways:
unintended parsing ambiguities in your code. One technique would be to clamp down the expected syntaxes
allowed through custom converters or reordering the parameters to minimise clashes.
+ To help aid with some parsing ambiguities, :class:`str`, ``None`` and :data:`~ext.commands.Greedy` are
+ forbidden as parameters for the :data:`~ext.commands.Greedy` converter.
+
.. _ext_commands_error_handler:
Error Handling