mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
* 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
24 lines
562 B
TypeScript
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> }
|