Files
discordeno/examples/minimal/src/bot.ts
Fleny 4939822434 docs: Update desired properties docs (#3940)
* Update docs for desired properties

* Update examples to use createBot desiredProperties

The BigBot and reaction roles examples use the Discordeno CLI

* Migrate examples to v19 stable

* Docs work
2024-11-19 16:40:01 -06:00

24 lines
562 B
TypeScript

import { Collection, Intents, createBot } from '@discordeno/bot'
import { configs } from './config.js'
import type { Command } from './types/commands.js'
const rawBot = createBot({
token: configs.token,
intents: Intents.Guilds,
desiredProperties: {
interaction: {
id: true,
type: true,
data: true,
token: true,
},
},
})
export const bot = rawBot as BotWithCommands
// Create the command collection
bot.commands = new Collection()
export type BotWithCommands = typeof rawBot & { commands: Collection<string, Command> }