https://github.com/itisuniqueofficial/telegram-storage-bot
A simple, self-hosted Telegram Cloud Storage Bot that allows users to upload any file, receive a unique File ID and retrieve it anytime using a deep link. The bot supports all Telegram media types and includes an admin broadcast system.
https://github.com/itisuniqueofficial/telegram-storage-bot
api bot python python-telegram-bot storage telegram
Last synced: 10 months ago
JSON representation
A simple, self-hosted Telegram Cloud Storage Bot that allows users to upload any file, receive a unique File ID and retrieve it anytime using a deep link. The bot supports all Telegram media types and includes an admin broadcast system.
- Host: GitHub
- URL: https://github.com/itisuniqueofficial/telegram-storage-bot
- Owner: itisuniqueofficial
- License: mit
- Created: 2025-06-12T12:51:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-22T17:39:45.000Z (10 months ago)
- Last Synced: 2025-08-22T19:59:31.937Z (10 months ago)
- Topics: api, bot, python, python-telegram-bot, storage, telegram
- Language: Python
- Homepage: https://t.me/reportcloudstorage_bot
- Size: 16.6 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram Storage Bot
A simple, self-hosted Telegram Cloud Storage Bot that allows users to upload any file, receive a unique File ID and retrieve it anytime using a deep link. The bot supports all Telegram media types and includes an admin broadcast system.
---
## Features
* π Private Cloud Storage using Telegram
* π Supports documents, photos, videos, audio, voice, video notes, and text files.
* π Generates unique File IDs and deep links for easy retrieval.
* π Session-based file statistics.
* π£ Admin-only announcement/broadcast system.
* π User tracking for announcements (`users.txt`).
* π§© Built using Python + python-telegram-bot + pyTelegramBotAPI.
---
## Demo
You can test the bot live:
π [@reportcloudstorage\_bot](https://t.me/reportcloudstorage_bot)
---
## Installation
### 1οΈβ£ Clone Repository
```bash
git clone https://github.com/itisuniqueofficial/telegram-storage-bot.git
cd telegram-storage-bot
```
### 2οΈβ£ Install Requirements
```bash
pip install python-telegram-bot==13.15
pip install pyTelegramBotAPI
```
> β οΈ You must use `python-telegram-bot` version 13.x as your code is written for v13 API.
### 3οΈβ£ Update Configuration
Edit `bot.py` and replace:
```python
BOT_TOKEN = 'TELEGRAM_BOT_TOKEN'
GROUP_CHAT_ID = TELEGRAM_GROUP_CHAT_ID
ADMIN_ID = TELEGRAM_USER_ID
```
With:
* `BOT_TOKEN`: Your bot token from @BotFather.
* `GROUP_CHAT_ID`: The Telegram Group ID where files will be forwarded and stored.
* `ADMIN_ID`: Your own Telegram User ID for admin-only features.
### 4οΈβ£ Run the Bot
```bash
python bot.py
```
The bot will start polling and be ready to use.
---
## Usage
### Upload File
* Send any file to the bot.
* The bot will save it, generate a unique File ID and reply with a deep link.
### Retrieve File
* Use the deep link:
```
https://t.me/?start=
```
### Commands
* `/start` β Start interaction or retrieve file by deep link.
* `/help` β Show usage instructions.
* `/stats` β Show session stats.
* `/announce` β Admin-only: broadcast message (reply to a message).
---
## Announcement System
* Admin can reply to any message with `/announce`.
* The bot will send that message to all users listed in `users.txt`.
* Supports text, photo, video, audio, documents, voice, and video notes.
---
## File Storage Logic
* Files are forwarded and stored inside your specified Telegram group.
* The File ID is simply a combination of timestamp, user ID, and message ID.
---
## File Structure
```
users.txt β All unique user IDs are stored here.
bot.py β Main bot script.
```
---
## Security Notice
* The bot doesnβt store actual files locally.
* Telegram handles the physical file storage inside your group.
* File ID only maps to Telegram group forwarded message IDs.
---
## Credits
* Developed by **It Is Unique Official**
* GitHub: [itisuniqueofficial](https://github.com/itisuniqueofficial)
---
## License
This project is licensed under the [MIT License](https://github.com/itisuniqueofficial/telegram-storage-bot/blob/main/LICENSE).