ramoona / termin-monitoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Termin monitoring bot

  1. Create your bot with @BotFather

  2. Add commands /start and /stop to your bot

  3. Update .env variables:

    • TELEGRAM_BOT_TOKEN - provided by @BotFather when the bot is created
    • MONITORING_URL - the URL of the service you need termin for. Tested on this one.
    • HOURS - the time of the day when script should be monitoring: [start, end]. Default is [6, 19]. Change to [] for 24hr monitoring.
  4. Install deps

> yarn 
  1. Start the script
> yarn start 
  1. Send /start to the chat with your bot to start monitoring.
  2. Send /stop to the chat with your bot to stop monitoring.

The script will run with a random interval in range of 2 to 7 minutes. As soon as the available date will appear in the calendar, the bot will notify you.

About


Languages

Language:JavaScript 100.0%