TwitchStatusBot
Simple bot to send message to a specific channel in Discord if Streamer get's online at Twitch.
HowTo
Clone the repo and copy over config.ini.dist
to config.ini
Only sections [DISCORD] and [TWITCH] are mandatory. If you don't want the other features, delete the whole sections.
Streams is a comma separated list of twitch streamer names. NO TRAILING COMMA!
Edit the file and propagate with API keys from Discord and Twitch.
To create a Discord bot and get a token go to
Discord Applications
and create one.
For Twitch got to Twitch Dev Dashboard and create
an application (not extension). See
Client credentials grant flow
on how to get the tokens.
Prepare Python
Install extensions via pip install -r requirements.txt
(best practice is using a virtual
environment for that!)
Run
Simply do python3 main.py
Note: bot takes local timezone from server for timed data (like D4 worldboss), set it properly!
Set as systemd service
If you want your bot running as service, do following:
- copy
bot.service
to/lib/systemd/system/
- edit the file (set working directory and path to
main.py
) - do
sudo systemctl daemon-reload
andsudo systemctl enable bot
- then
sudo service bot start