Updated log function
This commit is contained in:
@@ -20,19 +20,19 @@ for (const file of contentMenuCommands) {
|
||||
}
|
||||
|
||||
const [error] = await tryCatch(updateCommands())
|
||||
if (error) log(error, "error")
|
||||
if (error) log.error(error)
|
||||
|
||||
async function updateCommands() {
|
||||
log(`Started refreshing ${commands.length} application (/) commands.`, "info", { type: "preset", color: "green" })
|
||||
log.custom(`Started refreshing ${commands.length} application (/) commands.`, "info", { type: "preset", color: "green" })
|
||||
|
||||
const commandsString = commands.map(command => " " + command.name)
|
||||
log(commandsString.join("\n"), "info", { type: "preset", color: "lavender" })
|
||||
log.custom(commandsString.join("\n"), "info", { type: "preset", color: "lavender" })
|
||||
|
||||
await rest.put(
|
||||
Routes.applicationCommands(env.dev.CLIENTID),
|
||||
{ body: commands }
|
||||
).then(() => {
|
||||
log(`Successfully reloaded ${commands.length} application (/) commands.`, "info", { type: "preset", color: "green" })
|
||||
log.custom(`Successfully reloaded ${commands.length} application (/) commands.`, "info", { type: "preset", color: "green" })
|
||||
process.exit(0)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user