Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix incorrect documentation about discord.Option.autocomplete #2265

Merged
merged 7 commits into from
Feb 2, 2024
Merged
8 changes: 4 additions & 4 deletions discord/commands/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ class Option:
max_length: Optional[:class:`int`]
The maximum length of the string that can be entered. Must be between 1 and 6000 (inclusive).
Only applies to Options with an :attr:`input_type` of :class:`str`.
autocomplete: Optional[:class:`Any`]
The autocomplete handler for the option. Accepts an iterable of :class:`str` or :class:`OptionChoice`, a callable (sync or async)
that takes a single argument of :class:`AutocompleteContext`, or a coroutine.
Must resolve to an iterable of :class:`str` or :class:`OptionChoice`.
autocomplete: Optional[Callable[[:class:`.AutocompleteContext`], Awaitable[Union[Iterable[:class:`.OptionChoice`], Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]]
The autocomplete handler for the option. Accepts a callable (sync or async)
that takes a single argument of :class:`AutocompleteContext`.
:func:`discord.utils.basic_autocomplete` may be used to create the callable.
Blue-Robin-Taken marked this conversation as resolved.
Show resolved Hide resolved

.. note::

Expand Down
Loading