diff --git a/src/bot/events/loggedOn.js b/src/bot/events/loggedOn.js index c6c082c0..a57cedc5 100644 --- a/src/bot/events/loggedOn.js +++ b/src/bot/events/loggedOn.js @@ -4,7 +4,7 @@ * Created Date: 2021-07-09 16:26:00 * Author: 3urobeat * - * Last Modified: 2024-03-08 17:49:10 + * Last Modified: 2024-03-08 18:23:17 * Modified By: 3urobeat * * Copyright (c) 2021 - 2024 3urobeat @@ -28,7 +28,7 @@ Bot.prototype._attachSteamLoggedOnEvent = function() { this.user.on("loggedOn", () => { // Print message and set status to online - logger("debug", `[${this.logPrefix}] Account logged in! Public IP of this account: ${this.user.publicIP}`, false, true); + logger("debug", `[${this.logPrefix}] Account logged in! Public IP of this account: ${this.user.publicIP}`); if (this.index == 0) { logger("debug", `[${this.logPrefix}] Setting online status '${this.data.advancedconfig.onlineStatus}' as enum '${EPersonaState[this.data.advancedconfig.onlineStatus]}'`); diff --git a/src/commands/commandHandler.js b/src/commands/commandHandler.js index a3882aa4..7e9eba15 100644 --- a/src/commands/commandHandler.js +++ b/src/commands/commandHandler.js @@ -4,7 +4,7 @@ * Created Date: 2023-04-01 21:54:21 * Author: 3urobeat * - * Last Modified: 2024-02-29 20:17:33 + * Last Modified: 2024-03-08 18:18:46 * Modified By: 3urobeat * * Copyright (c) 2023 - 2024 3urobeat @@ -67,7 +67,7 @@ const CommandHandler = function(controller) { CommandHandler.prototype._importCoreCommands = function() { return new Promise((resolve) => { - logger("info", "CommandHandler: Loading all core commands...", false, true, logger.animation("loading")); + logger("debug", "CommandHandler: Loading all core commands..."); fs.readdir("./src/commands/core", (err, files) => { diff --git a/src/commands/core/friend.js b/src/commands/core/friend.js index 3460505a..e389d450 100644 --- a/src/commands/core/friend.js +++ b/src/commands/core/friend.js @@ -4,7 +4,7 @@ * Created Date: 2021-07-09 16:26:00 * Author: 3urobeat * - * Last Modified: 2024-02-28 22:37:55 + * Last Modified: 2024-03-08 18:24:40 * Modified By: 3urobeat * * Copyright (c) 2021 - 2024 3urobeat @@ -212,7 +212,7 @@ module.exports.unfriendall = { logger("info", `Removing friend ${friendSteamID.getSteamID64()} from all bot accounts...`, false, false, logger.animation("loading")); commandHandler.controller.getBots()[i].user.removeFriend(friendSteamID); } else { - logger("debug", `unfriendAll(): Friend ${friendSteamID.getSteamID64()} seems to be an owner, skipping...`, false, false, logger.animation("loading")); + logger("debug", `unfriendAll(): Friend ${friendSteamID.getSteamID64()} seems to be an owner, skipping...`); } }, 1000 * i); // Delay every iteration so that we don't make a ton of requests at once } catch (err) { diff --git a/src/controller/login.js b/src/controller/login.js index 05f10d46..c4be430a 100644 --- a/src/controller/login.js +++ b/src/controller/login.js @@ -4,7 +4,7 @@ * Created Date: 2021-07-09 16:26:00 * Author: 3urobeat * - * Last Modified: 2024-03-07 18:03:14 + * Last Modified: 2024-03-08 18:20:05 * Modified By: 3urobeat * * Copyright (c) 2021 - 2024 3urobeat @@ -142,7 +142,7 @@ Controller.prototype.login = async function(firstLogin) { clearInterval(allAccsOnlineInterval); - logger("info", "Finished logging in all currently queued accounts! Calling myself again to check for any new accounts...", false, false, logger.animation("loading")); + logger("info", "Finished logging in all currently queued accounts! Checking for any new accounts...", false, false, logger.animation("loading")); this.info.activeLogin = false; diff --git a/src/data/fileStructure.json b/src/data/fileStructure.json index ae359926..73a93cfb 100644 --- a/src/data/fileStructure.json +++ b/src/data/fileStructure.json @@ -343,7 +343,7 @@ { "path": "src/bot/events/loggedOn.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/bot/events/loggedOn.js", - "checksum": "94405ecfae8f113b0e38169b09c1f2dd" + "checksum": "bfa57e1198eed440735f4a7fc300bd95" }, { "path": "src/bot/events/relationship.js", @@ -383,7 +383,7 @@ { "path": "src/commands/commandHandler.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/commands/commandHandler.js", - "checksum": "e4523ce0506976d22a55c938aad4eba9" + "checksum": "a39e912f50969e3b13cbc45d0823d14e" }, { "path": "src/commands/core/block.js", @@ -408,7 +408,7 @@ { "path": "src/commands/core/friend.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/commands/core/friend.js", - "checksum": "1c3bcf6b9bbd2a1465f9f54b03d17928" + "checksum": "26800bddf4e1c79331dca96c43e38fea" }, { "path": "src/commands/core/general.js", @@ -548,7 +548,7 @@ { "path": "src/controller/login.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/controller/login.js", - "checksum": "9ca82532f19176e0af017d596697e776" + "checksum": "a3181994388cb9145687ff167345ee47" }, { "path": "src/data/ascii.js", @@ -588,7 +588,7 @@ { "path": "src/dataManager/dataImport.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/dataManager/dataImport.js", - "checksum": "e35c794d60fd0f15534a63081afe7407" + "checksum": "16091447de2f8daa460e9bba67d38e4a" }, { "path": "src/dataManager/dataIntegrity.js", @@ -638,7 +638,7 @@ { "path": "src/dataManager/helpers/refreshCache.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/dataManager/helpers/refreshCache.js", - "checksum": "acb6ae61becdfe4613d2387f4660f8f5" + "checksum": "45511a56fb61cd18f36f89e215881722" }, { "path": "src/dataManager/helpers/repairFile.js", @@ -648,7 +648,7 @@ { "path": "src/jobs/jobManager.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/jobs/jobManager.js", - "checksum": "9f911f54fefc0f4e4db87b6d190992d3" + "checksum": "37dec9dd3507e1c98903722391115944" }, { "path": "src/libraryPatches/CSteamDiscussion.js", @@ -703,7 +703,7 @@ { "path": "src/pluginSystem/loadPlugins.js", "url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/pluginSystem/loadPlugins.js", - "checksum": "e411202cda325c73ce8983f4bc421e20" + "checksum": "236e11079a89df528f4e609eb68e784e" }, { "path": "src/pluginSystem/pluginSystem.js", diff --git a/src/dataManager/dataImport.js b/src/dataManager/dataImport.js index bb122000..ec0b99a1 100644 --- a/src/dataManager/dataImport.js +++ b/src/dataManager/dataImport.js @@ -4,7 +4,7 @@ * Created Date: 2021-07-09 16:26:00 * Author: 3urobeat * - * Last Modified: 2024-02-24 12:26:07 + * Last Modified: 2024-03-08 18:26:36 * Modified By: 3urobeat * * Copyright (c) 2021 - 2024 3urobeat @@ -161,7 +161,7 @@ DataManager.prototype._importFromDisk = async function () { }); }); - logger("info", `Found ${logininfo.length} accounts in accounts.txt, not checking for logininfo.json...`, false, true, logger.animation("loading")); + logger("debug", `DataManager _importFromDisk(): Found ${logininfo.length} accounts in accounts.txt, not checking for logininfo.json...`); return resolve(logininfo); } @@ -191,7 +191,7 @@ DataManager.prototype._importFromDisk = async function () { }); } - logger("info", `Found ${logininfo.length} accounts in logininfo.json...`, false, true, logger.animation("loading")); + logger("debug", `Found ${logininfo.length} accounts in logininfo.json...`); resolve(logininfo); } catch (err) { @@ -268,8 +268,6 @@ DataManager.prototype._importFromDisk = async function () { // Check if quotes.txt is empty to avoid errors further down when trying to comment logger("error", `${logger.colors.fgred}You haven't put any comment quotes into the quotes.txt file! Aborting...`, true); return _this.controller.stop(); - } else { - logger("info", `Successfully loaded ${quotes.length} quotes from quotes.txt...`, false, true, logger.animation("loading")); } resolve(quotes); @@ -290,6 +288,8 @@ DataManager.prototype._importFromDisk = async function () { // Iterate through all files in lang dir and load them fs.readdir("./src/data/lang", (err, files) => { + logger("debug", `DataManager _importFromDisk(): Found these languages in the lang folder: '${files.toString()}'`); + files.forEach((e) => { let thisFile; @@ -307,7 +307,6 @@ DataManager.prototype._importFromDisk = async function () { // Resolve with success message or force restore default language if (Object.keys(obj).length > 0 && obj["english"]) { - logger("info", `Successfully loaded ${Object.keys(obj).length} languages!`, false, true, logger.animation("loading")); resolve(obj); } else { _this._pullNewFile("english.json", "./src/data/lang/english.json", (e) => resolve({ "english": e })); // Only resolve for the default language @@ -375,7 +374,7 @@ DataManager.prototype._importFromDisk = async function () { if (langIteration == Object.keys(customlang).length - 1) resolve(_this.lang); }); } else { - logger("info", "No customlang.json file found...", false, true, logger.animation("loading")); + logger("debug", "DataManager _importFromDisk(): No customlang.json file found"); resolve(_this.lang); // Resolve with default lang object } }); @@ -400,4 +399,6 @@ DataManager.prototype._importFromDisk = async function () { this.tokensDB = new nedb({ filename: srcdir + "/data/tokens.db", autoload: true }); this.userSettingsDB = new nedb({ filename: srcdir + "/data/userSettings.db", autoload: true }); + logger("info", `Successfully loaded ${this.logininfo.length} accounts, ${this.proxies.length} proxies, ${this.quotes.length} quotes, ${Object.keys(this.lang).length} languages and 4 databases!`, false, true, logger.animation("loading")); + }; diff --git a/src/dataManager/helpers/refreshCache.js b/src/dataManager/helpers/refreshCache.js index 6fa27da7..ca7be5de 100644 --- a/src/dataManager/helpers/refreshCache.js +++ b/src/dataManager/helpers/refreshCache.js @@ -4,10 +4,10 @@ * Created Date: 2023-03-29 17:44:47 * Author: 3urobeat * - * Last Modified: 2023-12-27 14:13:26 + * Last Modified: 2024-03-08 18:27:14 * Modified By: 3urobeat * - * Copyright (c) 2023 3urobeat + * Copyright (c) 2023 - 2024 3urobeat * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -46,7 +46,7 @@ DataManager.prototype.refreshCache = function () { }); // Update Backups - logger("debug", "Writing backups to cache.json...", false, true, logger.animation("loading")); + logger("debug", "Writing backups to cache.json..."); this.cachefile["configjson"] = this.config; this.cachefile["advancedconfigjson"] = this.advancedconfig; this.cachefile["datajson"] = this.datafile; diff --git a/src/jobs/jobManager.js b/src/jobs/jobManager.js index d00b2da7..47da97ba 100644 --- a/src/jobs/jobManager.js +++ b/src/jobs/jobManager.js @@ -4,7 +4,7 @@ * Created Date: 2024-02-11 10:48:17 * Author: 3urobeat * - * Last Modified: 2024-02-11 16:57:53 + * Last Modified: 2024-03-08 18:17:43 * Modified By: 3urobeat * * Copyright (c) 2024 3urobeat @@ -113,7 +113,7 @@ JobManager.prototype.registerJob = function(job) { // Register job and return null on success this.jobs.push(job); - logger("info", `JobManager: Registered job '${job.name}' which executes ${job.runOnRegistration ? "now and then " : ""}every ${job.interval}ms`, false, true); + logger("debug", `JobManager: Registered job '${job.name}' which executes ${job.runOnRegistration ? "now and then " : ""}every ${job.interval}ms`); return null; @@ -137,7 +137,7 @@ JobManager.prototype.unregisterJob = function(name) { this.jobs.splice(index, 1); - logger("info", `JobManager: Unregistered job '${name}'!`); + logger("debug", `JobManager: Unregistered job '${name}'!`); return null; diff --git a/src/pluginSystem/loadPlugins.js b/src/pluginSystem/loadPlugins.js index f24b2b53..0e069c2f 100644 --- a/src/pluginSystem/loadPlugins.js +++ b/src/pluginSystem/loadPlugins.js @@ -4,7 +4,7 @@ * Created Date: 2023-06-04 15:37:17 * Author: DerDeathraven * - * Last Modified: 2024-03-02 11:24:28 + * Last Modified: 2024-03-08 18:19:31 * Modified By: 3urobeat * * Copyright (c) 2023 - 2024 3urobeat @@ -121,7 +121,7 @@ PluginSystem.prototype._loadPlugins = async function () { continue; } - logger("info", `PluginSystem: Loading plugin '${pluginName}' v${pluginJson.version} by ${pluginJson.author} made for v${pluginJson.botVersion}...`, false, true, logger.animation("loading")); + logger("info", `PluginSystem: Loading plugin '${pluginName}' v${pluginJson.version} by '${pluginJson.author}' made for v${pluginJson.botVersion}...`, false, true, logger.animation("loading")); // Display warning if bot version mismatches plugin's botVersion try {