This is a Telegram bot designed to download videos from Terabox. Users can interact with the bot to generate tokens, download videos, and manage their sessions.
- Download videos from Terabox by sharing the link with the bot.
- Generate and refresh tokens for session management.
- Admin commands to manage users and video lists.
- Python 3.7 or higher (Python 3.11 Recommended)
- A Telegram account
- A bot token from BotFather
- Redis server for session management
-
Extract the provided ZIP file:
Unzip the provided archive to your desired directory.
-
Install the required packages:
Open a terminal or command prompt in the extracted directory and run:
pip install -r requirements.txt
-
Set up your configuration:
Create a
config.py
file in the root directory with the following content:API_ID = 'your_api_id' #get from my.telegram.org API_HASH = 'your_api_hash' #get from my.telegram.org BOT_TOKEN = 'your_bot_token' #Get from @botfather BOT_USERNAME = 'your_bot_username' FORCE_LINK = '@your_channel_username' ADMINS = [123456789, 987654321] # List of admin user IDs
Replace the placeholders with your actual API ID, API hash, bot token, bot username, and admin user IDs.
-
Install Redis:
-
macOS:
You can install Redis using Homebrew. Open a terminal and run:
brew install redis
To start Redis, use:
brew services start redis
-
Windows:
Download the latest Redis MSI installer from the Redis GitHub releases page.
Run the installer and follow the instructions. Once installed, you can start Redis from the command prompt in a new terminal:
redis-server
-
-
Log in to Telegram:
Go to my.telegram.org and log in with your phone number.
-
Create a new application:
- Click on "API Development Tools".
- Fill in the required fields to create a new application.
- Once created, you will see your
API ID
andAPI Hash
.
-
Create a new channel:
Open Telegram, go to the menu, and select "New Channel". Follow the prompts to create your channel.
-
Add the bot to your channel:
Add your bot as an admin to the private channel.
-
Get the chat ID:
- Forward a message from your channel to @raw_data_bot.
- The bot will reply with
chat_id
of the channel.
-
Start the bot:
Run the following command in your terminal or command prompt:
python main.py python bot.py
Run both commands in different terminals.
-
Interact with the bot:
- Use
/start
to begin interacting with the bot. - Use
/gen
to generate a new token. - Admins can use
/remove <user_id>
to remove a user and/removeall
to clear all videos.
- Use
To run the bot on a VPS in the background, you can use tools like screen
or tmux
. Here's how you can do it with screen
:
-
Install Screen:
If it's not already installed, you can install it using:
sudo apt-get install screen
-
Start a new screen session:
screen -S bot-session
-
Run the bot:
Inside the screen session, run:
python main.py python bot.py
Run both commands in different screen windows. You can create a new window in screen by pressing
Ctrl+A
followed byC
. -
Detach from the screen session:
Press
Ctrl+A
followed byD
to detach from the session. The bot will continue running in the background. -
Reattach to the screen session:
To reattach to the session later, use:
screen -r bot-session
This bot was developed by Libman. For more information and updates, join the LIBMANX Telegram channel.
- CREDIT: LIBMAN