So basically Tortoolkit is aimed to be the most versatile torrent leecher and Youtube-DL bot for telegram. This bot is highly customizable and to customize this bot you don't need to restart the bot every time. The bot gets started with minimum variables and others can be set as and when needed using the /settings.
- MegaDL added
- Overall download and upload progress.
- Pixeldrain DL support.
- Alert on when the bot boots up.
Table of Content
- FEATURES
- TEST THE BOT (DEMO)
- DEPLOYMENT METHODS
- Heroku
- Zeet
- VPS DEPLOYMENT USING DOCKER
- VPS DEPLOYMENT WITHOUT DOCKER
Following are some awesome features offered by this bot:-
- Using the best torrent client to deal with torrent : qBittorrent
- You can choose which files you want to download from the torrent.
- A glorious settings menu from you can control the bot.
- If the bot is in the group, the users have their own settings like:
- Permanent thumbnail support.
- Users can choose if they want a file or video.
- Load in their own rclone config so that the torrent/direct link is uploaded to their drive. (Work in Progress)
- Extraction of ZIP, TAR, ISO, RAR wih and without password. If you chose to extarct the archive and you enter the password wrong it will prompt you to enter the password upto 3 times after that zip will be uploaded as it is.
- G Drive Index support.
- Admins can put hard limits on the max torrent size and max youtube playlist size.
- Aria2 for direct links download.
- Upload to gdrive by using RCLONE.
- You can load multiple drives in the conf and can switch on fly using the settings.
- Sorted YTDL download menu.
- Zip and upload also available.
- Get the server status.
- InstaDL support
- Browse the settings menu and try stuff. ;)
According to me, this platform provides resources that are enough for a genuine user and by default prevents Abuse: Click the logo to see the video guide to see how to deploy. The web is not yet available but soon will be available on Zeet.
ExecVarsSample.py location:- tortoolkit/consts/ExecVarsSample.py
Steps:-
-
You should install docker first :- How to Install Docker
-
Clone the repo and edit ExecVarsSample.py
- While editing Change
- API_HASH
- API_ID
- BOT_TOKEN
- ALD_USR
- BASE_URL_OF_BOT
- Uncomment the below DB_URI and comment out the above DB_URI
- Also if the given procedure dosent work then set IS_VPS to True and if you want to change the port when IS_VPS is true then change SERVPORT to your desired port number. (Note this should be used as backup)
-
After that execute these commands in root of the repo where tortoolkit folder is located.
- apt install docker-compose
- docker-compose up
-
If you edit a file like ExecVarsSample.py in future just run below commands
- docker-compose build
- docker-compose up
-
Run the following commands. (Following commands can be used to setup the vps from scratch)
- git clone https://github.com/yash-dk/TorToolkit-Telegram.git
- sudo apt update
- sudo apt install -y python3.8
- sudo apt install -y python3-venv
- python3 -m venv venv
- source venv/bin/activate
- cd TorToolkit-Telegram
- pip install -r requirements.txt
- sudo apt install -y postgresql postgresql-contrib
- apt -qq install -y curl git wget python3 python3-pip aria2 ffmpeg mediainfo unzip p7zip-full p7zip-rar
- curl https://rclone.org/install.sh | bash
- apt-get install -y software-properties-common
- apt-get -y update
- add-apt-repository -y ppa:qbittorrent-team/qbittorrent-stable
- apt install -y qbittorrent-nox
-
After that setup the database:- Remember the 'your-pass' that you enter below
- sudo -u postgres bash
- createdb tortk
- psql
- ALTER USER postgres with password 'your-pass';
- exit
- exit
-
After that setup the Variables.
Assuming that you are in the directory where you clonned the repo
- cd TorToolkit-Telegram/tortoolkit/consts
- nano ExecVarsSample.py
- Change the following:-
-
API_HASH
-
API_ID
-
BOT_TOKEN
-
ALD_USR
-
BASE_URL_OF_BOT
-
Change DB_URI = "dbname=tortk user=postgres password=your-pass host=127.0.0.1 port=5432"
Enter the password in the above string.
-
After that run (You can use any port for the web interface here i am using 80). Each time before starting the bot export the port Number
export PORT=80
-
And finally run this in clonned folder.
- chmod 777 start.sh
- ./start.sh
- IS_VPS
- Values :- False/True
- Default Value :- False
- Use :- Only set to True if you get errors regarding web server in VPS deployment. Only use as backup.
-
API_HASH
- Values :- Valid API HASH obtained from Telegram.
- Default Value :- ""
- Use :- To connect to Telegram.
-
API_ID
- Values :- Valid API ID obtained from Telegram.
- Default Value :- 0
- Use :- To connect to Telegram.
-
BOT_TOKEN
- Values :- Valid BOT TOKEN Obtained from Botfather.
- Default Value :- ""
- Use :- To connect to Telegram as BOT.
-
BASE_URL_OF_BOT
- Values :- Valid BASE URL of where the bot is deploy. Ip/domain of your bot like "http://myip" or if oy have chosen other port then 80 then "http://myip:port". No slash at the end.
- Default Value :- ""
- Use :- This is used for file selection of the torrent.
-
ALD_USR
- Values :- It is a list of IDs of all the allowed groups and useres who can use this bot in private.
- To supply multiple IDs in ExecVarsSample.py seperate by comma ','.
- To supply multiple IDs from Environemnt variable seperate by spaces.
- Default Value :- []
- Use :- Users and groups with ids here can use the bot.
-
DB_URI =
- Values :- Postgres database URL. Just replace your credentials from below. OR directly Paste the URI you obtained from a database hosting or somewhere else.
- Default Value :- dbname=tortk user=postgres password=your-pass host=127.0.0.1 port=5432
- Use :- Used to connect to DB. DB is used for many stuff in this bot.
-
OWNER_ID =
- Values :- Owner's ID
- Default Value :- 0
- Use :- Used to restrict use of certain stuff to owner only.
Yash-DK
Lonami for awesome Telethon
All the Libraries owner