Skip to content

Commit

Permalink
Version 2.13.6
Browse files Browse the repository at this point in the history
Merge pull request #202
  • Loading branch information
3urobeat authored Jul 26, 2023
2 parents 75779db + 5f32df0 commit 326c14a
Show file tree
Hide file tree
Showing 49 changed files with 649 additions and 347 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Open the `accounts.txt` file and provide your accounts in the `username:password
If you don't want to use a shared_secret just leave it out and only provide the account in the `username:password` format.

Please make sure you know about limited/unlimited accounts. Your accounts also need to have E-Mail Steam Guard active.
You can read a detailed explanation [here in the wiki](https://github.com/3urobeat/steam-comment-service-bot/wiki/Steam-limitations).
You can read a detailed explanation [here in the wiki](https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/steam_limitations.md).

<details>
<summary>Another, optional method (not recommended anymore):</summary>
Expand Down Expand Up @@ -122,7 +122,7 @@ Head over to your Steam client, add the main bot (the first account in your acco
It should respond with a list of commands available to you.

To request a comment, simply type `!comment 1`! [Click to see Demo](https://youtu.be/8J78rC9Z28U?t=294)
You can see all commands and their usage [here in the wiki](https://github.com/3urobeat/steam-comment-service-bot/wiki/Commands-documentation).
You can see all commands and their usage [here in the wiki](https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/commands_doc.md).

## **Additional Information:** [![YouTube](https://img.shields.io/badge/YouTube-Tutorial%20section-red)](https://youtu.be/8J78rC9Z28U?t=339)
Hey, if you like this project please consider donating a buck on my [PayPal!](https://paypal.me/3urobeat)
Expand Down
2 changes: 1 addition & 1 deletion advancedconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_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/wiki/Advanced-Config-Documentation",
"_help_": "Read the docs: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/advancedconfig_doc.md",
"disableAutoUpdate": false,
"loginDelay": 2500,
"loginTimeout": 60000,
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_help_": "Read the docs: https://github.com/3urobeat/steam-comment-service-bot/wiki/Config-documentation",
"commentdelay": 15000,
"_help_": "Read the docs: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/config_doc.md",
"skipSteamGuard": false,
"commentcooldown": 5,
"botaccountcooldown": 10,
Expand Down
2 changes: 1 addition & 1 deletion customlang.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"note": "Please read here on how to use this file: https://github.com/3urobeat/steam-comment-service-bot/wiki/How-to-add-custom-messages"
"note": "Please read here on how to use this file: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/customlang_doc.md"
}
38 changes: 38 additions & 0 deletions docs/wiki/changelogs/CHANGELOG_v2.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [2.13.3](#2.13.3)
- [2.13.4](#2.13.4)
- [2.13.5](#2.13.5)
- [2.13.6](#2.13.6)

&nbsp;

Expand Down Expand Up @@ -398,4 +399,41 @@ Commit: [829c387](https://github.com/3urobeat/steam-comment-service-bot/commit/8
- Updated dependencies
- Minor other changes

Note: The russian translation added by [@Blueberryy](https://github.com/Blueberryy) in #186 will be noted in Version 2.14.0 with the upcoming improved language system.

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

&nbsp;

<a id="2.13.6"></a>

## **2023-07-26, Version 2.13.6**
**Additions:**
- The !info command now logs amount of loaded plugins instead of maxComments & commentdelay settings
- Added support for reloading data from the disk using the !reload command

**Fixes:**
- Fixed error on loading sharedfiles when breadcrumbs are incomplete
- Fixed bot waiting for user object of skipped accounts which aren't last to be populated
- Fixed soft-lock with infinite error spam caused by user object populated check if lastBot is undefined
- Fixed possibility of a duplicate handleExpiringTokens interval when DataManager's _importFromDisk() function is called multiple times

**Changes:**
- Reworked how commands accept and use message sender IDs to greatly improve plugin support:
- Removed the steamID64 parameter and replaced it with resInfo.userID
- Commands do not (and must not) expect a userID property to be provided anymore
- Commands will now handle an unavailable default behavior when command is called from outside the Steam Chat using resInfo.fromSteamChat (e.g. !comment 5 commenting on the requester's profile)
- Added resInfo.ownerIDs to enable privilege checking when using command from outside the Steam Chat
- Added `resInfo` typedef to commandHandler
- Wiki: Added runCommand() example and added note about userID & ownerIDs parameters
- Increased next login attempt delay on login timeout to hopefully prevent further "Already logged on" errors
- Improved sharedfile type detection
- Improved !info & !help whitespace regex to only match spaces at the line start
- Attempted to align secondary values in !info command response to improve readability
- The !settings command will now show the currently loaded config instead of reading it from the disk
- Updated all command names to always have the primary one at first position
- Updated all old wiki links
- Updated dependencies
- Minor other changes

Commit: [](https://github.com/3urobeat/steam-comment-service-bot/commit/)
26 changes: 24 additions & 2 deletions docs/wiki/creating_plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,36 @@ From there, every other module of the bot is accessible. Worth noting:

## **Command System**

The CommandHandler allows you to register and run commands.
The CommandHandler allows you to register new and run existing commands.
Commands are the core functionalities that allow you to request comments, retrieve information and manage the bot.
Any command you register will instantly be available to all message handlers.
Any command you register will instantly be available to all message handlers (e.g. to other plugins as well).

By default the bot has built-in Steam Chat message handling.
You can implement your own message handler as well, allowing you to integrate all registered commands into other platforms.
Take a look at the developer documentation (TODO) for more information about how to write a custom message handler.

Running existing commands is very easy. Let's take a look at how requesting 5 comments for 3urobeat would work:
```js
this.plugin.commandHandler.runCommand(
"comment", // Command Name
["5", "3urobeat"], // Arguments Array
(x, y, msg) => { logger("info", "Comment Command said: " + msg) }, // Response Function
this, // The current context
{ cmdprefix: "/", userID: "12345", ownerIDs: ["12345"] // The resInfo object
})
```

This would cause the comment command to send 5 comments to the Steam Profile "3urobeat".
The comments are requested by the user "12345", who has owner privileges.
Every response from the command will be logged to the terminal output using the logger function.

**Note:**
It is very important to provide a unique `userID` parameter in the `resInfo` object, which must not clash with steamID64s.
This ID is used to uniquely identify the requesting user, for example apply cooldown for them and check for owner privileges.
Failing to provide an ID will result in either unprotected or no access.

This is also where the `ownerIDs` array comes into play: It allows you to overwrite the `ownerid` array set in the config to enable owner privilege checking when using commands from outside the Steam Chat. Very cool, right?

&nbsp;

<a id="typescript"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/customlang_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ After you have done that add a colon behind your key and write your message in t
Example of how your `customlang.json` could look like after changing the `useradded` message:
```
{
"note": "Please read here on how to use this file: https://github.com/3urobeat/steam-comment-service-bot/wiki/How-to-add-custom-messages",
"note": "Please read here on how to use this file: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/customlang_doc.md",
"useradded": "You will recieve this message if you add me and it was modified using the customlang file!",
}
```
Expand Down
Loading

0 comments on commit 326c14a

Please sign in to comment.