Added new logger
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user