Currently this is just kind of a proof-of-concept but it's working!
I'll work more on this if people are interested, so let me know! 😉
- Accept donations
- Auto accept trade offers from owners
- Auto craft metal
- Notify owners via Steam
- Notifications via Telegram
- Auto craft weapons to scrap
- Auto delete cases (based on type)
- Save per user donation stats
- Give ranks on TeamSpeak/Discord
- Restrictions on what items to accept
- Backpack full notification
- Generate auth code for bot account
- Better logging
You can either clone the repo yourself and start it directly on your machine, see Local, or build the Docker image which automatically handles all dependencies and does run everywhere, see Docker.
- Clone the repository via
https
orssh
, for help see here.
git clone https://github.com/MarcMogdanz/tf2-donation.git
git clone [email protected]:MarcMogdanz/tf2-donation.git
- Make sure you have
npm
installed and install all dependencies.
npm install
- Go into the cloned repository directory and build the javascript files, you need to have
python
installed.
npm run build
-
Setup your config, see here in the README.
-
Start up the bot.
npm run start
- Clone the repository via
https
orssh
, for help see here.
git clone https://github.com/MarcMogdanz/tf2-donation.git
git clone [email protected]:MarcMogdanz/tf2-donation.git
-
Make sure you have
Docker
installed, for help see here. -
Go into the cloned repository direcotry and build the image. We build the local
Dockerfile
, name ittf2
and tag it withlatest
.
docker build . -t tf2:latest
-
Setup your config, see here in the README.
-
Run the image (start the bot). We start the image
tf2
with thelatest
, which we've just built and mount a volume containing ourconfig/
directory. Note the:ro
at the end, this tags the volume asread-only
to ensure no unwanted changes to your config file will be made.
docker run -v "${PWD}/config/:/app/config/:ro" tf2:latest
Note: This should run on Linux and on Windows via Powershell, see here for more. See below if you want to use it on Windows via cmd
.
docker run -v "%cd%/config/:/app/config/:ro" tf2:latest
The general schema of the config is:
interface Config {
steam: {
account: {
name: string;
password: string;
sharedSecret: string;
identitySecret: string;
};
};
bot: {
autoCraftMetal: boolean;
};
owners: string[];
}
You need to set your steam name (not the display name!) and password as well as your shared secret and identity secret. There are multiple ways to get the later two:
- SteamDesktopAuthenticator (recommended)
- Android/iOS via Windows
I recommend to use the SteamDesktopAuthenticator
as it's easy to use, built for exactly this purpose and also a useful tool. Also you should use a dedicated steam account for this!
The owners
array needs to be an array of SteamID64
of the owners. You can find your SteamID64
here.
The easiest way to contribute is to contact me and tell me what you need or want. You can also create an issue containing a feature request or bug report!
And of course feel free to create PRs! 😉
The most credits go to Alex Corn for all of his awesome npm
packages (node-steam-user, node-steam-tradeoffer-manager, node-steam-totp, node-steamcommunity, node-tf2).
And also to Andrew Dassonville for his easy to follow guide on how to get started with all of this.
This repository is published under the MIT License.