Sign inSign up

quasiyoke/comrade-colonel-bot

By quasiyoke

•Updated over 6 years ago

Telegram bot removing group chat messages after specified period of time

Image
0

50K+

quasiyoke/comrade-colonel-bot repository overview

⁠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://raw.githubusercontent.com/quasiyoke/comrade-colonel-bot/master/docker-compose.yml
    docker-compose up
    

    Default configuration assumes chat messages lifetime of 42 hours.

Tag summary

Content type

Image

Digest

Size

619.7 MB

Last updated

over 6 years ago

docker pull quasiyoke/comrade-colonel-bot