fix(AutocompleteInteraction): Fix responding (#9315)

This commit is contained in:
Jiralite 2023-04-02 11:42:30 +01:00 committed by GitHub
parent 48f7193ef1
commit f79a9b5450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,7 +96,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,
});