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).
-
Install Docker Compose,
-
Create a file with Telegram bot token to put it into Docker Secrets' store:
echo -n '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' > ./telegram-bot-token
-
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.