Updated scripts to use esm syntax

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2024-09-08 22:46:19 +02:00
parent a6a328d124
commit a6f7cf78dc
3 changed files with 39 additions and 46 deletions

View File

@@ -3,16 +3,13 @@ import env from "../src/utils/Env"
const rest = new REST({ version: "10" }).setToken(env.dev.devtoken)
async function deleteCommands() {
try {
console.log("Started deleting application (/) commands.")
await rest.put(
Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid),
{ body: [] }
)
console.log("Successfully deleted application (/) commands.")
} catch (error) {
console.error(error)
}
try {
console.log("Started deleting application (/) commands.")
await rest.put(
Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid),
{ body: [] }
)
console.log("Successfully deleted application (/) commands.")
} catch (error) {
console.error(error)
}
deleteCommands()