Added new logger

This commit is contained in:
2024-11-14 18:44:07 +01:00
parent c868edcae4
commit d938dd9d3e
16 changed files with 81 additions and 129 deletions

View File

@@ -1,5 +1,5 @@
import { IEvent } from "~/interfaces"
import { color } from "~/utils/Functions/colors.js"
import { log } from "~/utils/Logger.js"
export default {
event: "interactionCreate",
@@ -15,21 +15,19 @@ export default {
}
if (subcommand) {
console.log(
color(
interaction.user.username + " ran " +
interaction.commandName + " " +
subcommand,
"pink"
)
log(
interaction.user.username + " ran " +
interaction.commandName + " " +
subcommand,
"info",
{ type: "preset", color: "pink" }
)
} else {
console.log(
color(
interaction.user.username + " ran " +
interaction.commandName,
"pink"
)
log(
interaction.user.username + " ran " +
interaction.commandName,
"info",
{ type: "preset", color: "pink" }
)
}
}
@@ -43,11 +41,10 @@ export default {
btnId = btnId.split("-")[0]
}
console.log(
color(
interaction.user.username + " clicked " + btnId,
"pink"
)
log(
interaction.user.username + " clicked " + btnId,
"info",
{ type: "preset", color: "pink" }
)
return
}

View File

@@ -1,9 +1,9 @@
import { IEvent } from "~/interfaces"
import { color } from "~/utils/Functions/colors.js"
import { log } from "~/utils/Logger.js"
export default {
event: "ready",
execute(client) {
console.log(color("Logged in as " + client.user!.tag + "!", "green"))
log("Logged in as " + client.user!.tag + "!", "info", { type: "preset", color: "green" })
}
} as IEvent<"ready">