Files
discordeno/examples/beginner/src/bot.ts
T
FlenyandLink f199bbf71c build(dev-deps): Update biome to v2 (#4246)
* update biome to v2

* Run biome check --write

* Update biome.jsonc

Co-authored-by: Link <lts20050703@gmail.com>

* Fix config error

* Bump biome version

* Update website/yarn.lock

* Update biome to 2.1.3

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-09 12:45:04 -05:00

36 lines
643 B
TypeScript

import { createBot, Intents } from '@discordeno/bot'
import { createProxyCache } from 'dd-cache-proxy'
import { configs } from './config.js'
const rawBot = createBot({
token: configs.token,
intents: Intents.Guilds,
desiredProperties: {
interaction: {
id: true,
type: true,
data: true,
user: true,
token: true,
guildId: true,
},
guild: {
id: true,
name: true,
},
user: {
username: true,
},
},
})
export const bot = createProxyCache(rawBot, {
desiredProps: {
guild: ['id', 'name'],
},
cacheInMemory: {
guild: true,
default: false,
},
})