Files
discordeno/examples/beginner/src/utils/updateCommands.ts
Skillz4Killz 3bbb03b8e3 cleanup cleanup cleanup on isle dd (#2792)
* cleanup cleanup cleanup on isle dd

* fix: rest manager import in test
2023-02-25 20:11:15 -06:00

20 lines
494 B
TypeScript

import { Bot } from '../../bot.ts.js'
import { configs } from '../../configs.ts.js'
export async function updateApplicationCommands() {
await Bot.helpers.upsertGlobalApplicationCommands(
Bot.commands
// ONLY GLOBAL COMMANDS
.filter((command) => !command.devOnly)
.array(),
)
await Bot.helpers.upsertGuildApplicationCommands(
configs.devGuildId,
Bot.commands
// ONLY GLOBAL COMMANDS
.filter((command) => !!command.devOnly)
.array(),
)
}