Files
illegitimate-bot/scripts/delete-commands.ts
2025-03-20 23:41:18 +01:00

19 lines
609 B
TypeScript

import { REST, Routes } from "discord.js"
import env from "../src/utils/Env"
import tryCatch from "../src/utils/Functions/trycatch"
import { log } from "../src/utils/Logger"
const rest = new REST({ version: "10" }).setToken(env.dev.DEVTOKEN)
const [error] = await tryCatch(deleteCommands())
if (error) log(error, "error")
async function deleteCommands() {
log("Started deleting application (/) commands.", "info")
await rest.put(
Routes.applicationGuildCommands(env.dev.DEVID, env.dev.GUILDID),
{ body: [] }
)
log("Successfully deleted application (/) commands.", "info")
}