Want to be able to view the download status of your torrents in discord? Now you can with this simple bot!
You may either run this bot in a docker container using the provided DOCKERFILE or run it "bare-metal" by manually installing the following prerequisites.
If Using docker: Install docker engine https://docs.docker.com/engine/install/
If NOT using docker, Install the following packages:
- python
sudo apt install python3
- discord library
pip install discord
- dotenv
pip install python-dotenv
- qBittorrent-api
pip install qbittorrent-api
- Clone the repo
git clone https://github.com/SavnoorSamra/TorrentBot.git
- Create a file in the root of the repo named ".env" and fill in the following information in the format shown below where
DISCORD_TOKEN=XXXXXXXXXXXXXXXXXXXX username=XXX password=XXX host=XXX.XXX.XXX.XXX port=XXXX
- DISCORD_TOKEN = The token obtained in step 2
- username = The username of your qBittorrent server
- password = The password of your qBittorrent server
- host = The host IP of your qBittorrent server
- port = The port on which the webUI of your qBittorrent server runs
- In the folder containing the dockerfile run the following command:
sudo docker build --tag 'torrentbot' sudo docker run torrentbot
- Your bot should now be connected and online!
-
Login at https://discord.dev
-
Create a new application and note down the Token in the "BOT" page found in the left sidebar
- (Feel free to give your bot a cool profile picture while in here too!)
-
Enable Presence Intent, Server Members Intent, and Message Content Intent.
-
On the OAuth2 page, scroll down to the OAuth2 URL Generator and check the box for "bot" and check off the following boxes. Copy the generated link into a browser and add the bot to your server.
-
Clone the repo
git clone https://github.com/SavnoorSamra/TorrentBot.git
- Create a file in the root of the repo named ".env" and fill in the following information in the format shown below where
DISCORD_TOKEN=XXXXXXXXXXXXXXXXXXXX username=XXX password=XXX host=XXX.XXX.XXX.XXX port=XXXX
- DISCORD_TOKEN = The token obtained in step 2
- username = The username of your qBittorrent server
- password = The password of your qBittorrent server
- host = The host IP of your qBittorrent server
- port = The port on which the webUI of your qBittorrent server runs
- Run main.py
python3 main.py
- Your bot should now be connected and online!
There are two commands to view the status of your downloads
- /downloading
- Shows all currently downloading torrents
- /all
- Shows all torrents currently in qBittorrent
Savnoor Samra
- Discord: @chairbell