- Now Updated link : https://github.com/abirxdhack/RestrictedContentDL
See Our Live Bot On Telegram ᴘʀɪᴠᴀᴛᴇ ᴄᴏɴᴛᴇɴᴛ ғᴏʀᴡᴀʀᴅᴇʀ ʙᴏᴛ
- This branch is based on
Pyrogram V2offering enhanced stability and a forced login feature. User are not forced to login in bot for public channels but for public groups and private channel they have to do login. - for detailed features scroll down to features section
- Extract content from both public and private channels/groups.
- Rename and forward content to other channels or users.
- extract restricted content from other bots how to use format link like
https://b/botusername(without @)/message_id(get it from plus messenger) /loginmethod along withsessionbased login- Custom captions and thumbnails.
- Auto-remove default video thumbnails.
- Delete or replace words in filenames and captions.
- Auto-pin messages if enabled.
- download yt/insta/Twitter/fb ect normal ytdlp supported sites that supports best format
- Login via phone number.
- Supports 4GB file uploads: The bot can handle large file uploads, up to 4GB in size.
- file splitter if not premium string
- Enhanced Timer: Distinct timers for free and paid users to limit usage and improve service.
- Improved Looping: Optimized looping for processing multiple files or links, reducing delays and enhancing performance.
- Premium Access: Premium users enjoy faster processing speeds and priority queue management.
- ads setup shorlink ads token system
- fast uploader via
SpyLibusing Telethon modules andmautrix bridge repo - Directly upload to
topicin any topic enabled group
start: 🚀 Start the bot.batch: 🫠 Extract in bulk.login: 🔑 Get into the bot.logout: 🚪 Get out of the bot.token: 🎲 Get 3 hours of free access.adl: 👻 Download audio from 30+ sites.dl: 💀 Download videos from 30+ sites.transfer: 💘 Gift premium to others.myplan: ⌛ Get your plan details.add: ➕ Add user to premium.rem: ➖ Remove user from premium.session: 🧵 Generate Pyrogramv2 session.settings: ⚙️ Personalize settings.stats: 📊 Get stats of the bot.plan: 🗓️ Check our premium plans.terms: 🥺 Terms and conditions.speedtest: 🚅 Check the server speed.get: 🗄️ Get all user IDs.lock: 🔒 Protect channel from extraction.gcast: ⚡ Broadcast message to bot users.help: ❓ Help if you're new.cancel: 🚫 Cancel batch process.
Click to view required variables
To run the bot, you'll need to configure a few sensitive variables. Here's how to set them up securely:
API_ID: Your API ID from telegram.org.API_HASH: Your API Hash from telegram.org.BOT_TOKEN: Get your bot token from @BotFather.OWNER_ID: Use @ItsSmartToolBot to get your user ID by sending/info.CHANNEL_ID: The ID of the channel for forced subscription.LOG_GROUP: A group or channel where the bot logs messages. Forward a message to @userinfobot to get your channel/group ID.MONGO_DB: A MongoDB URL for storing session data (recommended for security).
STRING: (Optional) Add your premium account session string here to allow 4GB file uploads. This is optional and can be left empty if not used.FREEMIUM_LIMIT: Default is0. Set this to any value you want to allow free users to extract content. If set to0, free users will not have access to any extraction features.PREMIUM_LIMIT: Default is500. This is the batch limit for premium users. You can customize this to allow premium users to process more links/files in one batch.YT_COOKIES: Yt cookies for downloading yt videosINSTA_COOKIES: If you want to enable instagram downloading fill cookiesn
How to get cookies ?? : use mozila firfox if on android or use chrome on desktop and download extension get this cookie or any Netscape Cookies (HTTP Cookies) extractor and use that
WEBSITE_URL: (Optional) This is the domain for your monetization short link service. Provide the shortener's domain name, for example:upshrink.com. Do not includewwworhttps://. The default link shortener is already set.AD_API: (Optional) The API key from your link shortener service (e.g., Upshrink, AdFly, etc.) to monetize links. Enter the API provided by your shortener.
Important: Always keep your credentials secure! Never hard-code them in the repository. Use environment variables or a
.envfile.
Deploy on VPS
- Fork the repo.
- Update
config.pywith your values. - Run the following:
sudo apt update sudo apt install ffmpeg git python3-pip git clone your_repo_link cd your_repo_name pip3 install -r requirements.txt python3 -m RestrictDL
- To run the bot in the background:
screen -S RestrictDL python3 -m RestrictDL
- Detach:
Ctrl + A, thenCtrl + D - To stop:
screen -r gaganandscreen -S gagan -X quit
- Detach:
Deploy on Heroku
- Fork and Star the repo.
- Click Deploy on Heroku.
- Enter required variables and click deploy ✅.
Deploy on Render
- Fork and star the repo.
- Edit
config.pyor set environment variables on Render. - Go to render.com, sign up/log in.
- Create a new web service, select the free plan.
- Connect your GitHub repo and deploy ✅.
Deploy on Koyeb
- Fork and star the repo.
- Edit
config.pyor set environment variables on Koyeb. - Create a new service, select
Dockerfileas build type. - Connect your GitHub repo and deploy ✅.
Do not expose sensitive variables (e.g., API_ID, API_HASH, BOT_TOKEN) on GitHub. Use environment variables to keep them secure.
-
On VPS or Local Machine:
- Use a text editor to edit
config.py:nano config.py
- Alternatively, export as environment variables:
export API_ID=your_api_id export API_HASH=your_api_hash export BOT_TOKEN=your_bot_token
- Use a text editor to edit
-
For Cloud Platforms (Heroku, Railway, etc.):
- Set environment variables directly in your platform’s dashboard.
-
Using
.envFile:- Create a
.envfile and add your credentials:API_ID=your_api_id API_HASH=your_api_hash BOT_TOKEN=your_bot_token - Make sure to add
.envto.gitignoreto prevent it from being pushed to GitHub.
- Create a
Why This is Important? Your credentials can be stolen if pushed to a public repository. Always keep them secure by using environment variables or local configuration files.
Note: Changing the terms and commands doesn't magically make you a developer. Real development involves understanding the code, writing new functionalities, and debugging issues, not just renaming things. If only it were that easy!
- DevGagan For Main Project.
- King of Patal for base development of this repository.
- Mautrix Bridge for fast uploader connectivity bridge.
- Me For Just Some Small Fixes And Upload Fix And ParseMode Issue Fix.