Files
discordeno/template/beginner/src/utils/updateCommands.ts
ITOH 5f25263bd4 chore(template): to main repo (#1988)
* chore: move template to main repo

* ci

* Update sync_repos.yml
2022-02-03 18:02:44 +00:00

20 lines
481 B
TypeScript

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