fix: Change command register type

This commit is contained in:
kimpure 2026-02-15 10:39:32 +00:00
parent 7d34a2b2dc
commit fb0f1d80c6
2 changed files with 2 additions and 3 deletions

View file

@ -2,7 +2,6 @@ import { Client, Events, GatewayIntentBits, REST, Routes } from "discord.js";
import { commandMap, DiscordCommand } from "./command"; import { commandMap, DiscordCommand } from "./command";
import { eventMap } from "./event"; import { eventMap } from "./event";
import { OutputHandler } from "../utils/outputHandler"; import { OutputHandler } from "../utils/outputHandler";
import { APPLICATION_ID, GUILD_ID } from "../env";
export class DiscordBot { export class DiscordBot {
rest: REST; rest: REST;
@ -25,7 +24,7 @@ export class DiscordBot {
throw new Error("Client is not ready"); throw new Error("Client is not ready");
await this.rest.put( await this.rest.put(
Routes.applicationGuildCommands(this.client.application.id, GUILD_ID), Routes.applicationCommands(this.client.application.id),
{ {
body: commands.map((command) => command.data.toJSON()), body: commands.map((command) => command.data.toJSON()),
} }