Files
discordeno/plugins/helpers/src/sendAutoCompleteChoices.ts
ITOH 81f8e0377c style: move to deno fmt (#1992)
* Create deno.json

* run format

* run format

* ci: only check formatting

* f

* Update settings.json

* Update settings.json
2022-02-04 15:00:04 +01:00

16 lines
472 B
TypeScript

import { ApplicationCommandOptionChoice, Bot, InteractionResponseTypes } from "../deps.ts";
export async function sendAutocompleteChoices(
bot: Bot,
interactionId: bigint,
interactionToken: string,
choices: ApplicationCommandOptionChoice[],
): Promise<void> {
await bot.helpers.sendInteractionResponse(interactionId, interactionToken, {
type: InteractionResponseTypes.ApplicationCommandAutocompleteResult,
data: {
choices: choices,
},
});
}