Files
illegitimate-bot/scripts/delete-commands.ts
2025-03-02 21:09:43 +01:00

17 lines
491 B
TypeScript

import { REST, Routes } from "discord.js"
import env from "../src/utils/Env"
import { log } from "../src/utils/Logger.js"
const rest = new REST({ version: "10" }).setToken(env.dev.DEVTOKEN)
try {
log("Started deleting application (/) commands.", "info")
await rest.put(
Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid),
{ body: [] }
)
log("Successfully deleted application (/) commands.", "info")
} catch (error) {
console.error(error)
}