[General] Fix usage in choose help (#5015)

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
This commit is contained in:
TrustyJAID 2021-05-26 03:23:46 -06:00 committed by GitHub
parent b8b8a38fbd
commit 631adc282f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -62,18 +62,22 @@ choose
.. code-block:: none .. code-block:: none
[p]choose [choices...] [p]choose <first> <second> [others...]
**Description** **Description**
Choose between multiple options. Choose between multiple options.
Options are separated by spaces.
.. note:: To denote options which include whitespace, you should use .. note:: There must be at least 2 options to pick from.
double quotes. .. note:: To denote options which include whitespace, you should enclose the option in double quotes.
**Arguments** **Arguments**
* ``[choices...]``: The arguments for Red to randomly choose from. * ``<first>``: The first mandatory option.
* ``<second>``: The second mandatory option.
* ``[others...]``: Any remaining optional options.
.. _general-command-flip: .. _general-command-flip:

View File

@ -80,12 +80,14 @@ class General(commands.Cog):
""" Nothing to delete """ """ Nothing to delete """
return return
@commands.command(usage="<choice> <choices...>") @commands.command(usage="<first> <second> [others...]")
async def choose(self, ctx, *choices): async def choose(self, ctx, *choices):
"""Choose between multiple options. """Choose between multiple options.
To denote options which include whitespace, you should use There must be at least 2 options to pick from.
double quotes. Options are separated by spaces.
To denote options which include whitespace, you should enclose the options in double quotes.
""" """
choices = [escape(c, mass_mentions=True) for c in choices if c] choices = [escape(c, mass_mentions=True) for c in choices if c]
if len(choices) < 2: if len(choices) < 2: