An open API service indexing awesome lists of open source software.

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.

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!