Skip to content

Commit

Permalink
Update config & advancedconfig docs and improve logging of primaryGro…
Browse files Browse the repository at this point in the history
…up setting
  • Loading branch information
3urobeat committed Oct 21, 2023
1 parent 865b467 commit 6b3ef97
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 21 deletions.
24 changes: 16 additions & 8 deletions docs/wiki/advancedconfig_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,33 @@ This is the full documentation to customize your `advancedconfig.json`.
| \_disclaimer\_ | String | No functionality. Just a comment pointing to the normal config. |
| \_help\_ | String | No functionality. Links directly to here to provide easily accessible explanations. |
| disableautoupdate | true or false | Disables auto updates. **Setting to true is not recommended!** Default: false |
| loginDelay | Number in ms | Time the bot will wait between logging in each account to prevent an IP ban. Default: 2500 |
| loginTimeout | Number in ms | Time after which an active login attempt will be considered as timed out and failed. It will be retried or skipped when maxLogOnRetries is exceeded. Set to 0 to disable. Default: 60000 |
| loginRetryTimeout | Number in ms | Time the bot will wait after loosing connection to Steam before trying to check if Steam/your internet is up again. Default: 30000 |
|   | | |
| loginDelay | Number in ms | Time the bot will wait between logging in each account to prevent an IP ban. Default: 2500 (2.5 seconds) |
| loginTimeout | Number in ms | Time after which an active login attempt will be considered as timed out and failed. It will be retried or skipped when maxLogOnRetries is exceeded. Set to 0 to disable. Default: 60000 (60 seconds) |
| loginRetryTimeout | Number in ms | Time the bot will wait after loosing connection to Steam before attempting to log in again. Default: 30000 (30 seconds) |
| relogTimeout | Number in ms | Time the bot will wait after failing all reconnect attempts before trying again. Default: 900000 (15 minutes) |
| maxLogOnRetries | Number | Amount of times the bot will retry logging in to an account if the first try fails. Default: 1 |
| useLocalIP | true or false | If the bot should use your real IP as well when using proxies. Default: true |
|   | | |
| acceptFriendRequests | true or false | If the bot should accept friend requests. Default: true |
| forceFriendlistSpaceTime | Number in days | Amount of days a user hasn't requested comments to get unfriended if only one friend slot is left. Set to 0 to disable. Default: 4 |
| setPrimaryGroup | true or false | If the bot should set `yourgroup` in `config.json` as the primary group of each bot. **Does currently not work because of node-steamcommunity!** Default: false |
| commandCooldown | Number in ms | Timeframe in which a user is allowed to use 5 commands before it is considered as spamming and the user gets blocked for 90 seconds. Default: 12000 |
| forceFriendlistSpaceTime | Number in days | Amount of days a user hasn't requested something to get unfriended if only one friend slot is left. Set to 0 to disable. Default: 4 |
| setPrimaryGroup | true or false | If the bot should set `yourgroup` in `config.json` as the primary group of each bot. Default: false |
|   | | |
| commandCooldown | Number in ms | Timeframe in which a user is allowed to use 5 commands before it is considered as spamming and the user gets blocked for 90 seconds. Default: 12000 (12 seconds) |
| restrictAdditionalCommandsToOwners | Array with cmd names as strings | Restricts more commands and their aliases to owners only. Default: [] |
| retryFailedComments | true or false | If the bot should retry comments that failed in a comment request. Default: false |
| retryFailedCommentsDelay | Number in ms | Time the bot will wait before retrying the failed comments. Default: 300000 |
| retryFailedCommentsDelay | Number in ms | Time the bot will wait before retrying the failed comments. Default: 300000 (5 minutes) |
| retryFailedCommentsAttempts | Number | How often the bot should retry a failed comment. Default: 1 |
| lastQuotesSize | Number | Amount (minus 1) of different quotes that need to be selected in between before a quote can be used again. Default: 5 |
|   | | |
| enableevalcmd | true or false | The eval command allows the botowner to run javascript code from the steam chat. **Warning: This can harm your machine! Leave it to false if you don't know what you are doing!** Default: false |
| enableurltocomment | true or false | Enables or disables the webserver plugin to request comments via URL and to view the log from your browser. Default: false |
| printDebug | true or false | Enables and logs debug messages of the bot. Default: false |
| steamUserDebug | true or false | Enables and logs debug messages of the steam-user lib. Default: false |
| steamUserDebugVerbose | true or false | Enables and logs debug-verbose messages of the steam-user lib. Default: false |
| steamSessionDebug | true or false | Enabled and logs debug messages of the steam-session lib. Default: false |
| logAnimationSpeed | Number in ms | Time the logging lib will wait between each frame of an animation. Default: 250 |

 

