Skip to content

Commit

Permalink
📝 Move docstring to getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Paillat-dev committed Dec 14, 2024
1 parent 9121251 commit b46e70e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions discord/commands/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,6 @@ def __repr__(self):

@property
def autocomplete(self):
return self._autocomplete

@autocomplete.setter
def autocomplete(self, value) -> None:
"""
The autocomplete handler for the option. Accepts a callable (sync or async)
that takes a single required argument of :class:`AutocompleteContext`.
Expand All @@ -413,6 +409,10 @@ def autocomplete(self, value) -> None:
.. note::
Does not validate the input value against the autocomplete results.
"""
return self._autocomplete

@autocomplete.setter
def autocomplete(self, value) -> None:
self._autocomplete = value
# this is done here so it does not have to be computed every time the autocomplete is invoked
if self._autocomplete is not None:
Expand Down

0 comments on commit b46e70e

Please sign in to comment.