Skip to content

SavnoorSamra/TorrentBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torrent Bot

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact
  5. Acknowledgments

About The Project

Want to be able to view the download status of your torrents in discord? Now you can with this simple bot!

Getting Started

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.

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

Installation

Docker

  1. Clone the repo
 git clone https://github.com/SavnoorSamra/TorrentBot.git
  1. 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
  1. In the folder containing the dockerfile run the following command:
    sudo docker build --tag 'torrentbot'
    sudo docker run torrentbot
    
  2. Your bot should now be connected and online!

Bare Metal

  1. Login at https://discord.dev

  2. Create a new application and note down the Token in the "BOT" page found in the left sidebar

    1. (Feel free to give your bot a cool profile picture while in here too!)
  3. Enable Presence Intent, Server Members Intent, and Message Content Intent.

  4. 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.img.png

  5. Clone the repo

 git clone https://github.com/SavnoorSamra/TorrentBot.git
  1. 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
  1. Run main.py
    python3 main.py
  2. Your bot should now be connected and online!

Usage

There are two commands to view the status of your downloads

  • /downloading
    • Shows all currently downloading torrents
  • /all
    • Shows all torrents currently in qBittorrent

Contact

Savnoor Samra

  • Discord: @chairbell

Acknowledgments

About

View qBittorrent stats through discord

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published