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

View File

@@ -96,7 +96,7 @@ class AutocompleteInteraction extends Interaction {
await this.client.api.interactions(this.id, this.token).callback.post({ await this.client.api.interactions(this.id, this.token).callback.post({
data: { data: {
type: InteractionResponseTypes.APPLICATION_COMMAND_AUTOCOMPLETE_RESULT, 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, auth: false,
}); });