Files
bot/adapters/discord/src/actions/publish-commands.ts
mo bc0a6f2526 add greeting
add locales
2026-02-22 00:09:27 +01:00

20 lines
511 B
TypeScript

import { config } from "config";
import { Routes } from "discord.js";
import getCommands from "entities/commands";
import { logger } from "lib/common-logger";
import { discordRestClient } from "lib/rest-client";
export const publishCommands = async () => {
try {
await discordRestClient.put(
Routes.applicationCommands(config.discord.applicationId),
{
body: getCommands(),
},
);
logger.info("successfully added commands");
} catch (e) {
logger.error("failed to add commands:", e);
}
};