diff --git a/src/Updater.js b/src/Updater.js index 0f19b242..a471fa49 100644 --- a/src/Updater.js +++ b/src/Updater.js @@ -10,7 +10,7 @@ function updateCode() { exec("git pull", (error, stdout, stderr) => { if (error) { - Logger.console.error(error); + console.error(error); return; } diff --git a/src/discord/DiscordManager.js b/src/discord/DiscordManager.js index d3f2da56..7bca7864 100644 --- a/src/discord/DiscordManager.js +++ b/src/discord/DiscordManager.js @@ -6,7 +6,6 @@ const MessageHandler = require("./handlers/MessageHandler.js"); const StateHandler = require("./handlers/StateHandler.js"); const CommandHandler = require("./CommandHandler.js"); const config = require("../../config.json"); -const Logger = require(".././Logger.js"); const path = require("node:path"); const fs = require("fs"); @@ -33,7 +32,7 @@ class DiscordManager extends CommunicationBridge { this.client.on("messageCreate", (message) => this.messageHandler.onMessage(message)); this.client.login(config.discord.bot.token).catch((error) => { - Logger.console.error(error); + console.error(error); }); client.commands = new Collection(); @@ -93,7 +92,7 @@ class DiscordManager extends CommunicationBridge { const mode = chat === "debugChannel" ? "minecraft" : config.discord.other.messageMode.toLowerCase(); message = chat === "debugChannel" ? fullMessage : message; if (message !== undefined && chat !== "debugChannel") { - Logger.broadcastMessage( + console.broadcast( `${username} [${guildRank.replace(/§[0-9a-fk-or]/g, "").replace(/^\[|\]$/g, "")}]: ${message}`, `Discord`, ); @@ -106,7 +105,7 @@ class DiscordManager extends CommunicationBridge { const channel = await this.stateHandler.getChannel(chat || "Guild"); if (channel === undefined) { - Logger.console.error(`Channel ${chat} not found!`); + console.error(`Channel ${chat} not found!`); return; } if (username === bot.username && message.endsWith("Check Discord Bridge for image.")) { @@ -181,7 +180,7 @@ class DiscordManager extends CommunicationBridge { } async onBroadcastCleanEmbed({ message, color, channel }) { - Logger.broadcastMessage(message, "Event"); + console.broadcast(message, "Event"); channel = await this.stateHandler.getChannel(channel); channel.send({ diff --git a/src/discord/handlers/StateHandler.js b/src/discord/handlers/StateHandler.js index 436bea65..72a62a64 100644 --- a/src/discord/handlers/StateHandler.js +++ b/src/discord/handlers/StateHandler.js @@ -18,7 +18,7 @@ class StateHandler { global.guild = await client.guilds.fetch(config.discord.bot.serverID); if (guild === undefined) { - return Logger.console.error(`Guild not found!`); + return console.error(`Guild not found!`); } console.discord("Guild ready, successfully fetched " + guild.name); @@ -40,7 +40,7 @@ class StateHandler { async onClose() { const channel = await this.getChannel("Guild"); if (channel === undefined) { - return Logger.console.error(`Channel "Guild" not found!`); + return console.error(`Channel "Guild" not found!`); } await channel.send({ @@ -55,7 +55,7 @@ class StateHandler { async getChannel(type) { if (typeof type !== "string" || type === undefined) { - return Logger.console.error(`Channel type must be a string!`); + return console.error(`Channel type must be a string!`); } switch (type.replace(/§[0-9a-fk-or]/g, "").trim()) { diff --git a/src/discord/other/updateUsers.js b/src/discord/other/updateUsers.js index 6e5f8553..c94ece41 100644 --- a/src/discord/other/updateUsers.js +++ b/src/discord/other/updateUsers.js @@ -1,6 +1,5 @@ const updateRolesCommand = require("../commands/forceUpdateEveryone.js"); const config = require("../../../config.json"); -const Logger = require("../../Logger.js"); const cron = require("node-cron"); if (config.verification.autoUpdater) { diff --git a/src/minecraft/handlers/ChatHandler.js b/src/minecraft/handlers/ChatHandler.js index 6abaf9d4..31604772 100644 --- a/src/minecraft/handlers/ChatHandler.js +++ b/src/minecraft/handlers/ChatHandler.js @@ -10,7 +10,6 @@ const { isUuid } = require("../../../API/utils/uuid.js"); const messages = require("../../../messages.json"); const { EmbedBuilder } = require("discord.js"); const config = require("../../../config.json"); -const Logger = require("../../Logger.js"); const { readFileSync } = require("fs"); class StateHandler extends eventHandler { diff --git a/src/minecraft/handlers/ErrorHandler.js b/src/minecraft/handlers/ErrorHandler.js index a38bac44..bf50eb50 100644 --- a/src/minecraft/handlers/ErrorHandler.js +++ b/src/minecraft/handlers/ErrorHandler.js @@ -19,7 +19,7 @@ class StateHandler extends eventHandler { if (this.isConnectionResetError(error)) return; if (this.isConnectionRefusedError(error)) { - return Logger.console.error("Connection refused while attempting to login via the Minecraft client"); + return console.error("Connection refused while attempting to login via the Minecraft client"); } console.warn(error); diff --git a/src/minecraft/handlers/StateHandler.js b/src/minecraft/handlers/StateHandler.js index e59b44ce..0773fe0f 100644 --- a/src/minecraft/handlers/StateHandler.js +++ b/src/minecraft/handlers/StateHandler.js @@ -1,5 +1,4 @@ const eventHandler = require("../../contracts/EventHandler.js"); -const Logger = require("../../Logger.js"); class StateHandler extends eventHandler { constructor(minecraft) {