This script automatically saves timed (self-destructing) photos and other media from Telegram chats before they disappear. It uses the Telethon library to interact with the Telegram API and download media files, saving them locally and optionally forwarding them to your Saved Messages in Telegram.
- Downloads timed/self-destructing media from Telegram chats.
- Saves downloaded media to the
downloads/
folder. - Forwards downloaded media to your Saved Messages.
- Supports both documents and regular media.
Before running the script, make sure you have:
- Python 3.9+
- Python package
telethon
To install the necessary package, run:
pip install telethon
-
Clone the repository:
git clone https://github.com/DevURANIUM/Saveit.git cd Saveit
-
Run the
run.sh
script:This will automate the setup process:
chmod +x run.sh ./run.sh
The script will:
- Create
.env
file if not exists. - Ask for your Telegram API credentials.
- Pull the latest updates from Git.
- Install or update
telethon
. - Run the script.
- Create
-
Manually configure API credentials (optional):
If you prefer to configure manually, open the
.env
file and add:API_ID=YOUR_API_ID API_HASH=YOUR_API_HASH HANDLER=.saveit # Or change to another prefix
-
Run the script:
python3 Saveit.py
-
Save media:
- Reply to any media in Telegram with
.saveit
(or your chosen handler). - The media will be saved to the
downloads/
folder and forwarded to your Saved Messages.
- Reply to any media in Telegram with
-
Run the script:
python3 Saveit.py
-
In a Telegram chat, reply to a media message with
.saveit
to save it locally and forward it.
- Client Setup: Initializes the Telegram client using the provided API credentials.
- Command Listener: Listens for
.saveit
commands in chats. - Media Handling: Downloads and forwards media.
- Telethon - A Python library for interacting with the Telegram API.
This project is licensed under the MIT License.
For any issues or suggestions, contact:
Support the project:
- BTC:
bc1qcclcp574hnznm0nmdzzf0ta7366svjskttqks3
- TRON:
TXJqhhwvkrTdnf5HReZf55hEzZuxjto3R4
- USDT-(TRC20):
TXJqhhwvkrTdnf5HReZf55hEzZuxjto3R4
- TON:
UQAJH2N0pqpvC9YN841w5NH1dCN9Lakwkpjvoy7vXf-vfqgv