Skip to content

Commit 2abfa34

Browse files
authored
docs: Document @option.parameter_name (#2054)
Document parameter_name
1 parent ea95c35 commit 2abfa34

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

discord/commands/options.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ def option(name, type=None, **kwargs):
395395
"""A decorator that can be used instead of typehinting :class:`Option`.
396396
397397
.. versionadded:: 2.0
398+
399+
Attributes
400+
----------
401+
parameter_name: :class:`str`
402+
The name of the target parameter this option is mapped to.
403+
This allows you to have a separate UI ``name`` and parameter name.
398404
"""
399405

400406
def decorator(func):

0 commit comments

Comments
 (0)