This script uses the Twitch API to check for channels that recently went live and send notifications to any services supported by apprise. Some examples include Discord, Slack and Twilio. See the apprise wiki for a full list and configuration information.
Each service acts a little different as they have different features. The script has been designed for a lowest common denominator so that important information will make to most/all services. It will send the following:
title: "Twitch"
body: "channel is now streaming category."
If multiple channels start at about the same time, they will be grouped together. Here is an example notification using the 'dbus://' service along with the dunst notification-daemon.
Here is the dunst configuration used for this example.
[Twitch]
summary = "Twitch"
new_icon = /path/to/twitch-icon.png
background = "#6441A4"
- Download or clone this repository.
- Install the apprise Python module.
- Copy
config-example.yml
toconfig.yml
- Edit
config.yml
- Test
twitch-notifications.py
- Set up systemd timer or cronjob
To verify apprise syntax is correct use the apprise
cli application. The service wiki page will give good examples, like Discord.
Temporally increasing the offset value in config.yml
to something like 600 can also be handy when troubleshooting.