How devgaganin/save-restricted-content-bot-v3 works
Project type and purpose
• This is a Python-based Telegram Bot (Save Restricted Content Bot v3) that retrieves and forwards restricted content from channels/groups, downloads media from 100+ sites, handles large files (up to 4 GB), and provides a plugin-based command interface with optional premium features.
File structure
• Top-level:
• main.py / app.py: entrypoints that initialize the bot and load plugins
• config.py: environment/configuration loader
• shared_client.py: central Pyrogram client wrapper
• Dockerfile, Procfile, heroku.yml, app.json: deployment artifacts
• requirements.txt: Python dependencies
• Directories:
• plugins/ : individual command handlers (start, login, ytdl, stats, etc.)
• utils/ : shared helper functions (encryption, filters, general functions)
• templates/ : static assets (welcome.html for custom messages)
• External integrations:
• MongoDB (sessions & premium data)
• Pyrogram v2 (Telegram API)
• yt-dlp or similar (video/audio downloading)
• Optional short-link monetizer (UPShrink etc.)
README for additional insights
• Features: forced login, custom thumbnails/captions, file-splitting, rate limits per user tier
• Deployment options: VPS, Heroku, Render, Koyeb/Docker
• Runtime environment: environment variables for API_ID, API_HASH, BOT_TOKEN, OWNER_ID, MONGO_DB, etc.
Thoroughness
• Every plugin module as part of “Commands” group
• Rate-limiting logic (fremium vs. premium timers)
• Environment variables block feeding into Config
• Deployment options as separate clusters (Heroku dyno, Docker container, VPS)