Runs on a Raspberry Pi to display a temporary fullscreen message (via pygame) when a Twitch chat command is detected.
- Create a
.envfile (copy from.env.example) and fill in your real values. - Install deps:
pip install -r requirements.txt
The script connects to Twitch IRC and listens for a command (default !lotto). When seen, it generates numbers and displays them on the Pi.
It can also optionally reply in chat with the same numbers (useful if the screen fails).
Required .env values:
TWITCH_OAUTH(formatoauth:...)TWITCH_NICK(bot username)TWITCH_CHANNEL(your channel)
Optional .env values:
ENABLE_TWITCH_CHAT_REPLY=1(default)TWITCH_REPLY_PREFIX=@(default)
Run:
python server.py
If you still want to trigger the Pi from another service, you can enable the Flask server:
- Set
ENABLE_HTTP_SERVER=1 POST /display_lottowith JSON:{ "message": "Hello" }