Skip to content

Commit

Permalink
Version 2.13.5
Browse files Browse the repository at this point in the history
Merge pull request #194
  • Loading branch information
3urobeat authored Jul 9, 2023
2 parents 0faa0d9 + cd2683b commit 75779db
Show file tree
Hide file tree
Showing 82 changed files with 3,682 additions and 1,428 deletions.
21 changes: 20 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"parserOptions": {
"ecmaVersion": 11
},
"plugins": [
"jsdoc"
],
"rules": {
"no-var": "error",
"no-redeclare": "off",
Expand All @@ -37,7 +40,23 @@
"semi-spacing": "error",
"semi-style": ["error", "last"],
"quotes": ["error", "double", { "avoidEscape": true }],
"spaced-comment": "warn"
"spaced-comment": "warn",

// JsDoc - https://github.com/gajus/eslint-plugin-jsdoc
"jsdoc/check-alignment": "warn",
"jsdoc/check-indentation": "warn",
"jsdoc/check-types": "warn",
"jsdoc/informative-docs": "warn",
"jsdoc/require-asterisk-prefix": "warn",
"jsdoc/require-description": "warn",
"jsdoc/require-jsdoc": "warn",
"jsdoc/require-param": "warn",
"jsdoc/require-param-name": "warn",
"jsdoc/valid-types": "warn",
//"jsdoc/require-returns": "warn", // Always requires @return, even when function does not return something
"jsdoc/require-returns-type": "warn",
//"jsdoc/require-returns-check": "warn", // Unnecessary when require-returns above is disabled
"jsdoc/require-returns-description": "warn"
},
"ignorePatterns": ["src/libraryPatches/*"]
}
2 changes: 1 addition & 1 deletion accounts.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
//Comment: This file is used to provide your bot accounts in the form of username:password. Read the instructions here: https://github.com/HerrEurobeat/steam-comment-service-bot#accounts
//Comment: This file is used to provide your bot accounts in the form of username:password. Read the instructions here: https://github.com/3urobeat/steam-comment-service-bot#accounts
2 changes: 2 additions & 0 deletions docs/wiki/adding_proxies.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Adding proxies
[⬅️ Go back to wiki home](./)

 

If you are using 10+ accounts I encourage you to use proxies.
It drastically reduces the amount of requests on one IP by equally spreading all accounts onto different IPs, allowing you to comment more and faster, reducing the chance of an IP ban.

Expand Down
5 changes: 4 additions & 1 deletion docs/wiki/advancedconfig_doc.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Advanced Config Documentation
[⬅️ Go back to wiki home](./)

 

This is the full documentation to customize your `advancedconfig.json`.

**Note:** These settings are meant for advanced users. Everything important is located in the `config.json` file and you probably don't need to change anything here.


 

