GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dd4e/gc_telegram_bot: Garbage collector telegram bot

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bot.go
bot.go
 
 
db.go
db.go
 
 
handlers.go
handlers.go
 
 
methods.go
methods.go
 
 
setting.go
setting.go
 
 

Repository files navigation

gc_telegram_bot

About

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.

How-To

Installation

go get github.com/dadmoscow/gc_telegram_bot
go build github.com/dadmoscow/gc_telegram_bot

Configuration

System environment

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

Configuration file

To-Do

Running

/path/to/bot/gc_telegram_bot

Supervisor

/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

Systemd

to-do

Bot Commands

/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 !!!

To-Do List

  • Add http proxy support
  • Add configuration file

About

Garbage collector telegram bot

Topics

cleancleanertelegramtelegram-bot

Resources

Readme
GPL-3.0 license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.