Added new logger
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { TextChannel } from "discord.js"
|
||||
import { devMessage, embedColor, guildLogChannel, hypixelGuildID } from "~/config/options.js"
|
||||
import { ICron, IGuildData } from "~/interfaces"
|
||||
import { color } from "~/utils/Functions/colors.js"
|
||||
import { numberFormatter } from "~/utils/Functions/intlFormaters.js"
|
||||
import { getGuild, getIGN } from "~/utils/Hypixel.js"
|
||||
import { client } from "~/utils/Illegitimate.js"
|
||||
import { log } from "~/utils/Logger.js"
|
||||
|
||||
async function guildWeekly() {
|
||||
const channel = client.channels.cache.get(guildLogChannel) as TextChannel
|
||||
|
||||
if (!channel) {
|
||||
console.log(color("Guild log channel not found", "red"))
|
||||
log("Guild log channel not found", "error")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -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