Skip to content

Commit bac6150

Browse files
Update discord_slash/utils/manage_commands.py
LGTM Co-authored-by: AnotherCat <anothercat1259@gmail.com>
1 parent 9be4dc9 commit bac6150

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord_slash/utils/manage_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def create_option(name: str,
158158
:return: dict
159159
160160
.. note::
161-
a field with the value of ``False`` for ``required`` will return NOTHING if it is not filled. if you wish to have it default to something if not filled,_
162-
append ``argname = None`` to the ``async def`` portion of the command.
161+
An option with ``required=False`` will not pass anything to the command function if the user doesn't pass that option when invoking the command.
162+
You must set the the relevant argument's function to a default argument, eg ``argname = None``.
163163
164164
.. note::
165165
``choices`` must either be a list of `option type dicts <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice>`_

0 commit comments

Comments
 (0)