Skip to content

momai/tg-captcha-bot

 
 

Repository files navigation

Fork

As it turned out, the original bot from mxssl/tg-captcha-bot also sometimes allows new users to pass through without showing the captcha. At the moment, the problem has not been found, but work on the bot has been restored.

ATTENTION: If you have enabled hiding participants, the bot will not work!

Telegram Captcha Bot

Telegram bot that validates new users that enter supergroup. Validation works like a simple captcha. Bot written in Go (Golang).

This bot has been tested on several supergroups (2000+ people) for a long time and has shown its effectiveness against spammers.

Fork information

  • Two fake buttons have been added, pressing on which the user gets banned.
  • Randomization of the button order. The original button for allowing access to the chat will never be the first in the list.
  • If print_success_and_fail_messages_strategy = "del" is selected in the configuration, the message about the user entering the chat is also deleted.
  • The user's first name (not @username) has been added to the welcome message.
  • Added the ability to disable and enable the bot for administrators using the /capcha command
  • Attack mode. In this mode, all new chat participants receive a temporary 5-minute ban. This command is useful during a mass invasion of spammers in the chat.
  • Added CAS antispam protection.

20230428_141709

Cloud hosted instance of the bot

@gate_troitsk_bot - fork rus @CaptchaFakeBot - fork global

@cloud_tg_captcha_bot - original

How it works

  1. Add the bot to your supergroup
  2. Promote the bot for administrator privileges
  3. A new user enters your supergroup
  4. Bot restricts the user's ability to send messages
  5. Bot shows a welcome message and a captcha button to the user
  6. If the user doesn't press the button within 30 seconds then the user is banned by the bot

If you want to run your own instance of the bot

Commands

/healthz - check that the bot is working correctly

/captcha - enable/disable captcha when joining the chat.

/attack - activate/deactivate attack mode.

In this mode, all new chat participants receive a temporary 5-minute ban. This command is useful during a mass invasion of spammers in the chat.

Сustomization

You can change several bot's settings (welcome message, ban duration, socks5 proxy server) through the configuration file config.toml

Alternatives / Forks

Packages

No packages published

Languages

  • Go 93.8%
  • Makefile 4.1%
  • Dockerfile 2.1%