The undocumented `dummy` keys are there to group certain settings together to improve visibility.
They serve no other purpose and can be ignored.
13 changes: 7 additions & 6 deletions docs/wiki/config_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ This is the full documentation to customize your `config.json`.
| Key | Usage | Description |
| ------------- | ---------------- | ------------ |
| \_help\_ | String | No functionality. Links directly to here to provide easily accessible explanations. |
| requestDelay | Number in ms | Adds a delay between each comment to prevent a cooldown from steam. Default: 7500
| defaultLanguage | String | Default language to use for new users adding your bot account. [List of supported languages](/src/data/lang/) - Default: "english" |
| requestDelay | Number in ms | Adds a delay between each comment to prevent a cooldown from steam. Default: 15000 (15 seconds) |
| skipSteamGuard | true or false | When true, the bot will skip all accounts that require a steamGuard to be typed in when logging in. Default: false |
| requestCooldown | Number in min | Applies this cooldown in minutes to every user after they requested comments. Set to 0 to disable. Default: 5
| botaccountcooldown | Number in min | Applies this cooldown to every bot account used in a comment request to prevent getting a cooldown from steam. Set to 0 to disable. Default: 10 |
| maxRequests | Number | Defines how many comments a normal user can request from your bot. Will automatically use accounts multiple times if it is greater than the amount of accounts logged in. |
| maxOwnerRequests | Number | Defines how many comments owners can request (every user in the ownerid array). Will automatically use accounts multiple times if it is greater than the amount of accounts logged in. |
| randomizeAccounts | true or false | Defines if the order of accounts used to comment should be random. Default: false |
| requestCooldown | Number in min | Applies this cooldown in minutes to every user after they started a request. Set to 0 to disable. Default: 5 |
| botaccountcooldown | Number in min | Applies this cooldown to every bot account used in a request to prevent getting a cooldown from Steam. Set to 0 to disable. Default: 10 |
| maxRequests | Number | Defines how many comments/likes/favs a normal user can request from your bot. Will automatically use accounts multiple times if it is greater than the amount of accounts logged in. |
| maxOwnerRequests | Number | Defines how many comments/likes/favs owners can request (every user in the ownerid list below). Will automatically use accounts multiple times if it is greater than the amount of accounts logged in. |
| randomizeAccounts | true or false | Defines if the order of accounts used to comment should be randomized. Default: false |
| unfriendtime | Days | Number of days the bot will wait before unfriending someone who hasn't requested a comment in that time period except the owner. Set to 0 to disable. |
| playinggames | `["custom game", game id, game id, ...]` | This custom text will be shown on your profile as the name of a game you are playing. The bot will play the set game ids. Don't provide a string to disable the custom game text. |
| childaccplayinggames | `["custom game", game id, game id, ...]` <br><br> or <br><br> `[{ "myacc1": ["Specific Game", 730], "myacc25": [] }, "General Game", 440]` | Same behaviour as playinggames but sets the status and games for all child accounts.<br>Use the second syntax to set specific games for specific child accounts.<br>Replace "myacc1" etc. with the username of the corresponding account.<br><br>This example will display "Specific Game" game & idle CS2 only for account "myacc1", idle nothing for account "myacc25" and display "General Game" & idle TF2 for all other accounts. |
Expand Down
9 changes: 5 additions & 4 deletions src/bot/events/webSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 09.07.2021 16:26:00
* Author: 3urobeat
*
* Last Modified: 21.10.2023 12:28:26
* Last Modified: 21.10.2023 13:13:22
* Modified By: 3urobeat
*
* Copyright (c) 2021 3urobeat <https://github.com/3urobeat>
Expand Down Expand Up @@ -123,7 +123,7 @@ Bot.prototype._attachSteamWebSessionEvent = function() {
if (this.lastDisconnect.timestamp == 0) {

/* ------------ Join botsgroup: ------------ */
logger("debug", `[${this.logPrefix}] Checking if bot account is in botsgroup...`, false, true, logger.animation("loading"));
logger("debug", `[${this.logPrefix}] Checking if bot account is in botsgroup...`);

if (this.controller.data.cachefile.botsgroupid && (!this.user.myGroups[this.controller.data.cachefile.botsgroupid] || this.user.myGroups[this.controller.data.cachefile.botsgroupid] != 3)) { // If botsgroupid is defined, not in myGroups or in it but not enum 3
this.community.joinGroup(new SteamID(this.controller.data.cachefile.botsgroupid));
Expand All @@ -134,12 +134,13 @@ Bot.prototype._attachSteamWebSessionEvent = function() {

/* ------------ Set primary group: ------------ */ // TODO: Add further delays? https://github.com/3urobeat/steam-comment-service-bot/issues/165
if (this.controller.data.advancedconfig.setPrimaryGroup && this.controller.data.cachefile.configgroup64id) {
logger("info", `[${this.logPrefix}] setPrimaryGroup is enabled and configgroup64id is set, setting ${this.controller.data.cachefile.configgroup64id} as primary group...`, false, true, logger.animation("loading"));
logger("debug", `[${this.logPrefix}] setPrimaryGroup is enabled and configgroup64id is set, setting '${this.controller.data.cachefile.configgroup64id}' as primary group...`);

this.community.editProfile({
primaryGroup: new SteamID(this.controller.data.cachefile.configgroup64id)
}, (err) => {
if (err) logger("err", `[${this.logPrefix}] Error setting primary group: ${err}`, true);
if (err) logger("err", `[${this.logPrefix}] Error setting primary group: ${err}`, false, false, null, true);
else logger("info", `[${this.logPrefix}] Successfully set '${this.controller.data.cachefile.configgroup64id}' as primary group...`, false, true, logger.animation("loading"));
});
}

Expand Down
6 changes: 3 additions & 3 deletions src/data/fileStructure.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{
"path": "docs/wiki/advancedconfig_doc.md",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/docs/wiki/advancedconfig_doc.md",
"checksum": "4842a950740cd5d658637d31161ed1db"
"checksum": "880891465a10d7047811413ba80953bf"
},
{
"path": "docs/wiki/changelogs/CHANGELOG_v1.x.md",
Expand Down Expand Up @@ -223,7 +223,7 @@
{
"path": "docs/wiki/config_doc.md",
"url": "https://raw.githubusercontent.com/3urobeat/steam-comment-service-bot/beta-testing/docs/wiki/config_doc.md",
"checksum": "3663cc9af21201dbedc6c538c2e60945"
"checksum": "aa90b71640a8950d2e12fd39c015f5ea"
},
{
"path": "docs/wiki/contributing.md",
Expand Down Expand Up @@ -343,7 +343,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": "bea3dcb436c9742093c54ab202ed70c5"
"checksum": "5ee6dbedbfbdb48981a0a87ae45fc31e"
},
{
"path": "src/bot/helpers/checkMsgBlock.js",
Expand Down

0 comments on commit 6b3ef97

Please sign in to comment.