Skip to content

Commit f259089

Browse files
Formatting
1 parent 2a319bd commit f259089

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/commands/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,14 +542,14 @@ async def invoke_autocomplete_callback(self, ctx: AutocompleteContext):
542542
ctx.options = values
543543

544544
if len(inspect.signature(option.autocomplete).parameters) == 2:
545-
result = option.autocomplete(getattr(option.autocomplete, "__self__", ctx.cog), ctx)
545+
instance = getattr(option.autocomplete, "__self__", ctx.cog)
546+
result = option.autocomplete(instance, ctx)
546547
else:
547548
result = option.autocomplete(ctx)
548549

549550
if asyncio.iscoroutinefunction(option.autocomplete):
550551
result = await result
551552

552-
553553
choices = [
554554
o if isinstance(o, OptionChoice) else OptionChoice(o)
555555
for o in result

0 commit comments

Comments
 (0)