/fingrid-bot

Discord bot for informing about energy shortages in Finland.

Primary LanguageTypeScript

Fingrid Bot

Informs users about possible electricity delivery issues in Finland.

How it works?

The bot periodically checks for electricity shortages using data from Fingrid's open API. The likelihood of a shortage is rated on a scale of 0 to 2, with 0 indicating no likelihood and 2 indicating a high likelihood. If the likelihood increases, the bot will notify the Discord channel of the risk of a blackout.

How to use

  1. Pull repository & npm i
  2. Add .env, see the example below.
  3. npm run build
  4. Send /build files to the server and run with Node >= 12.
  5. (Optional) add a systemctl service for the bot.

Example .env

DISCORD_APP_ID=
DISCORD_APP_TOKEN=
FINGRID_API_KEY=
DISCORD_CHANNEL_ID=
  • DISCORD_APP_ID: Discord Bot's application id.
  • DISCORD_APP_TOKEN: Discord Bot's token.
  • FINGRID_API_KEY: Fingrid API-key. Fetch for free from Fingrid.
  • DISCORD_CHANNEL_ID: The Discord channel id where the announcements are made to.