Skip to content

Checks if a website is online and, in that case, sends a Telegram message

Notifications You must be signed in to change notification settings

displaynone/checkweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check Web

This script checks if a website is online and, in that case, sends a Telegram message.

Environment Variables

  • Create a .env file with the following content:
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
WEBSITE=your_website_url|...|...
  • TELEGRAM_BOT_TOKEN: Your Telegram bot's access token. You can create a bot by talking to @BotFather on Telegram.
  • TELEGRAM_CHAT_ID: The chat ID where you want to receive messages. To get this ID:
    • Send a message from your user to the bot.
    • Open the https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/getUpdates page.
    • Find your message and navigate to the result->message->chat->id key.
  • WEBSITE: The URL of the website you want to check, or a list of urls joined by pipeline (|)

Installation

To install dependencies, run:

bun install

Usage

To run the script, execute:

bun run index.ts

Additional Information

This project was created using bun init in bun v1.0.0. Bun is a fast all-in-one JavaScript runtime.

About

Checks if a website is online and, in that case, sends a Telegram message

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published