| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
TLG_JoinCaptchaBot is a Telegram Bot designed to verify that new members joining a group are humans by presenting a CAPTCHA challenge.
The bot:
sudo apt-get install build-essential make python3 python3-dev python3-pip sudo apt-get install libcairo2-dev libpango1.0-dev
sudo apt-get install python3 python3-pip python3-venvsudo apt update
sudo apt install -y build-essential make libcairo2-dev libpango1.0-dev
sudo apt install -y libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tkgit clone https://github.com/J-Rios/TLG_JoinCaptchaBot
cd TLG_JoinCaptchaBot
make setupEdit the src/settings.py file:
'TOKEN' : 'XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'Configuration is handled through the src/settings.json file. Advanced users can also use environment variables, which is useful for deployment scenarios with virtual environments or Docker.
A Makefile is provided for convenient operation:
# View available commands
make
# Start the bot
make start
# Check bot status
make status
# Stop the bot
make stopTo run the bot as a daemon service on systemd-based systems:
sudo nano /etc/systemd/system/tlg_joincaptcha_bot.service[Unit] Description=Telegram Join Captcha Bot Daemon Wants=network-online.target After=network-online.target [Service] Type=forking WorkingDirectory=/path/to/TLG_JoinCaptchaBot/src/ ExecStart=/path/to/TLG_JoinCaptchaBot/tools/start ExecReload=/path/to/TLG_JoinCaptchaBot/tools/kill [Install] WantedBy=multi-user.target
sudo systemctl enable --now tlg_joincaptcha_bot.service
sudo systemctl start tlg_joincaptcha_bot.servicesudo systemctl status tlg_joincaptcha_bot.serviceDocker support is available for easy deployment and server migration. See the Docker specific documentation for details on creating a Docker container for the bot.
The bot owner can execute special commands:
Set a bot owner in settings.py:
"BOT_OWNER": "@YourUsername",By default, anyone can add the bot to any group. To restrict usage to specific groups:
"BOT_PRIVATE": True,Note: If a public group becomes a supergroup, the chat ID may change, requiring re-authorization.
The bot periodically checks for updates from Telegram servers. This is suitable for small to medium deployments.
The bot receives updates directly from Telegram servers, which improves performance for high-traffic bots.
To configure webhook:
openssl req -newkey rsa:2048 -sha256 -nodes -keyout private.key -x509 -days 3650 -out cert.pem"WEBHOOK_IP": "0.0.0.0",
"WEBHOOK_PORT": 8443,
"WEBHOOK_PATH": "/TLG_JoinCaptchaBot",
"WEBHOOK_CERT": SCRIPT_PATH + "/cert.pem",
"WEBHOOK_CERT_PRIV_KEY": SCRIPT_PATH + "/private.key","WEBHOOK_URL": "https://example.com:8443/TLG_JoinCaptchaBot""CAPTCHABOT_USE_WEBHOOK": True,The bot supports multiple languages through external JSON files. To add a new language:
If you find this bot useful, consider supporting the developer:
Paypal: https://www.paypal.me/josrios
| Back | FazBrowse Home | New Git URL |