fix: autocomplete choices

This commit is contained in:
Skillz4Killz
2021-12-06 23:58:36 +00:00
committed by GitHub
parent 5b2bc76915
commit 99bc8fb6b8
2 changed files with 4 additions and 1 deletions

View File

@@ -142,6 +142,7 @@ export async function sendInteractionResponse(
}),
})),
flags: options.data.flags,
choices: options.data.choices,
};
// A reply has never been send
@@ -150,7 +151,6 @@ export async function sendInteractionResponse(
type: options.type,
data,
});
}
// If its already been executed, we need to send a followup response

View File

@@ -3,6 +3,7 @@ import { Embed } from "../../embeds/embed.ts";
import { AllowedMentions } from "../../messages/allowedMentions.ts";
import { MessageComponents } from "../../messages/components/messageComponents.ts";
import { CreateMessage } from "../../messages/createMessage.ts";
import { ApplicationCommandOptionChoice } from "./applicationCommandOptionChoice.ts";
/** https://discord.com/developers/docs/interactions/slash-commands#interaction-response-interactionapplicationcommandcallbackdata */
export interface InteractionApplicationCommandCallbackData {
@@ -29,4 +30,6 @@ export interface InteractionApplicationCommandCallbackData {
components?: MessageComponents;
/** Set to `64` to make your response ephemeral */
flags?: number;
/** autocomplete choices (max of 25 choices) */
choices?: ApplicationCommandOptionChoice[];
}