Updated lint scripts
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user