Accumulates a list of all chat commands available in twitch channels. Updates commands by using chat bot APIs.
-
updatingdecides when to call the chat bot apis. Then it fetches the data and saves it to redis. -
servereads the values out of redis and serves it to the user. -
preludeis helper functions.
- Create an
.envfile with your twitch app tokens:TWITCH_CLIENT_ID=abcdefg123456 TWITCH_CLIENT_SECRET=hijklmnop7890 - Run
docker compose buildto build. - Run
docker compose upto run.
Tip: Use docker compose run redis redis-cli -h redis monitor to monitor all redis changes and docker compose run redis redis-cli -h redis to clear all redis data.
- Run
redis-server(see redis.io) in a terminal. - Set (in a different terminal) the env variables
TWITCH_CLIENT_IDandTWITCH_CLIENT_SECRETto the according values see. You can use something likedotenvor a start script which sets the variables if you like. - Run
go build && ./selfto build and run the application.
Tip: Use redis-cli monitor to monitor all redis changes and redis-cli FLUSHALL to clear all redis data.