Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timed Photo Saver for Telegram (Saveit)

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 forwarding them to your Saved Messages as original files without compression.

Features

  • Automatically downloads incoming timed/self-destructing media without requiring a command.
  • Saves downloaded media to the downloads/ folder.
  • Forwards downloaded media to your Saved Messages as original files (no compression).
  • Supports documents, photos, and videos.

Requirements

Before running the script, make sure you have:

  • Python 3.9+
  • Python package telethon

Install required Python packages

pip install telethon

Setup

  1. Clone the repository:
git clone https://github.com/DevURANIUM/Saveit.git
cd Saveit
  1. Run the run.sh script (Linux/macOS) or run.bat (Windows):
chmod +x run.sh
./run.sh

or on Windows:

run.bat

The script will:

  • Create a .env file if it does not exist.
  • Ask for your Telegram API credentials.
  • Pull the latest updates from Git.
  • Install or update Telethon.
  • Run Saveit.py.
  1. Manually configure API credentials (optional):

Open the .env file and add:

API_ID=YOUR_API_ID
API_HASH=YOUR_API_HASH
HANDLER=.saveit  # Or change to another prefix
AUTO_SAVE_TIMED=true  # Automatically save incoming disappearing media

How to Use

  1. Run the script:
python3 Saveit.py
  1. Save media:
  • Timed photos, videos, voice messages, video notes, and files are saved automatically as soon as they arrive.
  • For regular media, reply with .saveit (or your chosen handler).
  • The media will be saved to the downloads/ folder and forwarded to your Saved Messages as original files.

Example

  1. Run the script:
python3 Saveit.py
  1. In a Telegram chat, reply to a media message with .saveit to save it locally and forward it without compression.

Code Overview

  • Client Setup: Initializes the Telegram client using the provided API credentials.
  • Command Listener: Listens for .saveit commands in chats.
  • Media Handling: Downloads media and forwards it to Saved Messages as original files.

Dependencies

  • Telethon - A Python library for interacting with the Telegram API.

License

This project is licensed under the MIT License.

Support & Contributions

For any issues or suggestions, contact:

Donation Links

Support the project:

  • BTC: bc1qcclcp574hnznm0nmdzzf0ta7366svjskttqks3
  • LTC: ltc1qcrkelw38gjrmg0ptjy2nshqej622kp76het7q0
  • XRP: rPoK5SBChFPqEiQv1W97LW6FKoJZLipDVQ
  • XLM: GDMUQREEZNBSTQOT5BV7MYEMXJFV3CYRZXUVOYCTIUZTHUWPHLVASFVD
  • TON: UQAJH2N0pqpvC9YN841w5NH1dCN9Lakwkpjvoy7vXf-vfqgv
  • TRON: TXJqhhwvkrTdnf5HReZf55hEzZuxjto3R4
  • USDT(BEP20): 0x1591036c4bD05b046532B65Df939fcd7824E18c7

About

This script automatically saves timed (self-destructing) photos in Telegram chats before they disappear. It efficiently detects and stores these images, providing a backup solution for users who want to retain important photos sent with a time limit.

Topics

Resources

Stars

42 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages