Bot Discord vous permettant de lire votre contenu musical Plex sur Discord. Tout comme Rythm. La configuration se fait dans un document .yaml...
Go to file
2020-08-09 15:24:50 -06:00
assets 📝 Overhaul docs 2020-08-09 15:24:15 -06:00
deploy 🚀 Automatic deployment through jenkins 2020-08-09 00:58:50 -06:00
PlexBot 🔖 Bump version 2020-08-09 14:48:17 -06:00
.flake8 Initial commit 2020-07-22 16:17:16 -06:00
.gitignore 🙈 Deployment script 2020-08-08 17:18:11 -06:00
.pre-commit-config.yaml Initial commit 2020-07-22 16:17:16 -06:00
docker-compose.yml 🚀 Use docker pull instead of building repo 2020-08-09 15:24:50 -06:00
Dockerfile Massive docker image size reduction 2020-08-09 00:25:09 -06:00
Jenkinsfile Bumped version 2020-08-09 02:44:57 -06:00
LICENSE Initial commit 2020-07-22 16:17:16 -06:00
pyproject.toml Initial commit 2020-07-22 16:17:16 -06:00
README.md 📝 Overhaul docs 2020-08-09 15:24:15 -06:00
requirements.txt Remove unused dependency 2020-08-09 00:25:36 -06:00
sample-config.yaml 🔊 Major changes to logging systems 2020-08-09 00:28:14 -06:00

Plex-Bot

GPLv3 license docker pulls docker img size Code style: black

A Python-based Plex music bot for discord.

screenshot

Setup

Plex-Bot runs entirely in a Docker container. Ensure you have Docker and docker-compose installed according to the official Docker documentation.

  1. Create a new folder and cd into it:
$ mkdir Plex-Bot
$ cd Plex-Bot
  1. Make a docker-compose.yml file or use this sample:
version: "3"
services:
  plex-bot:
    container_name: "PlexBot"
    image: jarulsamy/plex-bot:latest
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Denver
    # Required dir for configuration files
    volumes:
      - "./config:/config:ro"
    restart: "unless-stopped"
  1. Create a configuration folder:

Create a new config folder and create a config file like this:

$ mkdir config
$ cd config
# Create a file called config.yaml with the following contents

root:
  log_level: "info"

discord:
  prefix: "?"
  token: "<BOT_TOKEN>"
  log_level: "debug"

plex:
  base_url: "<BASE_URL>"
  token: "<PLEX_TOKEN>"
  library_name: "<LIBRARY_NAME>"
  log_level: "debug"
  1. Create a Discord bot application:

    • Go to the Discord developer portal, here.

    • Log in or create an account

    • Click New App

    • Fill in App Name and anything else you'd like to include

    • Click Create App This will provide you with your Client ID and Client Secret

    • Click Create Bot User This will provide you with your bot Username and Token

    • Fill in the bot token in config/config.yaml

  2. Get your plex token:

    • Refer to the official plex documentation.

    • Add it to config/config.yaml in the appropiate spot.

  3. Customize remaining settings

    Set any remaining settings in the config file that you would like. Such as music library, and base url of the Plex server.

  4. Start the service:

$ docker-compose up -d

Logs

You can view the logs with the following command

$ docker-compose logs -f CONTAINER_NAME_OR_ID

# For example
$ docker-compose logs -f PlexBot

Usage

General:
  kill - Stop the bot.
Plex:
  np - View currently playing song.
  pause - Pause currently playing song.
  play - Play a song from the Plex library.
  resume - Resume a paused song.
  skip - Skip a song.
  stop - Stop playing.
No Category:
  help   Shows this message

Type ?help command for more info on a command.
You can also type ?help category for more info on a category.

Support

Reach out to me at one of the following places!