This is a bot I made for the Game/Social media platform Steam. The site has game items you can trade with other players, and this bot automatically manages trade offers that are sent to it using Steam's API.
This is the first API I'd worked with, and one of my first times using Javascript as well. I had originally planned to make it with C#, but found these JS dependencies instead which simplified the project greatly. This was also meant to be a precursor test project before I tried making my original plan (Casino bot for Steam items), but due to some API limits I didn't go through with the original plan.
If desired, you can access the Github Repo here.
Prerequisites:
- You will need to install node.js and npm
- steam-user (npm i steam-user)
- steam-totp (npm i steam-totp)
- steam-tradeoffer-manager (npm i steam-tradeoffer-manager)
- steam-community (npm i steamcommunity)
Steps to get bot working:
1. Fill out config file with username, password, sharedSecret, idSecret, and apiKey.
2. (NOT REQUIRED) In addition to this in the DonationBot.js file there is an 'if' statement under the manager.on that needs you to enter your SteamID64. If you do not fill this out then it will still work, you just won't have an administrator account to remotely retrieve items from the bot.
3. As long as the packages above are installed, you can run the bot by opening cmd, navigating to the correct directory, and using "node DonationBot.js"
4. It will display the login process in your console. If you get any errors it should print them so that they can be fixed.
Donation Tracking Info:
Once the bot is running and someone donates an item, the program will create a "leaderboard.json" file that will keep track of the SteamID64, name, and total items donated by that user.
The username does not update with each donation, and the file is just sorted by oldest -> newest donators.