From 6de07de5fe468edadb91297f96f9d78a2c0aa9fc Mon Sep 17 00:00:00 2001 From: Taken Date: Sat, 8 Mar 2025 14:09:25 +0100 Subject: [PATCH] Updated scripts --- scripts/delete-commands.ts | 4 ++-- scripts/deploy-commands.ts | 6 +++--- scripts/dev-deploy.ts | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/delete-commands.ts b/scripts/delete-commands.ts index 9fb9ac7..40dcdad 100644 --- a/scripts/delete-commands.ts +++ b/scripts/delete-commands.ts @@ -1,13 +1,13 @@ import { REST, Routes } from "discord.js" import env from "../src/utils/Env" -import { log } from "../src/utils/Logger.js" +import { log } from "../src/utils/Logger" 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), + Routes.applicationGuildCommands(env.dev.DEVID, env.dev.GUILDID), { body: [] } ) log("Successfully deleted application (/) commands.", "info") diff --git a/scripts/deploy-commands.ts b/scripts/deploy-commands.ts index 6298926..797b6e9 100644 --- a/scripts/deploy-commands.ts +++ b/scripts/deploy-commands.ts @@ -1,8 +1,8 @@ import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js" import fs from "node:fs" -import { ICommand } from "../src/interfaces" +import { ICommand } from "../src/typings" import env from "../src/utils/Env" -import { log } from "../src/utils/Logger.js" +import { log } from "../src/utils/Logger" const rest = new REST({ version: "10" }).setToken(env.prod.TOKEN) const commands: RESTPutAPIApplicationCommandsJSONBody = [] @@ -25,7 +25,7 @@ try { log(commandsString.join("\n"), "info", { type: "preset", color: "lavender" }) await rest.put( - Routes.applicationCommands(env.dev.clientid), + Routes.applicationCommands(env.dev.CLIENTID), { body: commands } ).then(() => { log(`Successfully reloaded ${commands.length} application (/) commands.`, "info", { type: "preset", color: "green" }) diff --git a/scripts/dev-deploy.ts b/scripts/dev-deploy.ts index c9e61b0..eb8327b 100644 --- a/scripts/dev-deploy.ts +++ b/scripts/dev-deploy.ts @@ -1,8 +1,8 @@ import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js" import fs from "fs" -import { ICommand } from "../src/interfaces" +import { ICommand } from "../src/typings" import env from "../src/utils/Env" -import { log } from "../src/utils/Logger.js" +import { log } from "../src/utils/Logger" const rest = new REST({ version: "10" }).setToken(env.dev.DEVTOKEN) const commands: RESTPutAPIApplicationCommandsJSONBody = [] @@ -26,7 +26,7 @@ try { log(`Started refreshing ${commands.length} application (/) commands.`, "info") await rest.put( - Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid), + Routes.applicationGuildCommands(env.dev.DEVID, env.dev.GUILDID), { body: commands } ).then(() => { log(`Successfully reloaded ${commands.length} application (/) commands.`, "info")