Garbage collector telegram bot. Designed to remove outdated messages from all members of the group. The bot only saves the message metadata. Radis is used as a backend for storing messages.
go get github.com/dadmoscow/gc_telegram_bot
go build github.com/dadmoscow/gc_telegram_bot
GC_TOKEN
Telegram bot TOKEN
GC_CHECK_TIMEOUT
Timeout checking for old messages in seconds
Default: 60 sec
GC_TIMEOUT_LIMIT
The maximum time limit for storing messages in seconds
Default: 604800 sec
GC_REDIS_ADDR
Redis address in format ip:port
Default: "127.0.0.1:6379"
GC_REDIS_DB
Radis database number
Default: 0
GC_REDIS_PWD
Database password
Default: None
GC_USE_SOCKS5
Use SOCKS5 proxy to connect
Default: false
GC_SOCKS5_ADDR
SOCKS5 address in format ip:port
GC_SOCKS5_USER
SOCKS5 username
GC_SOCKS5_PWD
SOCKS5 password
GC_BOT_DEBUG
Debug mode
Default: false
To-Do
/path/to/bot/gc_telegram_bot
/etc/supervisord.d/gc_telegram_bot.ini
[program:gc_telegram_bot]
command=/path/to/bot/gc_telegram_bot
stdout_logfile=/path/to/bot/gc_telegram_bot.log
redirect_stderr=true
autostart=true
autorestart=true
stopsignal=TERM
stopwaitsecs=10
environment=GC_TOKEN=PRIVATE_TOKEN
to-do
/help -- print this message
/on -- the bot will delete outdated messages
/off -- the bot will be disabled
/timeout -- new timeout after which the messages will be deleted
/delete -- delete all messages
/setting -- print current settings
/stop -- !!! Delete all messages, delete settings and stop the bot !!!
- Add http proxy support
- Add configuration file