Skip to content

Commit

Permalink
Return autocomplete function after wrapping it
Browse files Browse the repository at this point in the history
  • Loading branch information
4Kaylum committed Sep 18, 2023
1 parent 966feaa commit 3abdc55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion novus/ext/client/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async def run(
async def __call__(self, *args, **kwargs) -> Any:
return await self.callback(self.owner, *args, **kwargs)

def autocomplete(self, func: AutocompleteCallback) -> None:
def autocomplete(self, func: AutocompleteCallback) -> AutocompleteCallback:
"""
Add an autocomplete to this command.
Expand All @@ -302,6 +302,7 @@ async def echo_autocomplete(self, ctx: novus.Interaction):
"""

self._autocomplete = func
return func

async def run_autocomplete(
self,
Expand Down

0 comments on commit 3abdc55

Please sign in to comment.