j0k3r / worldcup-slack-bot

WorldCupBot will notify a Slack channel/group for every match during a FIFA World Cup
MIT License
40 stars 29 forks source link
bot fifa-api football php slack worldcup worldcup-slack-bot

Worldcup Slack Bot

WorldCupBot will notify a Slack channel/group for every matches during a FIFA World Cup.

The API haven't changed since the Russia World Cup 2018. Which means you can use that bot for every FIFA World Cup, you just need to update ID_COMPETITION & ID_SEASON.

Find the competition you are looking for

World Cup ID_COMPETITION ID_SEASON
FIFA World Cup Russia 2018™ 17 254645
FIFA U-20 World Cup Poland 2019 104 281971
FIFA Women's World Cup France 2019™ 103 278513
FIFA World Cup Qatar 2022™ 17 255711

If the competition you are looking for isn't defined below, here is how you can find these numbers:

What it does

That bot is using the "unofficial" FIFA json API (the one used for their mobile apps).

It will post a message :

Preview

Here is a preview of the United States vs Wales match (during the 2022 edition).

worldcup-slack-bot sample

Requirements

Installation

Side notes

The code is ugly but it works.

Everything is posted in french, but feel free to fork and use your own language. FYI, FIFA API can provide text in en/fr/de/es/pt.