Skip to content

Commit

Permalink
Version 2.14
Browse files Browse the repository at this point in the history
Merge pull request #214
  • Loading branch information
3urobeat authored Oct 21, 2023
2 parents 4628b48 + b751d4b commit b4072cf
Show file tree
Hide file tree
Showing 111 changed files with 6,404 additions and 1,641 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Contributing to the project

You would like to contribute to the project itself?
Great! No matter if it's fixing a few typos or adding a whole feature - every contribution is welcome.

The contributing page is located in the project's wiki, please [click here to get redirected](./docs/wiki/contributing.md)!
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center" markdown=1>
<p align="center"><img width=45% src="https://3urobeat.com/comment-bot/steamLogo.png"></p>
<strong>Request tons of comments, favs & likes by texting a bot network!</strong>
<strong>Manage accounts and request tons of comments, favs, likes & follows by texting a bot network!</strong>
<br>See how to set up the bot and customize it below.<br>
<p></p>
</div>
Expand Down Expand Up @@ -31,12 +31,14 @@
## **Introduction**
<img align="right" width="200" height="200" src="https://3urobeat.com/comment-bot/mesh.png">

* Request many profile comments directly from the steam chat
* Easily host multiple steam accounts and control them from **one** console and chat with this bot cluster
* Send comments to other steam profiles
* Apply cooldowns & customize nearly any value
* Advertise your group & automatically invite users to it
* Use proxies and requests comments via URL in your browser
* Request profile, group, screenshot, artwork, guide or discussion comments directly from the Steam Chat
* Manage hundreds of Steam accounts with ease and control them from **one** terminal and Steam Chat
* No need of having a Steam Client installed - perfect for hosting on a server
* Apply cooldowns to users and customize various settings (including multi language support!)
* Advertise your Steam group and automatically invite users to it
* Use proxies to spread requests over multiple IPs
* Completely VAC safe as it does not directly interact with any games
* Extend the bot's functionality with plugins

