A powerful Telegram bot for downloading and managing content from restricted public and private Telegram channels and groups. Built with Pyrofork, it supports seamless deployment on Heroku, VPS, or Docker, offering robust features for media scraping and user management. 💥
- Public & Private Content Download: Download media from public (
/dl
) and private (/pdl
) restricted Telegram sources. ➕ - Batch Downloading: Efficiently download multiple media files from public (
/bdl
) and private (/pbdl
) channels or groups. 📈 - Custom Thumbnail Support: Set (
/setthumb
), view (/getthumb
), or remove (/rmthumb
) custom thumbnails for media downloads. ⚙️ - Premium Plan Management: Explore plans (
/plans
), purchase (/buy
), and check account status (/profile
,/info
). 💥 - Admin Controls: Broadcast messages (
/acast
,/gcast
), manage logs (/logs
), restart the bot (/restart
,/reload
,/reboot
), view stats (/stats
), and manage premium users (/add
,/rm
). 🌐 - Dynamic Command Prefixes: Supports multiple prefixes (
!
,.
,#
,,
,/
) for flexible command execution. ➕ - Secure Login/Logout: Premium users can log in (
/login
) to scrape private messages and log out (/logout
) to clear data. 💀 - BotFather Command Customization: Owners can set commands using
/set
within the bot. ⚙️ - Multi-Platform Deployment: Deploy effortlessly on Heroku, VPS, or Docker Compose with clear setup instructions. 🌐
Command | Description | Access |
---|---|---|
/start |
Start the Private Content Forwarder | All Users ✅ |
/help |
Get help about commands | All Users ✅ |
/plans |
Discover premium plans to unlock advanced features | All Users ✅ |
/buy |
Purchase a premium plan for enhanced access | All Users ✅ |
/profile |
Check account status and premium details | All Users ✅ |
/getthumb |
View your custom thumbnail for media downloads | All Users ✅ |
/setthumb |
Set or update a custom thumbnail for videos | All Users ✅ |
/rmthumb |
Remove your custom thumbnail | All Users ✅ |
/dl |
Download media from public restricted sources | All Users ✅ |
/pdl |
Access and download from private restricted sources | Premium Users 💥 |
/bdl |
Batch download from public channels or groups | All Users ✅ |
/pbdl |
Batch download from private sources | Premium Users 💥 |
/info |
Get detailed account information | All Users ✅ |
/login |
Log in to scrape private messages | Premium Users 💥 |
/logout |
Log out and clear your account data | All Users ✅ |
/acast |
Send broadcast | Admin Only 🌐 |
/gcast |
Send broadcast | Admin Only 🌐 |
/logs |
Get logs of the bot | Admin Only 🌐 |
/restart |
Restart the bot | Admin Only 🌐 |
/reload |
Restart the bot | Admin Only 🌐 |
/reboot |
Restart the bot | Admin Only 🌐 |
/stats |
View total bot users | Admin Only 🌐 |
/add |
Add user to premium | Admin Only 🌐 |
/rm |
Remove user from premium | Admin Only 🌐 |
/set |
Set BotFather commands | Owner Only ⚙️ |
Note: The bot owner can customize commands using the /set
command within the bot. ⚙️
Deploy the bot to Heroku with a single click using the button below. Ensure you have a Heroku account and configure the environment variables as shown in the .env
sample. ✅
-
Clone the Repository:
git clone https://github.com/TheSmartDevs/RestrictedContentDL.git cd RestrictedContentDL
-
Log in to Heroku:
heroku login
-
Create a Heroku App:
heroku create your-app-name
-
Set Environment Variables: Configure the required variables from
sample.env
:heroku config:set API_ID=your_api_id heroku config:set API_HASH=your_api_hash heroku config:set BOT_TOKEN=your_bot_token heroku config:set DEVELOPER_USER_ID=your_user_id heroku config:set MONGO_URL=your_mongo_url heroku config:set DATABASE_URL=your_database_url heroku config:set DB_URL=your_db_url heroku config:set COMMAND_PREFIX="!|.|#|,|/"
-
Deploy to Heroku:
git push heroku main
-
Scale the Dyno:
heroku ps:scale worker=1
-
Clone the Repository:
git clone https://github.com/TheSmartDevs/RestrictedContentDL.git cd RestrictedContentDL
-
Install Dependencies:
pip3 install -r requirements.txt
-
Set Up Environment Variables: Copy
sample.env
to.env
and fill in the required values:cp sample.env .env nano .env
-
Run the Bot with Screen:
screen -S restrictedcontentdl python3 -m bot
-
Detach from Screen: Press
Ctrl+A
followed byCtrl+D
. -
Stop the Bot: Reattach to the session and stop:
screen -r restrictedcontentdl Ctrl+C
-
Install Docker and Docker Compose: Ensure Docker and Docker Compose are installed on your system. ✅
-
Clone the Repository:
git clone https://github.com/TheSmartDevs/RestrictedContentDL.git cd RestrictedContentDL
-
Set Up Environment Variables: Copy
sample.env
to.env
and configure the required values:cp sample.env .env nano .env
-
Run the Bot:
docker compose up --build --remove-orphans
-
Stop the Bot:
docker compose down
The bot uses environment variables for configuration. Copy sample.env
to .env
and fill in the required values:
# Telegram API credentials (required)
API_ID=YOUR_API_ID
API_HASH=YOUR_API_HASH
BOT_TOKEN=YOUR_BOT_TOKEN
# Admin and owner IDs
DEVELOPER_USER_ID=YOUR_USER_ID
# Database URLs
MONGO_URL=YOUR_MONGO_URL
DATABASE_URL=YOUR_DATABASE_URL
DB_URL=YOUR_DB_URL
# Command prefixes for bot commands
COMMAND_PREFIX=!|.|#|,|/
For Heroku, set these variables via the Heroku dashboard or CLI as shown above. ✅
The Main Author is Abir Arafat Chawdhury, who led the base development of RestrictedContentDL. 🌟
- Name: Abir Arafat Chawdhury 🌟
- Telegram Contact: @ISmartDevs ✅
- Telegram Channel: @TheSmartDev ✅
A special thanks to @TheSmartBisnu for their contributions to RestrictedContentDL, particularly for the helper functions in utils.py
, which were instrumental in building this project. ✅