Skip to content

Commit e50b9e9

Browse files
authored
Update manage_commands.py
1 parent c386b6f commit e50b9e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

discord_slash/utils/manage_commands.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ def create_option(name: str,
156156
:param required: Whether this option is required.
157157
:param choices: Choices of the option. Can be empty.
158158
:return: dict
159-
159+
160+
.. 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.
163+
160164
.. note::
161165
``choices`` must either be a list of `option type dicts <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice>`_
162166
or a list of single string values.

0 commit comments

Comments
 (0)