A powerful Python-based Telegram bot that enables automated message forwarding between chats, message deletion, and user tracking capabilities. Built with the Telethon library for reliable Telegram API interaction.
- Multi-Account Support: Manage multiple Telegram accounts
- Flexible Forwarding:
- Forward messages between any combination of groups, channels, and private chats
- Support for all message types (text, media, documents, etc.)
- Maintain reply chains when forwarding
- Live forwarding of new messages
- Historical message forwarding
- Message Management:
- Bulk message deletion
- Media downloading
- User message tracking
- Rich Console Interface:
- Interactive chat selection
- Progress tracking
- Colorized output
- Persistent Configuration:
- Save forwarding settings
- Store chat lists
- Track message history
- Python 3.7 or higher
- Telegram API credentials (api_id and api_hash)
- A Telegram account
-
Clone the repository:
git clone https://github.com/MohammadShabib/Telegram-Forwarder-Bot.git cd Telegram-Forwarder-Bot
-
Install dependencies:
pip install -r requirements.txt
-
Create required directories:
mkdir -p resources sessions media
-
Get your Telegram API credentials:
- Visit https://my.telegram.org/apps
- Create a new application
- Note your
api_id
andapi_hash
-
First Run:
python main.py
- You'll be prompted to enter your API credentials
- Verify your phone number
- Credentials will be saved for future use
The bot provides several key functions through an interactive menu:
- Switch between multiple Telegram accounts
- Add new accounts
- Update existing credentials
- List available chats
- Configure source and destination chats for forwarding
- Set up ignore lists for specific chats
- Live Forward: Forward new messages as they arrive
- Past Forward: Forward existing messages from history
- Messages maintain their original formatting and media
- Delete messages in bulk from specific chats
- Track and download media from specific users
- Search for user messages across chats
Configuration files and other data are stored in the resources
folder.
- Keep your API credentials confidential.
- Verify that you have the appropriate permissions in any chats used for forwarding.
This project is licensed under the MIT License.