An all-in-one Twitch engagement and analytics project, built live on stream.
Just add your credentials and go.
- Python 3
- PostgreSQL
- Get a Client ID and Client Secret from Twitch.
- Get an Oauth token here.
- Fill
credentials.env.sample
with the above tokens, as well as the name of the bot and the channel it will join. - Rename
credentials.env.sample
->credentials.env
- Run
pip install -r requirements.txt
- Run
chat_bot.py
. - In Twitch chat, add, edit, or delete commands with
!addcommand
,!editcommand
, or!delcommand
respectively.
The bot will store data in a PostgreSQL database called stream_data
which is created by the bot at startup. It
stores every message sent, and every command used. Additional insights about stream length, title, average viewership,
new followers/subscribers, cheers, tips, and other data points are in the works.
All of the data the bot gathers is stored locally. Keep in mind that no one can hide Twitch data from Twitch itself. Still, there is no need to rely on third party bots like StreamElements or StreamLabs to gain access to your chat data, and you won't have to slog through Twitch's terrible analytics. The data is all yours, in real time. Once the data viz app is constructed, there will be no programming knowledge required to get these insights.
If you want to see the progress on this project being made live, feel free to come by my own Twitch channel to ask questions or comment on the code. When I'm offline, feel free to reach out on the Workshop Discord Server and offer up your questions, comments, critiques, or feature proposals. There are hundreds people in there who love to help give advice. It's a fun place that I'm proud of. Thanks, friends!