Coinprice-Alert Slack Bot
A cron job to send Slack messages with ATH price alerts.
Heroku account
Heroku CLI
git
Slack workspace with admin privilege
Firebase
Create a slack custom integration if you have not already
git clone git@github.com:mochahub/coinprice-alert.git
cd coinprice-alert
Create a heroku project (skip if its already set up)
heroku login
heroku create
git push heroku master
Setup Firebase
Create a firebase project at https://firebase.google.com/
Create a database
Download a private key from settings -> Service Accounts
Rename this file to firestore-admin.json
Setup Environment Variables:
These can also be configured on the web client for heroku
# Mandatory
heroku config:set SLACK_WEBHOOK=" {slack incoming web hook}"
FIRESTORE_ADMIN
environment variable needs to be manually updated in the heroku UI with the contents of firestore-admin.json
Verify that the script works
heroku run python3 ./__main__.py
Install and configure the scheduler via the CLI
configure frequency as desired
heroku addons:create scheduler:standard
heroku addons:open scheduler
# Under Run Command: python3 ./__main__.py