diff --git a/bot.ts b/bot.ts index e9f9dc1d3..5df0f4f14 100644 --- a/bot.ts +++ b/bot.ts @@ -152,7 +152,7 @@ import { } from "./transformers/automodActionExecution.ts"; import { routes } from "./util/routes.ts"; import { transformAllowedMentionsToDiscordAllowedMentions } from "./transformers/reverse/allowedMentions.ts"; -import { AllowedMentions } from "./mod.ts"; +import { AllowedMentions, transformApplicationCommandOptionChoiceToDiscordApplicationCommandOptionChoice, transformApplicationCommandOptionToDiscordApplicationCommandOption } from "./mod.ts"; export function createBot(options: CreateBotOptions): Bot { const bot = { @@ -410,6 +410,8 @@ export interface Transformers { team: (bot: Bot, payload: Team) => DiscordTeam; application: (bot: Bot, payload: Application) => DiscordApplication; snowflake: (snowflake: bigint) => string; + applicationCommandOption: (bot: Bot, payload: ApplicationCommandOption) => DiscordApplicationCommandOption; + applicationCommandOptionChoice: (bot: Bot, payload: ApplicationCommandOptionChoice) => DiscordApplicationCommandOptionChoice; }; snowflake: (snowflake: string) => bigint; gatewayBot: (payload: DiscordGetGatewayBot) => GetGatewayBot; @@ -470,6 +472,8 @@ export function createTransformers(options: Partial) { team: options.reverse?.team || transformTeamToDiscordTeam, application: options.reverse?.application || transformApplicationToDiscordApplication, snowflake: options.reverse?.snowflake || bigintToSnowflake, + applicationCommandOption: options.reverse?.applicationCommandOption || transformApplicationCommandOptionToDiscordApplicationCommandOption, + applicationCommandOptionChoice: options.reverse?.applicationCommandOptionChoice || transformApplicationCommandOptionChoiceToDiscordApplicationCommandOptionChoice, }, automodRule: options.automodRule || transformAutoModerationRule, automodActionExecution: options.automodActionExecution || transformAutoModerationActionExecution,