A feature-rich chatbot for Twitch. It is written in C++17 and uses the Twitch API/IRC custom library.
The bot in real action can be seen at https://twitch.tv/teabot
- Notifications when a stream starts or ends
- Massping chatters

- Timer
- Custom commands
- Listening for commit updates in GitHub repositories
- C++ compiler
- PostgreSQL
ixwebsocketfor Twitch connectionspqxxfor databasescprfor HTTP requestsnlohmann/jsonfor JSON data deserialization
CrowCppfor creating a simple web server (requiresasiolibrary)Maddyfor MarkDown parsing
git clone https://github.com/ilotterytea/bot.git
cd botAll SQL migrations are located in the corresponding /migrations folder.
You can run all up.sql in sequence yourself or you can use a special program created for this purpose and run the related command:
sqlm run --db-name DB_NAME --db-user DB_USER --db-pass DB_PASS
mkdir build
cd build
cmake -DUSE_TLS=1 ..
makeThe configuration file is in KEY=VALUE format.
Here's example of .env file with required parameters. This file should be along with compiled executable.
db_name=DB_NAME
db_user=DB_USER
db_pass=DB_PASS
twitch.client_id=CLIENT_ID
twitch.token=TOKEN- Launch bot:
./redpilledbot - Start the web server:
./redpilledweb