This commit is contained in:
2026-05-26 14:15:09 +09:00
parent 55d402f606
commit d6b36c43c2
33 changed files with 1496 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { REST, Routes } from "discord.js";
import { Config } from "./Config";
import { handler } from "../index";
import { Logger } from "./Logger";
async function main() {
const rest = new REST({ version: "10" }).setToken(Config.token);
const body = Array.from(handler.commands.values().filter(cmd => cmd.visible).map(cmd => cmd.metaData));
// 전역 등록 (권장: 배포 파이프라인에서만 실행)
await rest.put(Routes.applicationCommands(Config.appId), { body });
Logger.ready(`전역 슬래시 등록 요청 완료: ${body.length}`);
}
main().catch((err) => {
throw err instanceof Error ? err : new Error(String(err));
});