Receive IM notifications on Discord via a webhook. This bot fetches notifications from the WFS endpoint of Stichting IMN and forwards them to a Discord webhook.
-
Clone the repository:
git clone https://github.com/jxpsert/imbot.git cd imbot -
Install dependencies:
npm install
-
Copy the
.env.examplefile to.envand fill in the required values:cp .env.example .env
-
Start the bot:
node index.js
The following settings can be configured using the .env file:
-
IM_WFS_HOST: The WFS endpoint for IM meldingen, without query parameters. -
IM_WFS_POLL_RATE: The polling rate in seconds. How often the bot should check for new meldingen. -
IM_FILTER_CITY: A comma-separated list of cities to filter meldingen by. Leave empty to receive all meldingen. -
IM_FILTER_RAYON: A comma-separated list of rayons to filter meldingen by. Leave empty to receive all meldingen. -
PHOTON_HOST: The Photon geocoding service endpoint. Used to get street names from coordinates. -
NOTIFY_CHANNELS: A comma-separated list of notification channels to send meldingen to. Currentlydiscordandpushoverare supported. -
DISCORD_WEBHOOK_URL: The Discord webhook URL to send meldingen to. -
PUSHOVER_TOKEN: The Pushover API token to send meldingen to. -
PUSHOVER_USER_KEY: The Pushover user key to send meldingen to.