A Python script that forward all messages from a target chat to a destination chat (work with user, group, supergroup and channel)
I used it to make a copy on cloud of a group with a lot of large files.
With this script the forwarded files will be available also if the target close and you are kicked out. If you make a copy with a completly export of the chat with Telegram App you are forced to download the large files too, but with this script all files and the chat are saved via cloud in the destination
Tested with Windows 10 and Linux Ubuntu
- Install Python (tested with Python 3.7+)
- Download telethon
pip install telethon- Clone this repository
- Insert your id and hash in the script (you can get one in https://my.telegram.org - Api development tools)
- Run the code with
python atg-clone.py- PROFIT
Create a group where just you are the only component (or not, just create the destination chat and write a message so it become opened)
- Login with number and code (remeber to put the +xxx before your number)
- The script show you the opened chats
- Choose the target chat
- Choose the destination chat
- Confirm
- If you want to continue a precendent forwarding insert the last message_id that you have forwarded (so if you write 10000, the first message_id forwarded will be 10001)
- Wait 3 sec (if something is wrong, this is the last moment you can stop the script before it starts)
- PROFIT
Telegram allow to forward 2000 msg per hour, after this limit you will get a FloodError and you have to wait. You can close the script and re-run when you want, just remember the last message forwarded
If you can't remember the message.id of your last message forwarded, you can run the script atg-clone-finder.py that search a specific string required via input with
python atg-clone-finder.pyIf this project help you reduce time to develop, you can give me a can of Coke Zero :)
