https://github.com/abhinai2244/save-restricted-content-bot
An advanced Telegram bot by CantarellaBots designed to save restricted content (Text, Media, Files) from both private and public channels. This bot supports batch downloading, user login via session strings, and advanced customization options.
https://github.com/abhinai2244/save-restricted-content-bot
bots github media-bot pyrogram python restricted restricted-content save-content telegram telegram-api-integration telegram-bot-ai-assistant telegram-downloader telegram-media-download telegram-tools-list telegram-userbot
Last synced: about 14 hours ago
JSON representation
An advanced Telegram bot by CantarellaBots designed to save restricted content (Text, Media, Files) from both private and public channels. This bot supports batch downloading, user login via session strings, and advanced customization options.
- Host: GitHub
- URL: https://github.com/abhinai2244/save-restricted-content-bot
- Owner: abhinai2244
- License: mit
- Created: 2025-12-16T16:51:14.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2026-05-18T07:20:11.000Z (about 1 month ago)
- Last Synced: 2026-05-18T09:36:47.106Z (about 1 month ago)
- Topics: bots, github, media-bot, pyrogram, python, restricted, restricted-content, save-content, telegram, telegram-api-integration, telegram-bot-ai-assistant, telegram-downloader, telegram-media-download, telegram-tools-list, telegram-userbot
- Language: Python
- Homepage: https://t.me/cantarellabots
- Size: 63.5 KB
- Stars: 42
- Watchers: 0
- Forks: 117
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🚀 Save Restricted Content Bot (Advanced)
A cleaner and improved version of the Save Restricted Content Bot with a better structure, smoother workflow, and practical features for real usage.
---
## 🔗 Quick Links
---
# 🚀 Features
📦 Core Features
- **Save Restricted Content** — Download text, media, and files from restricted channels.
- **Batch Mode** — Bulk download messages from public or private channels with auto-detection.
- **User Login** — Login using `/login` to enable downloading capabilities.
### ⚙️ Customization
- Set custom captions (`/set_caption`)
- Set custom thumbnails (`/set_thumb`)
- Auto-delete or replace specific words
### 💎 Premium System
- Built-in system for free and premium users
- Admin-controlled premium access
### 👑 Admin Tools
- Broadcast messages
- Ban / Unban users
- Manage premium status
### 🧠 Persistent Storage
- MongoDB-based user data and settings
### ☁️ Keep Alive
- Supports uptime services for Render / Heroku deployments
---
# 🛠 Deployment
## ✅ Prerequisites
- Python **3.10+**
- MongoDB Database
- Telegram API ID & Hash
- Bot Token
---
## ⚙️ Environment Variables
Click to Expand
| Variable | Description |
| --------------- | ------------------------------------------ |
| `BOT_TOKEN` | Telegram Bot Token from BotFather |
| `API_ID` | Telegram API ID |
| `API_HASH` | Telegram API Hash |
| `ADMINS` | Comma-separated Admin User IDs |
| `DB_URI` | MongoDB Connection String |
| `DB_NAME` | Database Name (default: `SaveRestricted2`) |
| `LOG_CHANNEL` | Channel ID for logging users and errors |
| `ERROR_MESSAGE` | Send error messages to users |
| `KEEP_ALIVE` | Use an uptime service like UptimeRobot |
---
## 💻 Local Setup
Installation Steps
### Clone the repository
```bash
git clone https://github.com/abhinai2244/SAVE-RESTRICT-BOT.git
cd SAVE-RESTRICT-BOT
```
### Install dependencies
```bash
pip install -r requirements.txt
```
### Run the bot
```bash
python bot.py
```
---
## 🐳 Docker
```bash
docker build -t save-restricted-bot .
docker run -d --env-file .env save-restricted-bot
```
---
# 📝 Commands
## 👤 User Commands
Click to Expand
| Command | Action |
| ----------- | ------------------------ |
| `/start` | Start the bot |
| `/help` | Get help information |
| `/login` | Login to your account |
| `/logout` | Logout from your account |
| `/cancel` | Cancel batch process |
| `/settings` | Open settings menu |
| `/myplan` | Check your current plan |
| `/premium` | View premium details |
### ⚙️ Customization
- `/set_caption`
- `/see_caption`
- `/del_caption`
- `/set_thumb`
- `/view_thumb`
- `/del_thumb`
- `/thumb_mode`
- `/set_del_word`
- `/rem_del_word`
- `/set_repl_word`
- `/rem_repl_word`
- `/setchat`
---
## 👑 Admin Commands
Click to Expand
- `/broadcast`
- `/ban` / `/unban`
- `/add_premium` / `/remove_premium`
- `/users`
- `/premium_users`
- `/set_dump`
- `/dblink`
---
# 🤝 Contributors
---
# 📞 Support
---
⭐ If this project helped you, consider starring the repository!