| Key | Usage | Description |
| ------------- | ---------------- | ------------ |
| \_disclaimer\_ | String | No functionality. Just a comment pointing to the normal config. |
Expand Down
49 changes: 41 additions & 8 deletions docs/wiki/changelogs/CHANGELOG_v2.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [2.13.2](#2.13.2)
- [2.13.3](#2.13.3)
- [2.13.4](#2.13.4)
- [2.13.5](#2.13.5)

 

Expand All @@ -35,8 +36,8 @@ If you are using a `customlang.json`, make sure to read the language string chan
- Added a library patches system to load my changes until [my PR to the SteamCommunity library gets accepted](https://github.com/DoctorMcKay/node-steamcommunity/pull/306)
- Added support for figuring out sharedfile IDs to the handleSteamIdResolving() helper
- Added a ratingHistory database to track which bot accounts have voted on or favorized which item
- Added a completely new plugin system, co-author @DerDeathraven #174
- Added a plugin loader which dynamically loads all installed npm packages with the prefix `steam-comment-bot-` @DerDeathraven #174
- Added a completely new plugin system, co-author @DerDeathraven [#174](https://github.com/3urobeat/steam-comment-service-bot/pull/174)
- Added a plugin loader which dynamically loads all installed npm packages with the prefix `steam-comment-bot-` @DerDeathraven [#174](https://github.com/3urobeat/steam-comment-service-bot/pull/174)
- Added new template plugin which you can [fork here to create your own plugin](https://github.com/3urobeat/steam-comment-bot-template-plugin)
- Added plugin functions: `load`, `ready`, `statusUpdate`, `steamGuardInput`
- Added plugin data directory and functions to handle data reading & writing: `getPluginDataPath`, `loadPluginData`, `writePluginData`, `loadPluginConfig`, `writePluginConfig`
Expand Down Expand Up @@ -120,7 +121,7 @@ If you are using a `customlang.json`, make sure to read the language string chan
 

**Fixes:**
- Fixed the webserver plugin from being completely broken #172
- Fixed the webserver plugin from being completely broken [#172](https://github.com/3urobeat/steam-comment-service-bot/issues/172)
- Fixed return parameters of checkConnection
- Fixed webSession looping caused by broken botsgroup check
- Fixed accounts.txt import still checking for loginfo.json
Expand All @@ -140,7 +141,7 @@ If you are using a `customlang.json`, make sure to read the language string chan
- Fixed cooldown issues when cooldown is disabled and process got aborted
- Fixed a data check error on broken internet connection by checking it beforehand
- Fixed handleLoginTimeout causing a DuplicateRequest error on 2FA input
- Fixed output-logger causing crash when running bot with pm2 #48
- Fixed output-logger causing crash when running bot with pm2 [#48](https://github.com/3urobeat/steam-comment-service-bot/issues/48)
- Fixed potential bug where whenAvailableStr in comment command could display wrong information if allAccounts was empty or if more accounts got removed after the activeRequests loop ran 9e6c569
- Fixed/Removed minor unnecessary checks in comment command
- Fixed user added while offline message being able to fail because it was sent too early after logging in
Expand All @@ -151,8 +152,8 @@ If you are using a `customlang.json`, make sure to read the language string chan
- Removed support for the old login flow: f5957bb
- Removed v2.13 login flow change notification message
- Removed `disableCommentCmd` setting from `advancedconfig.json` and replaced it with `restrictAdditionalCommandsToOwners` array
- Removed `enableurltocomment` setting from `advancedconfig.json`. Toggling the webserver plugin is now done in the plugin config in the `plugins` directory #172
- Removed `urlrequestsecretkey` from `data.json`. This key is now stored in the plugin config in the `plugins` directory. The update will cause a new key to be generated. #172
- Removed `enableurltocomment` setting from `advancedconfig.json`. Toggling the webserver plugin is now done in the plugin config in the `plugins` directory [#172](https://github.com/3urobeat/steam-comment-service-bot/issues/172)
- Removed `urlrequestsecretkey` from `data.json`. This key is now stored in the plugin config in the `plugins` directory. The update will cause a new key to be generated. [#172](https://github.com/3urobeat/steam-comment-service-bot/issues/172)
- Removed most global variables
- Removed (nearly) every usage of `var`
- Removed lots of unnecessary variables that are now replaced by better systems
Expand All @@ -165,7 +166,7 @@ If you are using a `customlang.json`, make sure to read the language string chan
- Moved various updater, controller & bot helper files to new objects
- Moved various log messages to log at more appropriate times
- Shortened most comment error descriptions
- Improved eslint styling rules, formatting & code quality and added prettier config @DerDeathraven #171
- Improved eslint styling rules, formatting & code quality and added prettier config @DerDeathraven [#171](https://github.com/3urobeat/steam-comment-service-bot/pull/171)
- Updated dependencies
- Tons of fixes for features that have been added in this update and are therefore not listed here
- Minor other changes
Expand Down Expand Up @@ -365,4 +366,36 @@ Commit: [24984d6](https://github.com/3urobeat/steam-comment-service-bot/commit/2
- Updated dependencies
- Minor other changes

Commit: [829c387](https://github.com/3urobeat/steam-comment-service-bot/commit/829c387)
Commit: [829c387](https://github.com/3urobeat/steam-comment-service-bot/commit/829c387)

 

<a id="2.13.5"></a>

## **2023-07-09, Version 2.13.5**, co-author [@DerDeathraven](https://github.com/DerDeathraven)
**Additions:**
- Aggregate old config files for plugins [@DerDeathraven](https://github.com/DerDeathraven) [#188](https://github.com/3urobeat/steam-comment-service-bot/pull/188)
- Added arguments documentation to all commands
- Added command descriptions from wiki to all commands
- Added data export functions to DataManager to write all data files back to the disk
- Added JsDoc eslint rules and enforced them
- Added Command and CommandArg typedef in CommandHandler

**Fixes:**
- Potentially fixed SteamCommunity library scraping sharedfile error caused by non-English page being returned by Steam
- Fixed reload not clearing plugin cache when using 'npm link' [@DerDeathraven](https://github.com/DerDeathraven) [#192](https://github.com/3urobeat/steam-comment-service-bot/pull/192)
- Fixed reload not clearing plugin cache of subfolders
- Fixed plugins reading core commands on load getting an empty array because `_importCoreCommands()` wasn't being awaited

**Changes:**
- Wiki: Updated Integrating into your app and Creating Plugins [@DerDeathraven](https://github.com/DerDeathraven) [#189](https://github.com/3urobeat/steam-comment-service-bot/pull/189)
- Wiki: Rewrote Steam Limitations page, rewrote Integrating into your app page, updated various command descriptions, added missing step to npm link explanation and more misc improvements
- Plugin data handling functions will now throw errors on missing parameters
- Data Check will now throw errors instead of rejecting with a string
- Cleaned up a few unnecessarily nested promises
- Enforced lowercase primitive types in JsDocs
- Updated every mention of my old username
- Updated dependencies
- Minor other changes

Commit: [](https://github.com/3urobeat/steam-comment-service-bot/commit/)
31 changes: 18 additions & 13 deletions docs/wiki/commands_doc.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Commands documentation
[⬅️ Go back to wiki home](./)

&nbsp;

This is the full documentation of all commands. Most commands have aliases but some might be missing in this list.
[Try them out!](https://steamcommunity.com/id/3urobeatscommentbot/)

&nbsp;

| Command | Usage/Arguments | Description |
| ------------- | ---------------- | ------------ |
| !help | No arguments | Returns a list of commands available to you and a link to this page. |
Expand All @@ -12,30 +16,31 @@ This is the full documentation of all commands. Most commands have aliases but s
| !downvote | `amount ID` | Downvotes a sharedfile with all bot accounts that haven't yet voted on that item. Requires unlimited accounts! (Owner only.) |
| !favorite | `amount ID` | Favorizes a sharedfile with all bot accounts that haven't yet favorized that item. |
| !unfavorite | `amount ID` | Unfavorizes a sharedfile with all bot accounts that have favorized that item. (Owners only.) |
| !ping | No arguments | Returns a `'Pong!'` and ping to Steam's servers. Can be used to check if the bot is responsive |
| !ping | No arguments | Returns ping in ms to Steam's servers. Can be used to check if the bot is responsive |
| !info | No arguments | Returns useful information and statistics about the bot and you. |
| !owner | No arguments | Returns a link to the owner's profile set in the config.json. |
| !group | No arguments | Sends an invite or responds with the group link set as yourgroup in the config. |
| !abort | `profileid` | Abort your own comment process. Owners can also provide a profile id to abort a comment process for that profile. |
| !abort | `ID` | Abort your own comment process or one on another ID you have started. Owners can also abort requests started by other users. |
| !resetcooldown | `profileid` or `global` | Clear your, the profileid's or the comment cooldown of all bot accounts (global). Alias: !rc (Owner only.) |
| !settings | `config key` `new value` | Change a value in the config. (Owner only.) |
| !failed | `profileid` | See the exact errors of your last comment request. Owners can also provide a profile id to show errors for that profile. |
| !sessions | No arguments | Displays all active comment processes. (Owner only.) |
| !mysessions | No arguments | Displays all active comment processes for your profile. |
| !about | No arguments | Returns the link to this repository, my steam profile and a donation link.<br />The message also contains a disclaimer as well as a link to the owner's profile set in the config.json. |
| !addfriend | `profileid` | Adds the profileid with all bot accounts. **This only works with unlimited accounts!** (Owner only.) |
| !unfriend | `profileid` | Unfriends the associated user from all logged in accounts if he is still on their friendlist. (Owner only.) Providing no argument will let all bots unfriend you. (Available to normal users) |
| !failed | `ID` | See the exact errors of the last comment request on your profile or provide an ID to see the errors of the last request you started. Owners can also view errors for requests started by other users. |
| !sessions | No arguments | Displays all active requests. (Owner only.) |
| !mysessions | No arguments | Displays all active requests that you have started. |
| !about | No arguments | Displays information about this project. The message also contains a disclaimer as well as a link to the owner's profile set in the config.json. |
| !addfriend | `profileid` | Adds the profileid with all bot accounts. Requires unlimited accounts! (Owner only.) |
| !unfriend | `profileid` | Unfriends a user from all logged in accounts. (Owner only.) Providing no argument will let all bots unfriend you. (Available to normal users) |
| !unfriendall | `"abort"` | Unfriends everyone with all bot accounts. (Owner only.) |
| !leavegroup | `groupid64` or `group url` | Leave this group with all bot accounts. (Owner only.) |
| !joingroup | `groupid64` or `group url` | Joins a Steam Group with all bot accounts. (Owner only.) |
| !leavegroup | `groupid64` or `group url` | Leaves a group with all bot accounts. (Owner only.) |
| !leaveallgroups | `"abort"`      | Leaves all groups with all bot accounts. (Owner only.) |
| !block | `profileid`      | Blocks the user on Steam. (Owner only.) |
| !unblock | `profileid`      | Unblocks the user on Steam. Note: The user still seems to be ignored for a few days by Steam. (Owner only.) |
| !block | `profileid`      | Blocks a user with all bot accounts on Steam. (Owner only.) |
| !unblock | `profileid`      | Unblocks a user with all bot accounts on Steam. Note: The user can still get ignored by Steam for a while. (Owner only.) |
| !reload | No arguments | Reloads all commands and plugins without needing to restart. Please only use it for testing/development. Alias: !rl (Owner only.) |
| !restart | No arguments | Restarts the bot and checks for available updates. Alias: !rs (Owner only.) |
| !stop | No arguments | Stops the bot. (Owner only.) |
| !update | `true` | Checks for an available update and installs it if automatic updates are enabled and no comment sessions are active. 'true' forces an update. Blocks new comment requests if it currently waits for one to be completed. |
| !update | `true` | Checks for an available update and installs it if automatic updates are enabled and no requests are active. 'true' forces an update. Blocks new requests if it currently waits for one to be completed. (Owner only.) |
| !log | No arguments | Shows the last 15 lines of the log. (Owner only.) |
| !eval | `javascript code` | Disabled by default, needs to be toggled on with `enableevalcmd` in config.json.<h4>**Warning!** This will run any javascript code that was provided. It is strongly advised to leave this feature off unless you know exactly what this means! If you have multiple owners configured they also can run code on **your** machine!</h4> (Owner only.) |
| !eval | `javascript code` | Disabled by default, needs to be toggled on with `enableevalcmd` in config.json.<h4>**Warning!** This will run any javascript code that was provided. It is strongly advised to leave this feature off unless you know exactly what this means! If you have multiple owners configured they can also run code on **your** machine!</h4> (Owner only.) |

<br /><br />
To get more information about responses in form of an error that one of these commands could return, visit the `Errors & FAQ` page in this wiki.
Expand Down
5 changes: 4 additions & 1 deletion docs/wiki/config_doc.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Config Documentation
[⬅️ Go back to wiki home](./)

&nbsp;

This is the full documentation to customize your `config.json`.

**Note:** You don't need to change any values except the owner and ownerid values. Everything else is configured to work out of the box but there might be better settings for your specific situation. Recommendation: Try the default values and customize them if you get errors/problems.


&nbsp;

| Key | Usage | Description |
| ------------- | ---------------- | ------------ |
Expand Down
Loading

0 comments on commit 75779db

Please sign in to comment.