Skip to content

Bot for broadcasting messages to Telegram groups and users via HTTP-requests

Notifications You must be signed in to change notification settings

solovevserg/notifier-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notifier Bot

Bot for broadcasting messages to Telegram groups and users via HTTP-requests. It has simple auth mechanism with a password.

Get started

How to run bot

Use Docker image

# To run
docker run sdalbmstu/notifier-bot \
    -e BOT_TOKEN=<your_telegram_token> \
    -e BOT_PASSWORD=<your_password> \
    -v <data_storage_folder>:/bot/.data \
    -p 8080:3000

# To test
curl -X POST http://localhost:8080/messages \
    -H 'Content-Type: application/json' \
    -d '{"text":"*Hello*","parseMode":"MarkdownV2"}'

How to broadcast a message

Just send POST request to /messages with body like this

// Simple text
{ "text": "Hello" }

// Markdown markup
{
    "text": "[My webpage](https://sergsol.com/)",
    "parseMode": "MarkdownV2" 
}

How to start getting messages

  1. Go to chat with your bot (or add him into a group)
  2. Press Start
  3. Enter your password as bot asked
  4. You are ready 👌 Send a test message to ensure it works

Development

Clone repo and run commands

yarn install --frozen-lockfile
yarn dev <your_token> <your_password> <express_port>

About

Bot for broadcasting messages to Telegram groups and users via HTTP-requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published