import { Intents, type InteractionTypes } from '@discordeno/types' import type { DiscordInteractionData} from '@discordeno/types' import type { Bot, CompleteDesiredProperties, DesiredPropertiesBehavior } from 'discordeno' export const intents = [ Intents.GuildModeration, Intents.GuildWebhooks, Intents.GuildExpressions, Intents.GuildScheduledEvents, Intents.GuildMessagePolls, Intents.GuildIntegrations, Intents.GuildInvites, Intents.GuildMessageReactions, Intents.GuildPresences, Intents.DirectMessages, Intents.DirectMessageReactions, Intents.GuildMembers, Intents.Guilds, Intents.GuildInvites, Intents.GuildMessages, ] as const export const createBotParameters = { intents: intents.reduce((acc, curr) => acc | curr, Intents.Guilds), desiredProperties: { interaction: { id: true, data: true, type: true, token: true, message: true, channelId: true, channel: true, guildId: true, guild: true, user: true, member: true, }, message: { id: true, member: true, guildId: true, }, }, } as const // Extract the type of desired properties from our parameters type ExtractedDesiredProperties = typeof createBotParameters.desiredProperties // The BotType uses the CompleteDesiredProperties helper to fill in the missing properties export type BotType = Bot, DesiredPropertiesBehavior.RemoveKey> // Type for the interaction reference passed to workflows/activities export interface InteractionRef { id: bigint token: string type: InteractionTypes acknowledged?: boolean } // Type for the complete interaction handling payload export interface InteractionCreatePayload { ref: InteractionRef data: DiscordInteractionData }