Skip to content

momai/tg-captcha-bot

 
 

Repository files navigation

Deprecated

This project is no longer maintained. Please consider using this alternative instead https://github.com/momai/ClubDoorman/

This fork, like the original bot mxssl/tg-captcha-bot, faces the issue of allowing new users without displaying a captcha. The problem is not with the bot itself but with how Telegram works: some users, especially those with a premium subscription, can join chats without Telegram sending the service message about their entry. As a result, the bot does not trigger the captcha since it simply does not detect the event.

After several years of using this bot, it has become evident that the number of users joining chats without an entry event continues to grow. Therefore, it is recommended to switch to more advanced solutions that utilize machine learning and spam lists for effective chat protection. I suggest switching to this bot: link https://github.com/momai/ClubDoorman/.

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

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

About

Telegram Сaptcha Bot

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

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