diff --git a/package.json b/package.json index bd64b59..78bfcff 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "dev:js": "nodemon --config nodemon-js.json dist/index.js", "dev:build": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"", "dev:delete": "ts-node scripts/delete-commands.ts", - "lint": "eslint src", - "lint:fix": "eslint --fix src", + "lint": "eslint", + "lint:fix": "eslint --fix", "prod:build": "cross-env NODE_PATH=src/ \"ts-node scripts/deploy-commands.ts\"" }, "author": "Taken", diff --git a/scripts/deploy-commands.ts b/scripts/deploy-commands.ts index 01d003c..9aea2f3 100644 --- a/scripts/deploy-commands.ts +++ b/scripts/deploy-commands.ts @@ -2,6 +2,7 @@ import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js" import fs from "node:fs" import { ICommand } from "../src/interfaces" import env from "../src/utils/Env" +import color from "../src/utils/functions/colors" const rest = new REST({ version: "10" }).setToken(env.prod.token!) const commands: RESTPutAPIApplicationCommandsJSONBody = [] @@ -19,13 +20,16 @@ for (const file of contentMenuCommands) { (async () => { try { - console.log(`Started refreshing ${commands.length} application (/) commands.`) + console.log(color(`Started refreshing ${commands.length} application (/) commands.`, "green")) + + const commandsString = commands.map(command => " " + command.name) + console.log(color(commandsString.join("\n"), "lavender")) await rest.put( Routes.applicationCommands(env.dev.clientid!), { body: commands }, ).then(() => { - console.log(`Successfully reloaded ${commands.length} application (/) commands.`) + console.log(color(`Successfully reloaded ${commands.length} application (/) commands.`, "green")) process.exit(0) })