Bota
is a bot that automatically tweets latest Dota matches statistics.
You can check the twitter profile @LittleBota
This bot was developed for CS50 course final project and the main goal was to make a small, but functional code exploring all the development life cycle from tests to continuous deployment.
- Node.js
- Jest (test framework)
- Dota API
- Tweet API
- Github actions (for automated test and deployment)
- AWS Lambda
The process in short is:
- Once a day AWS triggers this lambda function
- The function collects the latest
MAX_MATCHES
using Dota 2 Web API - After that it calculates several metrics
- Then it tweets the results in the official tweet account
The deployment is handled by Github actions and only occurs if the tests runs successful.
You can run this code locally, the only requirement is to fill the steam api key environment variable, you can generate a key here.
After cloning and installing the dependencies just run:
npm run dev
, and you should see something like:
Daily report (100 matches collected)
๐ช๐ถ๐ป๐
- ๐ฟ 41.00% (dire)
- ๐ 59.00% (radiant)
๐๐๐ฒ๐ฟ๐ฎ๐ด๐ฒ ๐บ๐ฎ๐๐ฐ๐ต ๐ฑ๐๐ฟ๐ฎ๐๐ถ๐ผ๐ป
- ๐ 39 minutes
๐ ๐ผ๐๐ ๐๐๐ฒ๐ฑ ๐ต๐ฒ๐ฟ๐ผ๐ฒ๐
- Pudge
- Ogre Magi
- Phantom Assassin
- Sniper
- Lion
In development mode it will collect only the latest 100 matches.