mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
21 lines
486 B
TypeScript
21 lines
486 B
TypeScript
import {
|
|
ApplicationCommandOptionChoice,
|
|
BigString,
|
|
Bot,
|
|
InteractionResponseTypes
|
|
} from '@discordeno/bot'
|
|
|
|
export async function sendAutocompleteChoices (
|
|
bot: Bot,
|
|
interactionId: BigString,
|
|
interactionToken: string,
|
|
choices: ApplicationCommandOptionChoice[]
|
|
): Promise<void> {
|
|
await bot.helpers.sendInteractionResponse(interactionId, interactionToken, {
|
|
type: InteractionResponseTypes.ApplicationCommandAutocompleteResult,
|
|
data: {
|
|
choices
|
|
}
|
|
})
|
|
}
|