Skip to content

Commit 04e2bc8

Browse files
authored
Update commands.py
1 parent 0a39352 commit 04e2bc8

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
@@ -535,12 +535,12 @@ async def _invoke(self, ctx: ApplicationContext) -> None:
535535
async def invoke_autocomplete_callback(self, ctx: AutocompleteContext):
536536
values = { i.name: i.default for i in self.options }
537537

538-
for op in interaction.data.get("options", []):
538+
for op in ctx.interaction.data.get("options", []):
539539
if op.get("focused", False):
540540
option = find(lambda o: o.name == op["name"], self.options)
541541
values.update({
542542
i["name"]:i["value"]
543-
for i in interaction.data["options"]
543+
for i in ctx.interaction.data["options"]
544544
})
545545
ctx.command = self
546546
ctx.focused = option

0 commit comments

Comments
 (0)