This bot uses the undocumented FIFA API's to report on World Cup matches. It will check every 60 seconds for new events. The following events are reported:
- Goals scored
- Yellow/Red cards
- Substitutions
- Match start/stop
- Penalty kicks missed/scored
- Setup a new Slack App (https://api.slack.com/apps) with Webhook permission
- Copy
.env.template
to.env
- In
.env
, changeWEBHOOK_URL
to point to your Slack webhook- If you want to see debug information, which currently pings a heartbeat every hour, also fill in the
DEBUG_WEBHOOK
url with a Slack webhook and setDEBUG = True
- You can also set
WC_COMPETITION = None
insrc/fifa.py
to get all current FIFA matches and see what the output looks like. Just make sure to change it back toWC_COMPETITION = 17
for world cup only
- If you want to see debug information, which currently pings a heartbeat every hour, also fill in the
- In
.env
, changeCHANNEL
to the desired channel in your Slack space - Use
pip install -r requirements.txt
- Run
python main.py
- Go to https://slack.com/customize/emoji
- Enter
yellow_card
as name - Upload
card_yellow.png
- Save emoji
Repeat for red_card
and card_red.png
Build docker image
docker build -t soccerbot .
Run in NO_SLACK
mode (outputs events to terminal instead of sending to Slack)
docker run --rm -it -e NO_SLACK=True soccerbot