Skip to content

Commit

Permalink
Version 2.15
Browse files Browse the repository at this point in the history
Merge pull request #236
  • Loading branch information
3urobeat authored Mar 3, 2024
2 parents 26caa70 + c9c46a3 commit be41d68
Show file tree
Hide file tree
Showing 79 changed files with 3,436 additions and 1,117 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ backup
comment-service-bot.code-workspace
output.txt
plugins/*
!plugins/steam-comment-bot-webserver*.tgz
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,7 @@ When using this project as a whole you are only allowed to edit the config files
Thank you [DoctorMcKay](https://github.com/DoctorMcKay) for creating the [steam-user](https://github.com/DoctorMcKay/node-steam-user) and [steamcommunity](https://github.com/DoctorMcKay/node-steamcommunity) libraries which this project heavily depends on!

Thank you so much to every single one who donated a dollar or two; there are now too many names to list them one by one! ❤️

 

[![Stargazers over time](https://starchart.cc/3urobeat/steam-comment-service-bot.svg?variant=adaptive)](https://starchart.cc/3urobeat/steam-comment-service-bot)
7 changes: 6 additions & 1 deletion advancedconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"_disclaimer_": "This file includes only advanced settings! Please only use the 'config.json' for setup and ignore this file if you are new!",
"_help_": "Read the docs: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/advancedconfig_doc.md",
"disableAutoUpdate": false,
"disablePluginsAutoUpdate": false,
"dummy0": "------------------- Login Settings: -------------------",
"loginDelay": 2500,
"loginTimeout": 60000,
Expand All @@ -13,6 +14,9 @@
"acceptFriendRequests": true,
"forceFriendlistSpaceTime": 4,
"setPrimaryGroup": false,
"onlineStatus": "Online",
"childAccOnlineStatus": "Online",
"blockPluginLoadOnMismatchedBotVersion": false,
"dummy2": "------------------- Request Settings: -------------------",
"commandCooldown": 12000,
"restrictAdditionalCommandsToOwners": [],
Expand All @@ -22,9 +26,10 @@
"lastQuotesSize": 5,
"dummy3": "------------------- Debug Settings: -------------------",
"enableevalcmd": false,
"disableSendingRequests": false,
"printDebug": false,
"steamUserDebug": false,
"steamUserDebugVerbose": false,
"steamSessionDebug": false,
"logAnimationSpeed": 250
}
}
3 changes: 2 additions & 1 deletion docs/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The order of this list represents the order in which they are instantiated when
- [Controller](./controller/controller.md)
- [DataManager](./dataManager/dataManager.md)
- [Updater](./updater/updater.md)
- [JobManager](./jobs/jobManager.md)
- [Bot](./bot/bot.md)
- [sessionHandler](./sessionHandler/sessionHandler.md)
- [CommandHandler](./commands/commandHandler.md)
Expand All @@ -37,4 +38,4 @@ Discord: @3urobeat

 

> Steam Comment Service Bot - Created with ❤️ and a lot of time.
> Steam Comment Service Bot - Created with ❤️ and a lot of time.
18 changes: 18 additions & 0 deletions docs/dev/jobs/jobManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# JobManager
[⬅️ Go back to dev home](../#readme) <a href="/src/jobs/jobManager.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>

&nbsp;

The JobManager is a module for managing reoccurring intervals, also called jobs.
For example, the updater registers a job by default to handle the update check, which runs every 6 hours.

Jobs are registered at runtime by calling `registerJob(job: Job)`, where job is an object which includes metadata and the function to execute.
This feature is also available to Plugins, as documented on the [Creating Plugins page](../../wiki/creating_plugins.md#jobmanager).

The job manager should be used whenever possible to reduce points of failure.
Do not register intervals yourself, let this do it for you.

&nbsp;

Every function and object property is documented with JsDocs in the implementation file.
Please check them out using your IntelliSense or by clicking the button in the top right corner of this page.
9 changes: 7 additions & 2 deletions docs/wiki/advancedconfig_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ 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 |
| disableAutoUpdate | true or false | Disables auto updates. **Setting to true is not recommended!** Default: false |
| disablePluginsAutoUpdate | true or false | Disables the automatic updating of all installed plugins upon start. Default: false |
| &nbsp; | | |
| 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) |
Expand All @@ -25,6 +26,9 @@ This is the full documentation to customize your `advancedconfig.json`.
| 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 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 |
| onlineStatus | String | Online status of the main bot account. You can see all valid values [here](https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js). Default: "Online" |
| childAccOnlineStatus | String | Online status of all child bot accounts. You can see all valid values [here](https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js). Default: "Online" |
| blockPluginLoadOnMismatchedBotVersion | true or false | If true, plugins not specifically made for this bot version will be blocked from being loaded. Default: false |
| &nbsp; | | |
| 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: [] |
Expand All @@ -34,6 +38,7 @@ This is the full documentation to customize your `advancedconfig.json`.
| lastQuotesSize | Number | Amount (minus 1) of different quotes that need to be selected in between before a quote can be used again. Default: 5 |
| &nbsp; | | |
| 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 |
| disableSendingRequests | true or false | Disables sending comments/likes/favs/follows to Steam. This allows the testing of accepting and handling user requests, without sending them to Steam. 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 |
Expand All @@ -43,4 +48,4 @@ This is the full documentation to customize your `advancedconfig.json`.
&nbsp;

The undocumented `dummy` keys are there to group certain settings together to improve visibility.
They serve no other purpose and can be ignored.
They serve no other purpose and can be ignored.
2 changes: 2 additions & 0 deletions docs/wiki/changelogs/CHANGELOG_v2.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,5 @@ Commit: [b4072cf](https://github.com/3urobeat/steam-comment-service-bot/commit/b
- Wiki: Improved `unfriendtime` config key explanation
- Updated dependencies
- Minor other changes

Commit: [26caa70](https://github.com/3urobeat/steam-comment-service-bot/commit/26caa70)
141 changes: 141 additions & 0 deletions docs/wiki/changelogs/CHANGELOG_v2.15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Version 2.15.x Changelog
[⬅️ Go back to version overview](../version_changelogs.md)

&nbsp;

**Current**
- [2.15.0](#2.15.0)

&nbsp;

<a id="2.15.0"></a>

## **2024-03-03, Version 2.15.0**
**Changes of note (TL;DR):**
- Added new commands: `!funnyvote`, `!jobs`
- Added support for commenting and voting on reviews and for commenting on eventcomments discussions
- Drastically decreased startup time for larger instances with many proxies by applying logindelay per proxy instead of per account
- Added QR-Code login
- Added a JobManager to group routinely executed functions in one place and allowing the registration and unregistration of jobs during runtime
- Added automatic plugin update on boot and `botVersion` parameter to check and warn of version mismatch

If you are using a `customlang.json`, make sure to read the language string changes at the end and update your file.
If you've made a plugin, check the 'Creating Plugins' wiki page and add the `botVersion` parameter to your `package.json`.

&nbsp;
&nbsp;

**Additions:**
- Added new commands: `!funnyvote`, `!jobs`
- Added support for commenting and voting on reviews! Suggestion in [#207](https://github.com/3urobeat/steam-comment-service-bot/issues/207)
- Updated `!comment` command to accept reviews
- Updated `!upvote` & `!downvote` commands to accept reviews
- Added `!funnyVote` command for reviews
- Added review detection support to handleSteamIdResolving helper
- Added a library patch to load my changes until [my PR to the SteamCommunity library gets accepted](https://github.com/DoctorMcKay/node-steamcommunity/pull/335)
- Added support for commenting on eventcomments discussions! Suggestion in [#219](https://github.com/3urobeat/steam-comment-service-bot/issues/219)
- Updated the discussion library patch associated to [my SteamCommunity library PR](https://github.com/DoctorMcKay/node-steamcommunity/pull/319)
- Added a JobManager system
- The JobManager groups routinely executed functions in one place and allows the registration and unregistration of jobs during runtime
- Added `!jobs` command to see registered jobs directly from the Steam Chat (or any other Plugin which implements the CommandSystem)
- Added Chinese & Portuguese translation [@isyuricunha](https://github.com/isyuricunha) in [#232](https://github.com/3urobeat/steam-comment-service-bot/pull/232), Chinese updated by Scaperace
- Added automatic Plugin update on boot system
- Added `botVersion` parameter in `package.json` requirement to plugins
- Added a version mismatch check with warning message when plugin is loaded
- Added a `blockPluginLoadOnMismatchedBotVersion` setting to `advancedconfig.json` to manually block loading of plugins with mismatched `botVersion` parameters
- Added support for logging in with a Steam Mobile App QR-Code
- Added support for setting online status for main account and child accounts in `advancedconfig.json`
- Added `disableSendingRequests` setting to `advancedconfig.json`
- Added `!requests` alias to `!sessions` and `!myrequests` alias to `!mysessions`
- Added EIdTypes enum to handleSteamIdResolving to document supported results
- Added a `!lang` cmd reference, including how many languages are currently supported, to `useradded` message
- Added `duplicateQuotesDetector.js` script to detect duplicate strings in `quotes.txt` file
- Added login cooldown/block detection to SessionHandler
- Added a stargazers over time chart to `README.md`

&nbsp;

**Reworks:**
- Logindelay is now applied per proxy instead of per account to greatly improve login speed for larger instances
- Accounts are divided into a fastQueue & slowQueue, depending on if they require user interaction (e.g. Steam Guard code input)
- Added POSTPONED bot EStatus to signal that account in fastQueue needs to be transferred to slowQueue
- Updated associated estimated login time calculation
- Improved logging of login progress and online status events
- Added more login guards to potentially prevent unwanted login requests
- Languages are now loaded dynamically on startup, instead of being hardcoded
- Reworked voting commands to compress `!upvote` and `!downvote` into one function
- Converted existing individual intervals to JobManager jobs
- Improved information logged by npminteraction handler for first time users
- Improved translating chapter on contribution wiki page
- Improved errors_doc wiki page as it was pretty outdated
- Improved Setup Guide wiki page styling with markdown highlights
- Improved various JsDocs

&nbsp;

**Fixes:**
- Fixed new refreshToken not getting stored because event was not being handled
- Fixed plugins not being able to be installed without updating `fileStructure.json` by ignoring `package.json` in script
- Fixed player_name retrieval fail throwing error when user isn't cached when receiving or sending chat messages, e.g. immediately after accepting a friend request
- Fixed lang import failing when folder or only `english.json` is missing
- Fixed certain class props not being included in `types.d.ts` because a JsDoc was missing or incorrect
- Fixed `useradded` message being able to fail when sending too quickly after accepting friend request by delaying it by 2.5 seconds
- Fixed `!update` response messages being able to fail because accounts were logged off too fast by delaying initiateUpdate() call by 2.5 seconds
- Fixed incorrect command name `!vote` in help message by changing it to `!upvote`
- Fixed line number in dataImport quotes check warning message being wrongly offset by 1
- Fixed wrong/missing variable syntax in language strings associated to `!update` command
- Fixed wrong/missing variable syntax in `commentretrying` language string
- Fixed multiple "Already attempting to log on, cannot log on again" errors caused during login/relog, introduced by recent steam-user update
- Fixed low friendlist space warning showing bot[object Object]
- Fixed duplicate login requests being able to happen when login error handler and login timeout handler took action at the same time
- Fixed CommandHandler's `runCommand()` throwing error when resInfo parameter was `undefined`
- De-duped strings in `quotes.txt` file

&nbsp;

**Changes:**
- All request types will now enforce maxRequest settings set in `config.json`. Previously only the comment command would enforce it.
- Improved up-/downvote ratingHistory database operations
- Improved missing accounts error message in vote and curatorFollow requests by returning specific nounlimited message
- Primary Group will now only be set if not already done. This does not reduce amount of requests (unless Steam weights requests differently and a editProfile request is heavier than a profile fetch) made but rather reduces log-noise
- Generalized requesttoohigh & commentnounlimitedaccs language strings to be used for all request types
- The dataIntegrity check is now getting executed slightly earlier on startup
- Updated `steam-comment-bot-template`, `steam-comment-bot-webserver`, `steam-comment-bot-discord-plugin` and `steam-comment-bot-rest` ([#7](https://github.com/DerDeathraven/steam-comment-bot-rest-api/pull/7), [#8](https://github.com/DerDeathraven/steam-comment-bot-rest-api/pull/8)) to v2.15
- Plugin `steam-comment-bot-webserver` is now shipped as a NPM registry package instead of as a locally packed one
- Updated russian translation by [@sashascurtu](https://github.com/sashascurtu) in [#235](https://github.com/3urobeat/steam-comment-service-bot/pull/235)
- Disabled now unused 32 bit int limit `requestDelay * maxRequests` startup check
- Updated wiki pages (config_doc, advancedconfig_doc, commands_doc, creating_plugins, steam_limitations, setup_guide) to accomodate changes made in this update
- Updated dependencies
- Minor other changes

<details>
<summary>Click me to see updated language strings</summary>

- These language keys have been added:
- genericnounlimitedaccs
- voteunsupportedtype
- requesttoohigh
- invalidreviewid
- errloadingreview
- jobscmdregistered
- jobscmdnoneregistered
- These language keys have been removed:
- commentrequesttoohigh
- commentnounlimitedaccs
- These language key's values have changed:
- commentcmdusageowner
- commentcmdusageowner2
- commentinvalidid
- commentunsupportedtype
- commentretrying
- useradded
- updatecmdforce
- updatecmdcheck
- helpvote
- helpfavorite
- abortcmdnoprocess
- failedcmdnothingfound

This list was generated using my [langStringsChangeDetector.js](/scripts/langStringsChangeDetector.js) script.

</details>
Loading

0 comments on commit be41d68

Please sign in to comment.