A tool for forwarding messages between Telegram channels. Supports public and private channels, protected content (automatic download + re-upload fallback), media groups (albums), and flexible content filtering
Note: This tool uses a Telegram user account (not a bot) via the MTProto API. Use a dedicated or test account
- Python 3.10+
- A Telegram account (used to make API requests)
pip install -r requirements.txtOpen config.py and set the channels:
SOURCE = "https://t.me/source_channel" # channel to forward from
DESTINATION = "https://t.me/+invite_hash" # channel to forward toSupported link formats:
| Format | Type |
|---|---|
https://t.me/username |
Public channel |
https://t.me/+InviteHash |
Private channel (invite link) |
https://t.me/c/1234567890 |
Private channel (numeric ID) |
Channel Title |
Search by name in your dialogs |
MODE = ForwardMode.ALL| Mode | Description |
|---|---|
ALL |
All messages |
WORDS |
Messages containing specified keywords |
PHOTO |
Photos only |
DOCUMENT |
Documents only |
DOCUMENT_FORMAT |
Documents with specified file extensions |
AUDIO |
Audio files only |
VIDEO |
Videos only |
VOICE |
Voice messages only |
For WORDS mode, specify keywords:
WORDS = ["keyword1", "keyword2"]For DOCUMENT_FORMAT mode, specify extensions:
FILE_FORMATS = ["pdf", "zip", "rar"]Forwards the entire history of the source channel to the destination. Messages already present in the destination are skipped automatically
python bot.py --syncPolls the source channel at a regular interval and forwards any new messages as they appear.
python bot.pyPolling interval is configured in config.py:
POLL_INTERVAL = 5.0 # secondsOn first launch, Pyrogram will ask you to authorize your Telegram account (phone number + confirmation code). A session file account.session will be created - subsequent runs will not require re-authorization
For each message the tool attempts the following in order:
- Direct forward - native Telegram forward (includes "Forwarded from" header)
- Server-side copy - copy without the "Forwarded from" header
- Manual re-upload - downloads media locally and re-sends it (used when the source channel has content protection enabled)
Fallback to the next strategy happens automatically
- bot.py # Entry point - sync or polling mode
- config.py # Configuration: channels, mode, filter settings
- forward.py # Core logic - forwarding, filtering, fallback
- requirements.txt # Python dependencies
- account.session # Pyrogram session file (auto-created on first run)
This project is provided for educational and personal use only. The author is not responsible for any misuse, legal issues, or damages caused by using this tool.
Users are solely responsible for their own actions. Telegram may block or limit accounts that violate its policies.