Updated to new color script

This commit is contained in:
2024-01-12 20:52:05 +01:00
parent a6254a2493
commit 45762c19d6
7 changed files with 39 additions and 28 deletions

View File

@@ -1,7 +1,6 @@
import { Command } from "../interfaces"
import chalk from "chalk"
import color from "./functions/colors"
import env from "./Env"
// import color from "./functions/colors"
import {
REST,
RESTGetAPIApplicationGuildCommandResult,
@@ -11,9 +10,6 @@ import {
import fs = require("fs")
type FileType = "js" | "ts"
const oldColor = chalk.hex("#f38ba8")
const newColor = chalk.hex("#b4befe")
export default async function autoDeployCommands(fileType: FileType) {
const commands = []
let commandFiles: string[] = []
@@ -90,21 +86,17 @@ export default async function autoDeployCommands(fileType: FileType) {
JSON.stringify(sortedCurrentCommandsInfo)
) {
console.log(
// color.colorize("Commands are the same, skipping deploy.", "green"),
newColor("Commands are the same, skipping deploy."),
color("Commands are the same, skipping deploy.", "lavender"),
)
// console.log(color.colorize(newCmds, "green"))
console.log(newColor(newCmds))
console.log(color(newCmds, "lavender"))
return
}
try {
console.log(
// color.colorize("Commands are different, starting deploy.", "red"),
oldColor("Commands are different, starting deploy."),
color("Commands are different, starting deploy.", "red"),
)
// console.log(color.colorize(currentCmds, "red"))
console.log(oldColor(currentCmds))
console.log(color(currentCmds, "red"))
console.log(
`Started refreshing ${commands.length} application (/) commands.`,
)
@@ -114,10 +106,8 @@ export default async function autoDeployCommands(fileType: FileType) {
{ body: commands },
)) as RESTPutAPIApplicationGuildCommandsJSONBody[]
// console.log(color.colorize("New commands deployed.", "green"))
// console.log(color.colorize(newCmds, "green"))
console.log(newColor("New commands deployed."))
console.log(newColor(newCmds))
console.log(color("New commands deployed.", "lavender"))
console.log(color(newCmds, "lavender"))
console.log(
`Successfully reloaded ${data.length} application (/) commands.`,
)