You can see and test out my 24/7 hosted comment bot in action [by clicking here!](https://steamcommunity.com/id/3urobeatscommentbot)

Expand Down Expand Up @@ -70,9 +72,15 @@ You'll find pages on how to add proxies to drastically increase the amount of po

#### **Questions, Bugs, Issues & Betas**
If you have any questions, please feel free to open a [Q&A discussion](https://github.com/3urobeat/steam-comment-service-bot/discussions/new?category=q-a)!
If you encountered a **bug** or wish a feature to be added, please open an [**issue!**](https://github.com/3urobeat/steam-comment-service-bot/issues/new/choose)
If you are interested in beta builds of this project, visit the [beta-testing branch.](https://github.com/3urobeat/steam-comment-service-bot/tree/beta-testing)
If you are interested in the active development progress, visit the [projects section.](https://github.com/3urobeat/steam-comment-service-bot/projects)
If you encountered a bug or wish a feature to be added, please open an [issue](https://github.com/3urobeat/steam-comment-service-bot/issues/new/choose)!
If you are interested in beta builds of this project, visit the [beta-testing branch](https://github.com/3urobeat/steam-comment-service-bot/tree/beta-testing).
If you are interested in the active development progress, visit the [projects section](https://github.com/3urobeat/steam-comment-service-bot/projects).

#### **Contributing**
You would like to contribute to the project itself?
Great! No matter if it's fixing a few typos or adding a whole feature - every contribution is welcome.

The contributing page is located in the project's wiki, please [click here to get redirected](./docs/wiki/contributing.md)!

#### **License**
This project and all code included is distributed under the GPL-3.0 license.
Expand Down
7 changes: 6 additions & 1 deletion advancedconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
"_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,
"dummy0": "------------------- Login Settings: -------------------",
"loginDelay": 2500,
"loginTimeout": 60000,
"relogTimeout": 30000,
"loginRetryTimeout": 30000,
"relogTimeout": 900000,
"maxLogOnRetries": 1,
"useLocalIP": true,
"dummy1": "------------------- General Settings: -------------------",
"acceptFriendRequests": true,
"forceFriendlistSpaceTime": 4,
"setPrimaryGroup": false,
"dummy2": "------------------- Request Settings: -------------------",
"commandCooldown": 12000,
"restrictAdditionalCommandsToOwners": [],
"retryFailedComments": false,
"retryFailedCommentsDelay": 300000,
"retryFailedCommentsAttempts": 1,
"lastQuotesSize": 5,
"dummy3": "------------------- Debug Settings: -------------------",
"enableevalcmd": false,
"printDebug": false,
"steamUserDebug": false,
Expand Down
9 changes: 5 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"commentdelay": 15000,
"_help_": "Read the docs: https://github.com/3urobeat/steam-comment-service-bot/blob/master/docs/wiki/config_doc.md",
"defaultLanguage": "english",
"requestDelay": 15000,
"skipSteamGuard": false,
"commentcooldown": 5,
"requestCooldown": 5,
"botaccountcooldown": 10,
"maxComments": 0,
"maxOwnerComments": 0,
"maxRequests": 0,
"maxOwnerRequests": 5,
"randomizeAccounts": false,
"unfriendtime": 31,
"playinggames": ["!help | 3urobeat", 440, 730],
Expand Down
4 changes: 3 additions & 1 deletion customlang.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"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"
"english": {
"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"
}
}
40 changes: 40 additions & 0 deletions docs/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Welcome to the steam-comment-service-bot developer documentation!
[⬅️ Go back to the main page](../..#readme)

The developer documentation includes pages for every module and some useful information about it.
This should help you figuring out how to implement parts of the bot into your plugin or when working on the project itself!

It makes sense to first learn how this project works and is built before diving in further. The [introduction](./introduction.md) page should get you started quickly.

Are you rather searching for the wiki? [Click here to get redirected](../wiki#readme)

&nbsp;

## Table of Contents
This documentation uses the same structure as the `src` folder. Each top-level module listed here contains further links to its submodules.
The order of this list represents the order in which they are instantiated when the application is started.

- [Introduction](./introduction.md)
- Parent Process:
- [Starter](./starter.md)
- Child Process:
- [Controller](./controller/controller.md)
- [DataManager](./dataManager/dataManager.md)
- [Updater](./updater/updater.md)
- [Bot](./bot/bot.md)
- [sessionHandler](./sessionHandler/sessionHandler.md)
- [CommandHandler](./commands/commandHandler.md)
- [PluginSystem](./pluginSystem/pluginSystem.md)

&nbsp;

## Contact
Steam profile: https://steamcommunity.com/id/3urobeat
Steam group: https://steamcommunity.com/groups/3urobeatGroup
Comment Bot: https://steamcommunity.com/id/3urobeatscommentbot
YouTube Tutorial: https://youtu.be/8J78rC9Z28U
Discord: @3urobeat

&nbsp;

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

&nbsp;

When logging in, the controller creates a bot object for every Steam account the user has provided.
It creates a SteamUser and SteamCommunity instance, which allow the Controller to use this bot account to interact with Steam.
The bot object itself handles events for this specific account (e.g. chat messages), informs the Controller about connection losses, etc.

&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.
49 changes: 49 additions & 0 deletions docs/dev/bot/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Bot Events
[⬅️ Go back to Bot](./bot.md) <a href="/src/bot/events" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Folder-darkcyan"></a>

&nbsp;

Each bot object handles their own [SteamUser](https://github.com/DoctorMcKay/node-steam-user) events.
These event handlers are located inside the bot events folder and contain each a prototype function for attaching themselves.
These functions follow the naming scheme `_attachSteamEventNameEvent` and are being called by the Bot constructor.

&nbsp;

## Table of Contents
- [debug](#debug--debug-verbose-)
- [disconnected](#disconnected-)
- [error](#error-)
- [friendMessage](#friendMessage-)
- [loggedOn](#loggedOn-)
- [relationship](#relationship-)
- [webSession](#webSession-)

Please use your browser's search function <kbd>Ctrl</kbd>+<kbd>F</kbd> to find a specific event using its name on this page.

&nbsp;

## debug & debug-verbose <a href="/src/bot/events/debug.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
The content of these events is logged to the terminal when `steamUserDebug` and `steamUserDebugVerbose` are set to `true` in the `advancedconfig.json`.

## disconnected <a href="/src/bot/events/disconnected.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Handles a disconnect by logging to the terminal, updating its status and trying to relog itself, unless it is an intentional log off.

## error <a href="/src/bot/events/error.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Handles login errors by logging to the terminal, updating its status and either retrying the login or skipping the account.

## friendMessage <a href="/src/bot/events/friendMessage.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Handles Steam Chat messages to this account.
If this is the main account it will instruct the [CommandHandler](../commandHandler/commandHandler.md) to run the command or apply a cooldown if the user is spamming.
If this is a child account, it will respond with a message pointing to the main account.

## loggedOn <a href="/src/bot/events/loggedOn.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Logs a message, sets the online status and increments the progress bar (on initial login) when this bot account establishes a connection to Steam.

## relationship <a href="/src/bot/events/relationship.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Handles an incoming friend request or group invite by adding the user to the `lastcomment.db` database and inviting them to the group set in `config.json`.

## webSession <a href="/src/bot/events/webSession.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Handles setting cookies, accepting friend requests & group invites while the bot was offline, updates the bot's status, performs a few checks and starts playing games.
This event is fired after loggedOn when this bot account establishes a connection to Steam.

After this event was handled, a bot account is considered to be online and ready to be used.
26 changes: 26 additions & 0 deletions docs/dev/commands/commandHandler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CommandHandler
[⬅️ Go back to dev home](../#readme) <a href="/src/commands/commandHandler.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>

&nbsp;

The CommandHandler manages the Bot's functionality which is accessible by the user, for example through the Steam Chat.
On startup, it loads a bunch of core commands shipped with the application and exposes functions to un-/register commands at runtime, for example using plugins.
Lastly, the module contains a helper folder which stores various functions used by commands, like getting all available bot accounts or parsing command arguments.

By default, the bot comes with one command handler which implements this module: The Bot's [friendMessage](../bot/events.md#friendmessage-) event.
This adds support for running commands and receiving answers through the Steam Chat.

&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.

&nbsp;


### resInfo
Object representing the default/commonly used content the resInfo object can/should contain.
The resInfo object is passed to every command and contains valuable information about the command handler which executes this command (plugins implementing other chat platforms need to implement their own command handler of course),
about the user who ran the command, which userIDs have owner rights, etc.
The commandHandler of e.g. a plugin can add more information to this object as they please. This can be useful to pass more information to their commands, through the commandHandler.

20 changes: 20 additions & 0 deletions docs/dev/controller/controller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Controller
[⬅️ Go back to dev home](../#readme) <a href="/src/controller/controller.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>

&nbsp;

The Controller is the center piece of the application.
It is the entry point of the child process, which gets spawned by the [parent process](../starter.md).
It stores references to all the other modules, does first checks (e.g. internet connection, unsupported nodejs version) and handles the startup.

The parent process forks a child that loads `controller.js` into memory and sets a timestamp of startup as `process.argv[3]`.
Any data which should be passed through a restart will be set as a stringified object at `process.argv[4]`.
If the mentioned timestamp is within the last 2.5 seconds, `controller.js` will create a new Controller object and call `_start()` to start the application.

Most functions are prototype functions linked to the existing Controller object at runtime, some may however still be normal exported functions.
Please check the [Helpers](./helpers.md) page of this module to see functions which still belong to this module but may not be listed directly on this page.

&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.
51 changes: 51 additions & 0 deletions docs/dev/controller/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Controller Events
[⬅️ Go back to Controller](./controller.md) <a href="/src/controller/events" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Folder-darkcyan"></a>

&nbsp;

The events folder contains functions for events which the Controller supports.
These functions are called by the Controller, which then in turn actually emit the event using the `controller.events` EventEmitter.
This allows for running internal code (e.g. ready event) before an external module receives them.

&nbsp;

## Table of Contents
- [ready](#ready-)
- [statusUpdate](#statusUpdate-)
- [steamGuardInput](#steamGuardInput-)

Please use your browser's search function <kbd>Ctrl</kbd>+<kbd>F</kbd> to find a specific event using its name on this page.

&nbsp;

## ready <a href="/src/controller/events/ready.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
This event is emitted when the bot finished logging in all bot accounts for the first time since the last start/restart.

Before emitting the event, the bot will
- ...log the ready messages containing a variety of useful information
- ...instruct the [DataManager](../dataManager/dataManager.md) to refresh the `cache.json` backups of all config files
- ...log held back log messages from during the startup
- ...perform various checks and display warnings if for example the friendlist space is running low
- ...and update the total login time in data.json.

No arguments.

## statusUpdate <a href="/src/controller/events/statusUpdate.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
This event is emitted when any bot account changes their online status.

Before emitting the event, the bot will update the `status` property of the affected bot account to the new status.

The event is emitted with the parameters
- `bot` ([Bot](../bot/bot.md)) - Bot instance of the affected account
- `newStatus` (Bot.[EStatus](/src/bot/EStatus.js)) - The new status of this bot

## steamGuardInput <a href="/src/controller/events/steamGuardInput.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
This event is emitted when any bot account requires a Steam Guard Code to be submitted before it can continue logging in.

The event is emitted with the parameters
- `bot` ([Bot](../bot/bot.md)) - Bot instance of the affected account
- `submitCode` (function(string): void) - Function to submit a code. Pass an empty string to skip the account.

The `submitCode` function allows users to implement accepting Steam Guard Codes from users into their plugins. This is very cool.
Check out how the [template plugin](https://github.com/3urobeat/steam-comment-bot-template-plugin/blob/main/plugin.js) implements the
`steamGuardInput` event function (which is called by the PluginSystem when the event is emitted, instead of listening directly to it).
25 changes: 25 additions & 0 deletions docs/dev/controller/helpers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Controller Helpers
[⬅️ Go back to Controller](./controller.md) <a href="/src/controller/helpers" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Folder-darkcyan"></a>

&nbsp;

The helpers folder contains functions which are regularly used, often by multiple files, also from other modules.
Each module has their own helpers folder, containing helper functions which fit the best to that specific module, to keep the project structure organized.

All prototype functions which are directly accessible from the active Controller object at runtime are already listed in the [Controller](./controller.md) docs page.
This page only includes functions which are directly exported, meaning to use them you need to import that specific helper file in your code.

&nbsp;

## Table of Contents
- [misc.js](#miscjs-)
- [npminteraction.js](#npminteractionjs-)

&nbsp;

## misc.js <a href="/src/controller/helpers/misc.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Special Case: The functions in this helper are directly accessible from the Controller object to make using them easier. You can access them through the Controller `misc` object.

&nbsp;

## npminteraction.js <a href="/src/controller/helpers/npminteraction.js" target="_blank"><img align="right" src="https://img.shields.io/badge/<%2F>%20Source-darkcyan"></a>
Loading

0 comments on commit b4072cf

Please sign in to comment.