fix(AutocompleteInteraction): Fix responding

This commit is contained in:
Elysia 2023-04-06 18:01:40 +07:00
parent c47dd7dc14
commit 6d8efc6e00

View File

@ -95,7 +95,7 @@ class AutocompleteInteraction extends Interaction {
await this.client.api.interactions(this.id, this.token).callback.post({
data: {
type: InteractionResponseTypes.APPLICATION_COMMAND_AUTOCOMPLETE_RESULT,
data: { choices: { ...options, name_localizations: options.nameLocalizations } },
data: { choices: options.map(choice => ({ ...choice, name_localizations: options.nameLocalizations })) },
},
auth: false,
});