You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: discord_slash/utils/manage_commands.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -156,7 +156,11 @@ def create_option(name: str,
156
156
:param required: Whether this option is required.
157
157
:param choices: Choices of the option. Can be empty.
158
158
: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
+
160
164
.. note::
161
165
``choices`` must either be a list of `option type dicts <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice>`_
0 commit comments