fa59cccd5a7ed96bd7716a8d6eae0acd25996856
AWB (Awfully Written Bot)
A Telegram bot designed for secure message forwarding with captcha verification.
Features
- Captcha Verification: Users have to solve an image-based captcha before their messages are forwarded (can be disabled).
- Support for All Media: Forwarding works for text, photos, videos, documents, audio, and voice messages.
- Message Redirection: Verified messages are automatically redirected to the admins.
- Anonymized Forwarding: Messages are forwarded with a custom prefix
Forwarding, ID [MSG_ID]:, maintaining privacy while allowing admins to track messages. - Locale Support: Built-in support for multiple languages (defaulting to English).
- Admin Panel: Authorized admins can access usage statistics and message logs.
Setup
-
Clone the repository:
git clone <repository_url> cd AWB -
Install dependencies: This project uses
uvfor dependency management.uv syncOr using pip:
pip install -r requirements.txt -
Configure environment variables: Copy
.env.distto.envand fill in your details:cp .env.dist .envEdit
.env:BOT_TOKEN: Your Telegram Bot token from @BotFather.GROUP_CHAT_ID: The ID of the group where messages should be redirected.ADMIN_IDS: A comma-separated list of Telegram User IDs who can access admin commands.DISABLE_CAPTCHA: Set toTrueto disable the captcha verification step (optional, defaults toFalse).
Usage
For Users
- Start the bot with
/start. - Send any message or media.
- Solve the image captcha by typing the characters shown.
- Once solved, your message is redirected to the admins.
For Admins
/stats: View total user count./logs: See a list of the 10 most recent redirected messages./view <ID>: View detailed information about a specific message by its ID.
Commands
/start: Initialize the bot and receive a welcome message./id: Retrieve the ID of the current chat (useful for configuration).
Adding Locales
The bot supports multiple languages. To add a new locale:
- Create a new JSON file in the
locales/directory named after the language code (e.g.,fr.jsonfor French). - Copy the keys from
locales/en.jsonand provide the translations for your language. - The bot will automatically load the new locale on startup.
Languages
Python
100%