Sign inSign up

momai/tg-captcha-bot

By momai

•Updated about 1 year ago

Telegram bot. Сaptcha + fake button + cas + attack mode

Image
0

2.1K

momai/tg-captcha-bot repository overview

⁠Telegram Captcha Bot (forked mxssl)

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

⁠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

⁠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

⁠Quick start

  1. Clone the repo https://github.com/momai/tg-captcha-bot⁠
git clone https://github.com/momai/tg-captcha-bot.git
cd tg-captcha-bot
  1. To rename the file env.sample to .env, you can use the following command:
mv .env.sample .env

After renaming the file, open the newly created .env file in a text editor and add your Telegram bot token to it.

  1. Pull the container
docker compose pull
  1. Run the container
docker compose up -d
  1. Check that the bot started correctly
docker compose ps
docker compose logs
  1. Add the bot to your supergroup and give it administrator privileges

Tag summary

Content type

Image

Digest

sha256:f86d6d7f1…

Size

10 MB

Last updated

about 1 year ago

docker pull momai/tg-captcha-bot