diff --git a/docs/wiki/changelogs/CHANGELOG_v2.15.md b/docs/wiki/changelogs/CHANGELOG_v2.15.md
index 4935b0d5..52a11c8d 100644
--- a/docs/wiki/changelogs/CHANGELOG_v2.15.md
+++ b/docs/wiki/changelogs/CHANGELOG_v2.15.md
@@ -5,6 +5,7 @@
**Current**
- [2.15.0](#2.15.0)
+- [2.15.1](#2.15.1)
@@ -139,3 +140,21 @@ If you've made a plugin, check the 'Creating Plugins' wiki page and add the `bot
This list was generated using my [langStringsChangeDetector.js](/scripts/langStringsChangeDetector.js) script.
+
+Commit: [be41d68](https://github.com/3urobeat/steam-comment-service-bot/commit/be41d68)
+
+
+
+
+
+## **2024-03-08, Version 2.15.1**
+**Fixes:**
+- Fixed login process being softlocked after an account attempted to switch from their faulty proxy
+- Fixed failed vote & fav requests throwing an error when trying to log the error
+
+**Changes:**
+- Reduced amount of log messages logged during login, disconnect and relog
+- Reduced amount of log messages logged during the general startup
+- Reduced chances of startup ascii art showing an easter egg ascii art
+- Updated dependencies
+- Minor other changes
diff --git a/package-lock.json b/package-lock.json
index 91df7b0d..e6361e81 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "steam-comment-service-bot",
- "version": "2.15.0",
+ "version": "2.15.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "steam-comment-service-bot",
- "version": "2.15.0",
+ "version": "2.15.1",
"license": "GPL-3.0",
"dependencies": {
"@seald-io/nedb": "^4.0.4",
@@ -18,7 +18,7 @@
"qrcode": "^1.5.3",
"request": "^2.88.2",
"steam-comment-bot-discord-plugin": "^1.0.2",
- "steam-comment-bot-rest": "^1.1.0",
+ "steam-comment-bot-rest": "^1.2.1",
"steam-comment-bot-webserver": "^1.0.1",
"steam-session": "^1.7.2",
"steam-user": "^5.0.8",
@@ -28,7 +28,7 @@
},
"devDependencies": {
"eslint": "^8.57.0",
- "eslint-plugin-jsdoc": "^48.2.0",
+ "eslint-plugin-jsdoc": "^48.2.1",
"tsd-jsdoc": "^2.5.0"
}
},
@@ -576,9 +576,9 @@
"integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w=="
},
"node_modules/@types/node": {
- "version": "20.11.24",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
- "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
+ "version": "20.11.25",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
+ "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
"dependencies": {
"undici-types": "~5.26.4"
}
@@ -648,9 +648,9 @@
}
},
"node_modules/@types/steamcommunity": {
- "version": "3.43.6",
- "resolved": "https://registry.npmjs.org/@types/steamcommunity/-/steamcommunity-3.43.6.tgz",
- "integrity": "sha512-IwVjm+500EXBINdHi0DmxpFWPks/fF2/s/1XSXOSM/MiF9CqRXNRRnV4o6PJLLnoHY+gK5tLmvb3LCdsWIZcDA==",
+ "version": "3.43.7",
+ "resolved": "https://registry.npmjs.org/@types/steamcommunity/-/steamcommunity-3.43.7.tgz",
+ "integrity": "sha512-yOK2OPXJRJwYcspo+cjgYWL5N2IkTRtNvN1Tn0aPY/6lVNhwGY2PDaNyNMGiqbaVeJhSg45zJVZxC1ausdVCSw==",
"dependencies": {
"@types/node": "*",
"@types/request": "*",
@@ -2094,9 +2094,9 @@
}
},
"node_modules/eslint-plugin-jsdoc": {
- "version": "48.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.0.tgz",
- "integrity": "sha512-O2B1XLBJnUCRkggFzUQ+PBYJDit8iAgXdlu8ucolqGrbmOWPvttZQZX8d1sC0MbqDMSLs8SHSQxaNPRY1RQREg==",
+ "version": "48.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.1.tgz",
+ "integrity": "sha512-iUvbcyDZSO/9xSuRv2HQBw++8VkV/pt3UWtX9cpPH0l7GKPq78QC/6+PmyQHHvNZaTjAce6QVciEbnc6J/zH5g==",
"dev": true,
"dependencies": {
"@es-joy/jsdoccomment": "~0.42.0",
@@ -4818,24 +4818,24 @@
}
},
"node_modules/steam-comment-bot-rest": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/steam-comment-bot-rest/-/steam-comment-bot-rest-1.1.0.tgz",
- "integrity": "sha512-AXo6H2tyzaxEms6Aqul9Toe6CsMbFzchSGXHhb4mWTaAsmH98dP0z7ZRGnUufyZ6XcmrH8pnnuBqczfVPFC8Og==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/steam-comment-bot-rest/-/steam-comment-bot-rest-1.2.1.tgz",
+ "integrity": "sha512-8dbU0AEIqBbiQdD3g0wiIBDDCqm2CoF05/2R73s5MoPmnpKjOvUJ56dy5/BfcgAi//MN2qWZlVZLE2iKUZQQCg==",
"hasInstallScript": true,
"dependencies": {
"@types/axios": "^0.14.0",
- "@types/express": "^4.17.17",
- "@types/node": "^20.2.5",
- "@types/steam-user": "^4.26.4",
- "@types/steamcommunity": "^3.43.2",
- "axios": "^1.4.0",
+ "@types/express": "^4.17.21",
+ "@types/node": "^20.11.23",
+ "@types/steam-user": "^4.26.8",
+ "@types/steamcommunity": "^3.43.6",
+ "axios": "^1.6.7",
"body-parser": "^1.20.2",
- "express": "^4.18.2",
- "fast-xml-parser": "^4.2.2",
- "socket.io": "^4.6.1",
+ "express": "^4.18.3",
+ "fast-xml-parser": "^4.3.5",
+ "socket.io": "^4.7.4",
"tail": "^2.2.6",
"tsc-watch": "^6.0.4",
- "typescript": "^5.0.4"
+ "typescript": "^5.3.3"
}
},
"node_modules/steam-comment-bot-webserver": {
@@ -5289,9 +5289,9 @@
}
},
"node_modules/typescript": {
- "version": "5.3.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
- "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
+ "version": "5.4.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
+ "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
diff --git a/package.json b/package.json
index 7df5d478..7d416c68 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "steam-comment-service-bot",
- "version": "2.15.0",
+ "version": "2.15.1",
"description": "The most advanced Steam Multi Account Manager with built-in comment, like & favorite commands and extensive plugin support.",
"main": "start.js",
"dependencies": {
@@ -13,7 +13,7 @@
"qrcode": "^1.5.3",
"request": "^2.88.2",
"steam-comment-bot-discord-plugin": "^1.0.2",
- "steam-comment-bot-rest": "^1.1.0",
+ "steam-comment-bot-rest": "^1.2.1",
"steam-comment-bot-webserver": "^1.0.1",
"steam-session": "^1.7.2",
"steam-user": "^5.0.8",
@@ -36,7 +36,7 @@
"repository": "https://github.com/3urobeat/steam-comment-service-bot",
"devDependencies": {
"eslint": "^8.57.0",
- "eslint-plugin-jsdoc": "^48.2.0",
+ "eslint-plugin-jsdoc": "^48.2.1",
"tsd-jsdoc": "^2.5.0"
},
"types": "./types/types.d.ts"
diff --git a/src/bot/events/disconnected.js b/src/bot/events/disconnected.js
index bcaf135b..cfa2e3c6 100644
--- a/src/bot/events/disconnected.js
+++ b/src/bot/events/disconnected.js
@@ -4,10 +4,10 @@
* Created Date: 2021-07-09 16:26:00
* Author: 3urobeat
*
- * Last Modified: 2023-12-27 13:58:37
+ * Last Modified: 2024-03-08 17:40:03
* Modified By: 3urobeat
*
- * Copyright (c) 2021 - 2023 3urobeat
+ * Copyright (c) 2021 - 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.
@@ -28,8 +28,6 @@ Bot.prototype._attachSteamDisconnectedEvent = function() {
if (this.status == Bot.EStatus.OFFLINE && this.controller.info.activeLogin) return; // Ignore if account is already marked as offline and a login process is active
- logger("info", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam. Message: ${msg} | Check: https://steamstat.us`);
-
// Store disconnect timestamp & reason
this.lastDisconnect.timestamp = Date.now();
this.lastDisconnect.reason = msg;
@@ -38,11 +36,11 @@ Bot.prototype._attachSteamDisconnectedEvent = function() {
// Don't relog if account is in skippedaccounts array or if relogAfterDisconnect is false
if (!this.controller.info.skippedaccounts.includes(this.loginData.logOnOptions.accountName) && this.controller.info.relogAfterDisconnect) {
- logger("info", `${logger.colors.fggreen}[${this.logPrefix}] Initiating a login retry in ${this.controller.data.advancedconfig.loginRetryTimeout / 1000} seconds.`); // Announce relog
+ logger("info", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam: '${msg}'. Initiating a login retry in ${this.controller.data.advancedconfig.loginRetryTimeout / 1000} seconds.`); // Announce relog
setTimeout(() => this.controller.login(), this.controller.data.advancedconfig.loginRetryTimeout); // Relog in loginRetryTimeout ms
} else {
- logger("info", `[${this.logPrefix}] I won't queue myself for a relog because this account is either already being relogged, was skipped or this is an intended logOff.`);
+ logger("info", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam: '${msg}'. I won't queue for a relog because this account is either already being relogged, was skipped or this is an intended logOff.`);
}
});
diff --git a/src/bot/events/error.js b/src/bot/events/error.js
index 70dcf4c6..45ce77fa 100644
--- a/src/bot/events/error.js
+++ b/src/bot/events/error.js
@@ -4,7 +4,7 @@
* Created Date: 2021-07-09 16:26:00
* Author: 3urobeat
*
- * Last Modified: 2024-02-29 14:32:11
+ * Last Modified: 2024-03-08 17:44:50
* Modified By: 3urobeat
*
* Copyright (c) 2021 - 2024 3urobeat
@@ -31,7 +31,7 @@ Bot.prototype._attachSteamErrorEvent = function() {
// Custom behavior for LogonSessionReplaced error
if (err.eresult == EResult.LogonSessionReplaced) {
logger("", "", true);
- logger("warn", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam! Reason: LogonSessionReplaced. I won't try to relog this account because someone else is using it now.`, false, false, null, true); // Force print this message now
+ logger("warn", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam! Reason: 'Error: LogonSessionReplaced'. I won't try to relog this account because someone else is using it now.`, false, false, null, true); // Force print this message now
// Abort or skip account. No need to attach handleRelog() here
if (this.index == 0) {
@@ -49,7 +49,6 @@ Bot.prototype._attachSteamErrorEvent = function() {
// Check if this is a connection loss and not a login error (because disconnects are thrown here when SteamUser's autoRelogin is false)
if (this.status == Bot.EStatus.ONLINE) { // It must be a fresh connection loss if status has not changed yet
- logger("info", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam. Reason: ${err}`);
this.controller._statusUpdateEvent(this, Bot.EStatus.OFFLINE); // Set status of this account to offline
// Store disconnect timestamp & reason
@@ -58,18 +57,24 @@ Bot.prototype._attachSteamErrorEvent = function() {
// Check if this is an intended logoff
if (this.controller.info.relogAfterDisconnect && !this.controller.info.skippedaccounts.includes(this.loginData.logOnOptions.accountName)) {
- logger("info", `${logger.colors.fggreen}[${this.logPrefix}] Initiating a login retry in ${this.controller.data.advancedconfig.loginRetryTimeout / 1000} seconds.`); // Announce relog
+ logger("info", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam: '${err}'. Initiating a login retry in ${this.controller.data.advancedconfig.loginRetryTimeout / 1000} seconds.`); // Announce relog
setTimeout(() => this.controller.login(), this.controller.data.advancedconfig.loginRetryTimeout); // Relog after waiting loginRetryTimeout ms
} else {
- logger("info", `[${this.logPrefix}] I won't queue myself for a relog because this account was skipped or this is an intended logOff.`);
+ logger("info", `${logger.colors.fgred}[${this.logPrefix}] Lost connection to Steam: '${err}'. I won't queue for a relog because this account was skipped or this is an intended logOff.`);
}
} else { // Actual error during login
- let blockedEnumsForRetries = [EResult.Banned, EResult.AccountNotFound]; // No need to block InvalidPassword anymore as the SessionHandler handles credentials
+ // Unlock login, but only if not already done by loginTimeout handler to prevent duplicate login requests
+ if (!this.loginData.pendingLogin) return logger("debug", `[${this.logPrefix}] Won't handle this login error because 'pendingLogin' is already 'false'; handleLoginTimeout must already have taken action`);
+
+ this.loginData.pendingLogin = false;
+
// Check if all logOnTries are used or if this is a fatal error
+ let blockedEnumsForRetries = [EResult.Banned, EResult.AccountNotFound]; // No need to block InvalidPassword anymore as the SessionHandler handles credentials
+
if (this.loginData.logOnTries > this.controller.data.advancedconfig.maxLogOnRetries || blockedEnumsForRetries.includes(err.eresult)) {
logger("error", `Couldn't log in bot${this.index} after ${this.loginData.logOnTries} attempt(s). ${err} (${err.eresult})`);
@@ -100,12 +105,7 @@ Bot.prototype._attachSteamErrorEvent = function() {
} else {
- logger("warn", `[${this.logPrefix}] '${err}' while trying to log in.${this.loginData.pendingLogin ? " Retrying in 5 seconds..." : ""}`, false, false, null, true); // Log error as warning
-
- // Unlock login, but only if not already done by loginTimeout handler to prevent duplicate login requests
- if (!this.loginData.pendingLogin) return logger("debug", `[${this.logPrefix}] Won't handle this login error because 'pendingLogin' is already 'false'; handleLoginTimeout must already have taken action`);
-
- this.loginData.pendingLogin = false;
+ logger("warn", `[${this.logPrefix}] '${err}' while trying to log in. Retrying in 5 seconds...`, false, false, null, true); // Log error as warning
// Try again in 5 sec, Controller's login function waits for any status that is not offline
setTimeout(() => this._loginToSteam(), 5000);
diff --git a/src/bot/events/loggedOn.js b/src/bot/events/loggedOn.js
index ebcb639a..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-02-10 14:08:02
+ * 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("info", `[${this.logPrefix}] Account logged in! Waiting for websession...`, false, true, logger.animation("loading"));
+ 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]}'`);
@@ -38,9 +38,6 @@ Bot.prototype._attachSteamLoggedOnEvent = function() {
this.user.setPersona(EPersonaState[this.data.advancedconfig.childAccOnlineStatus]); // Set child acc online status
}
- logger("debug", `[${this.logPrefix}] Public IP of this account: ${this.user.publicIP}`);
-
-
// Increase progress bar if one is active
if (logger.getProgressBar()) logger.increaseProgressBar((100 / this.data.logininfo.length) / 3);
diff --git a/src/bot/events/webSession.js b/src/bot/events/webSession.js
index a1e50864..b4208b8d 100644
--- a/src/bot/events/webSession.js
+++ b/src/bot/events/webSession.js
@@ -4,7 +4,7 @@
* Created Date: 2021-07-09 16:26:00
* Author: 3urobeat
*
- * Last Modified: 2024-02-29 14:10:29
+ * Last Modified: 2024-03-08 16:21:53
* Modified By: 3urobeat
*
* Copyright (c) 2021 - 2024 3urobeat
@@ -39,9 +39,12 @@ Bot.prototype._attachSteamWebSessionEvent = function() {
this.loginData.relogTries = 0; // Reset relogTries to indicate that this proxy is working should one of the next logOn retries fail
this.loginData.pendingLogin = false; // Unlock login again
-
- if (!this.controller.info.readyAfter) logger("info", `[${this.logPrefix}] Got websession and set cookies. Accepting offline friend & group invites...`, false, true, logger.animation("loading")); // Only print message with animation if the bot was not fully started yet
- else logger("info", `[${this.logPrefix}] Got websession and set cookies. Accepting offline friend & group invites...`, false, true);
+ // Print logged in message with animation on initial login, otherwise without
+ if (!this.controller.info.readyAfter) {
+ logger("info", `[${this.logPrefix}] Logged in! Accepting pending friend requests & group invites...`, false, true, logger.animation("loading"));
+ } else {
+ logger("info", `[${this.logPrefix}] Logged in! Accepting pending friend requests & group invites...`, false, true);
+ }
// Run check if all friends are in lastcomment.db database for main bot account
diff --git a/src/bot/helpers/handleRelog.js b/src/bot/helpers/handleRelog.js
index 1a0a0d05..a8664fbf 100644
--- a/src/bot/helpers/handleRelog.js
+++ b/src/bot/helpers/handleRelog.js
@@ -4,10 +4,10 @@
* Created Date: 2023-10-05 16:14:46
* Author: 3urobeat
*
- * Last Modified: 2023-12-27 13:59:47
+ * Last Modified: 2024-03-08 11:48:23
* 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.
@@ -106,7 +106,7 @@ Bot.prototype.checkAndSwitchMyProxy = async function() {
// Switch proxy and relog, no need for handleRelog() to do something
this.switchProxy(leastUsedProxy.proxyIndex);
- this.status = Bot.EStatus.OFFLINE;
+ this.controller._statusUpdateEvent(this, Bot.EStatus.OFFLINE);
this.controller.login();
return true;
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/favorite.js b/src/commands/core/favorite.js
index 098e5ef1..e86b317f 100644
--- a/src/commands/core/favorite.js
+++ b/src/commands/core/favorite.js
@@ -4,7 +4,7 @@
* Created Date: 2023-06-02 13:23:01
* Author: 3urobeat
*
- * Last Modified: 2024-02-21 21:23:47
+ * Last Modified: 2024-03-08 19:20:53
* Modified By: 3urobeat
*
* Copyright (c) 2023 - 2024 3urobeat
@@ -169,7 +169,7 @@ module.exports.favorite = {
/* --------- Handle errors thrown by this favorite attempt or update ratingHistory db and log success message --------- */
if (error) {
- logFavoriteError(error, commandHandler, bot, sharedfile.id);
+ logFavoriteError(error, commandHandler, bot, id);
} else {
@@ -367,7 +367,7 @@ module.exports.unfavorite = {
/* --------- Handle errors thrown by this unfavorite attempt or update ratingHistory db and log success message --------- */
if (error) {
- logFavoriteError(error, commandHandler, bot, sharedfile.id);
+ logFavoriteError(error, commandHandler, bot, id);
} else {
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/commands/core/vote.js b/src/commands/core/vote.js
index 5fe4e3bb..b23615a0 100644
--- a/src/commands/core/vote.js
+++ b/src/commands/core/vote.js
@@ -4,7 +4,7 @@
* Created Date: 2023-05-28 12:02:24
* Author: 3urobeat
*
- * Last Modified: 2024-02-27 22:00:43
+ * Last Modified: 2024-03-08 18:36:55
* Modified By: 3urobeat
*
* Copyright (c) 2023 - 2024 3urobeat
@@ -218,7 +218,7 @@ async function processVoteRequest(origin, commandHandler, args, respondModule, c
/* --------- Handle errors thrown by this vote attempt or update ratingHistory db and log success message --------- */
if (error) {
- logVoteError(error, commandHandler, bot, voteArgs.id);
+ logVoteError(error, commandHandler, bot, id);
} else {
diff --git a/src/controller/events/statusUpdate.js b/src/controller/events/statusUpdate.js
index 93625953..9109d8bf 100644
--- a/src/controller/events/statusUpdate.js
+++ b/src/controller/events/statusUpdate.js
@@ -4,7 +4,7 @@
* Created Date: 2023-03-30 21:05:13
* Author: 3urobeat
*
- * Last Modified: 2024-02-28 19:57:36
+ * Last Modified: 2024-03-08 17:49:26
* Modified By: 3urobeat
*
* Copyright (c) 2023 - 2024 3urobeat
@@ -31,7 +31,7 @@ Controller.prototype._statusUpdateEvent = function(bot, newStatus) {
bot.status = newStatus;
// Log debug message
- logger("info", `[${bot.logPrefix}] Event statusUpdate: Changed status from ${Bot.EStatus[oldStatus]} to ${Bot.EStatus[newStatus]}`, false, true, logger.animation("loading"));
+ logger("debug", `[${bot.logPrefix}] Event statusUpdate: Changed status from ${Bot.EStatus[oldStatus]} to ${Bot.EStatus[newStatus]}`, false, true);
// Emit event
this.events.emit("statusUpdate", bot, oldStatus, newStatus);
diff --git a/src/controller/login.js b/src/controller/login.js
index 02fe7572..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-02-29 15:18:34
+ * Last Modified: 2024-03-08 18:20:05
* Modified By: 3urobeat
*
* Copyright (c) 2021 - 2024 3urobeat
@@ -39,8 +39,8 @@ Controller.prototype.login = async function(firstLogin) {
// Print ASCII art
logger("", "", true);
- if (Math.floor(Math.random() * 100) <= 2) logger("", ascii.hellothereascii + "\n", true, false, null, false, true); // 2% chance
- else if (Math.floor(Math.random() * 100) <= 5) logger("", ascii.binaryascii + "\n", true, false, null, false, true); // 5% chance
+ if (Math.floor(Math.random() * 100) <= 1) logger("", ascii.hellothereascii + "\n", true, false, null, false, true); // 1% chance
+ else if (Math.floor(Math.random() * 100) <= 2) logger("", ascii.binaryascii + "\n", true, false, null, false, true); // 2% chance
else logger("", ascii.ascii[Math.floor(Math.random() * ascii.ascii.length)] + "\n", true, false, null, false, true); // Last param makes sure to cut the width
logger("", "", true); // Put one line above everything that will come to make the output cleaner
@@ -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/data.json b/src/data/data.json
index 3d35a7bb..5f065eb9 100644
--- a/src/data/data.json
+++ b/src/data/data.json
@@ -1,6 +1,6 @@
{
- "version": "21500",
- "versionstr": "2.15.0",
+ "version": "21501",
+ "versionstr": "2.15.1",
"branch": "master",
"filetostart": "./src/starter.js",
"filetostarturl": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/master/src/starter.js",
@@ -8,7 +8,7 @@
"aboutstr": "This bot was created by 3urobeat.\nGitHub: https://github.com/3urobeat/steam-comment-service-bot \nSteam: https://steamcommunity.com/id/3urobeat \nIf you like my work, any donation would be appreciated! https://github.com/sponsors/3urobeat",
"firststart": true,
"compatibilityfeaturedone": false,
- "whatsnew": "Added support for commenting & voting on reviews, drastically reduced startup time for large instances with many proxies, added QR-Code login support, added JobManager, improved PluginSystem and fixed some bugs. Read the full release notes: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/changelogs/CHANGELOG_v2.15.md",
+ "whatsnew": "Fixed softlocked login process after proxy switch, fixed vote & fav error logging throwing an error and reduced amount of log messages logged during startup, login, disconnect & relog.",
"timesloggedin": 0,
"totallogintime": 0
}
diff --git a/src/data/fileStructure.json b/src/data/fileStructure.json
index 04d34460..1fae5f69 100644
--- a/src/data/fileStructure.json
+++ b/src/data/fileStructure.json
@@ -188,7 +188,7 @@
{
"path": "docs/wiki/changelogs/CHANGELOG_v2.15.md",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/docs/wiki/changelogs/CHANGELOG_v2.15.md",
- "checksum": "6c9006e2ac08ed25086e3bc47c6cf86d"
+ "checksum": "327435ddb0311eba66267b77129222b9"
},
{
"path": "docs/wiki/changelogs/CHANGELOG_v2.2.md",
@@ -328,12 +328,12 @@
{
"path": "src/bot/events/disconnected.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/bot/events/disconnected.js",
- "checksum": "38cf0c4ac7164d5cb902b65d287b902d"
+ "checksum": "92fda70994fd7f04246c75ca85d6aa3e"
},
{
"path": "src/bot/events/error.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/bot/events/error.js",
- "checksum": "1d9acb9bc2e620a84bb2aaecef3de96b"
+ "checksum": "8415adcfa88700af656c85657a3c05c3"
},
{
"path": "src/bot/events/friendMessage.js",
@@ -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": "b0e36936c50b3efc27dc7fb7255b39eb"
+ "checksum": "bfa57e1198eed440735f4a7fc300bd95"
},
{
"path": "src/bot/events/relationship.js",
@@ -353,7 +353,7 @@
{
"path": "src/bot/events/webSession.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/bot/events/webSession.js",
- "checksum": "9a5ae34296fcaa9912f5e7e818841fa9"
+ "checksum": "23ffa55367ac713ce9ce6c2ec4c3d913"
},
{
"path": "src/bot/helpers/checkMsgBlock.js",
@@ -373,7 +373,7 @@
{
"path": "src/bot/helpers/handleRelog.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/bot/helpers/handleRelog.js",
- "checksum": "05712aba973391541848a6940b0de537"
+ "checksum": "3808cfde6f188582a539628ef4f5eb76"
},
{
"path": "src/bot/helpers/steamChatInteraction.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",
@@ -398,7 +398,7 @@
{
"path": "src/commands/core/favorite.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/commands/core/favorite.js",
- "checksum": "9d4660400dd151196fa2b39d0ce353b6"
+ "checksum": "9dc47165909fdf357c25ba775129e74a"
},
{
"path": "src/commands/core/follow.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",
@@ -438,7 +438,7 @@
{
"path": "src/commands/core/vote.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/commands/core/vote.js",
- "checksum": "5c856ea5d20db8355061a2c277178bea"
+ "checksum": "f69c2827cc333b67d34075a14d8b40e4"
},
{
"path": "src/commands/helpers/getCommentArgs.js",
@@ -503,7 +503,7 @@
{
"path": "src/controller/events/statusUpdate.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/controller/events/statusUpdate.js",
- "checksum": "3d8ee1a34d7d4f9911ade350dd03b7f7"
+ "checksum": "5a7c66ae19eb320bacf6d2c2abeba9d6"
},
{
"path": "src/controller/events/steamGuardInput.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": "570541d6fd32b83f1e52d814173a42b3"
+ "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",
@@ -728,7 +728,7 @@
{
"path": "src/sessions/helpers/tokenStorageHandler.js",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/src/sessions/helpers/tokenStorageHandler.js",
- "checksum": "edd3065f5f2d0a9b5e178d5dfc701ded"
+ "checksum": "3b7bee517850238ba69d7e369cd0950b"
},
{
"path": "src/sessions/sessionHandler.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 {
diff --git a/src/sessions/helpers/tokenStorageHandler.js b/src/sessions/helpers/tokenStorageHandler.js
index 7fcdfaea..02fa7401 100644
--- a/src/sessions/helpers/tokenStorageHandler.js
+++ b/src/sessions/helpers/tokenStorageHandler.js
@@ -4,7 +4,7 @@
* Created Date: 2022-10-10 12:53:20
* Author: 3urobeat
*
- * Last Modified: 2024-02-27 17:27:32
+ * Last Modified: 2024-03-08 17:49:48
* Modified By: 3urobeat
*
* Copyright (c) 2022 - 2024 3urobeat
@@ -61,7 +61,7 @@ SessionHandler.prototype._getTokenFromStorage = function(callback) {
// Compare expire value (unix timestamp in seconds) to current date
if (jwtObj.exp * 1000 > Date.now()) {
- logger("info", `[${this.bot.logPrefix}] Found valid token until '${validUntilStr}' in tokens.db! Logging in with it to reuse session...`, false, true, logger.animation("loading"));
+ logger("debug", `[${this.bot.logPrefix}] Found valid token until '${validUntilStr}' in tokens.db! Logging in with it to reuse session...`, false, true);
callback(doc.token);
} else {
logger("info", `[${this.bot.logPrefix}] Found invalid token in tokens.db. It was valid till '${validUntilStr}'. Logging in with credentials to get a new session...`, false, true, logger.animation("loading"));