Skip to content

Simple cron task that sends a notification to a Slack channel whenever a followed Twitch streamers goes live.

Notifications You must be signed in to change notification settings

martapanc/Twitch-notifier

Repository files navigation

~ to notifier ~

Simple cron task that sends a notification to a Slack channel whenever the Twitch streamers that a user follows start a live.

Codacy Badge

[logging provided by PaperTrail]

Slack Webhook setup

In order to send messages to a Slack channel, you need to create an Incoming Webhook: refer to the webhook ReadMe for details on how to setup this.

The Webhook url obtained will look like https://hooks.slack.com/services/xxx/yyy/zzzz. The last three parts, xxx/yyy/zzzz, need to be placed in the .env file, which must remain a local file as it contains API secrets.

Running Locally

Make sure you have Python 3.7 installed locally. To push to Heroku, you'll need to install the Heroku CLI.

git clone git@github.com:martapanc/Twitch-notifier.git
cd Twitch-notifier

pip install -r requirements.txt
python3 cronjob.py

Deploying to Heroku

heroku create
git push heroku master

heroku run python manage.py migrate
heroku open

or

Deploy

Deploy and start cron job

git push heroku master

heroku ps:scale clock=1

To view logs, run the command:

heroku logs --tail

Documentation

Twitch API ReadMe

More information and useful resources:

About

Simple cron task that sends a notification to a Slack channel whenever a followed Twitch streamers goes live.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages