📝 Format fixes

This commit is contained in:
Joshua Arulsamy 2020-08-09 20:12:31 -06:00
parent 33bbf21bab
commit 4aadd886d5

126
README.md
View File

@ -3,7 +3,7 @@
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html) [![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
![docker pulls](https://img.shields.io/docker/pulls/jarulsamy/plex-bot) ![docker pulls](https://img.shields.io/docker/pulls/jarulsamy/plex-bot)
![docker img size](https://img.shields.io/docker/image-size/jarulsamy/plex-bot) ![docker img size](https://img.shields.io/docker/image-size/jarulsamy/plex-bot)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a> ![black badge](https://img.shields.io/badge/code%20style-black-000000.svg)
A Python-based Plex music bot for discord. A Python-based Plex music bot for discord.
@ -13,106 +13,105 @@ A Python-based Plex music bot for discord.
Plex-Bot runs entirely in a Docker container. Ensure you have Docker and docker-compose installed according to the official Docker [documentation](https://docs.docker.com/get-docker/). Plex-Bot runs entirely in a Docker container. Ensure you have Docker and docker-compose installed according to the official Docker [documentation](https://docs.docker.com/get-docker/).
1. Create a new folder and `cd` into it: 1. Create a new folder and `cd` into it:
``` ```bash
$ mkdir Plex-Bot mkdir Plex-Bot
$ cd Plex-Bot cd Plex-Bot
``` ```
2. Make a `docker-compose.yml` file or use this sample: 2. Make a `docker-compose.yml` file or use this sample:
```yml ```yml
version: "3" version: "3"
services: services:
plex-bot: plex-bot:
container_name: "PlexBot" container_name: "PlexBot"
image: jarulsamy/plex-bot:latest image: jarulsamy/plex-bot:latest
environment: environment:
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000
- TZ=America/Denver - TZ=America/Denver
# Required dir for configuration files # Required dir for configuration files
volumes: volumes:
- "./config:/config:ro" - "./config:/config:ro"
restart: "unless-stopped" restart: "unless-stopped"
``` ```
3. Create a configuration folder: 3. Create a new `config` folder and create a config file like this::
Create a new `config` folder and create a config file like this: ```bash
mkdir config
cd config
touch config.yaml
```
``` ```yml
$ mkdir config # Create a file called config.yaml with the following contents
$ cd config
```
```yml root:
# Create a file called config.yaml with the following contents log_level: "info"
root: discord:
log_level: "info" prefix: "?"
token: "<BOT_TOKEN>"
log_level: "debug"
discord: plex:
prefix: "?" base_url: "<BASE_URL>"
token: "<BOT_TOKEN>" token: "<PLEX_TOKEN>"
log_level: "debug" library_name: "<LIBRARY_NAME>"
log_level: "debug"
```
plex: 4. Create a Discord bot application:
base_url: "<BASE_URL>"
token: "<PLEX_TOKEN>"
library_name: "<LIBRARY_NAME>"
log_level: "debug"
```
4. Create a Discord bot application: 1. Go to the Discord developer portal, [here](https://discord.com/developers/applications).
* Go to the Discord developer portal, [here](https://discord.com/developers/applications). 2. Log in or create an account
* Log in or create an account 3. Click New App
* Click New App 4. Fill in App Name and anything else you'd like to include
* Fill in App Name and anything else you'd like to include 5. Click Create App
* Click Create App
This will provide you with your Client ID and Client Secret This will provide you with your Client ID and Client Secret
* Click Create Bot User 6. Click Create Bot User
This will provide you with your bot Username and Token This will provide you with your bot Username and Token
* Fill in the bot token in `config/config.yaml` 7. Fill in the bot token in `config/config.yaml`
5. Get your plex token: 5. Get your plex token:
* Refer to the official [plex documentation](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/). * Refer to the official [plex documentation](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/).
* Add it to `config/config.yaml` in the appropiate spot. * Add it to `config/config.yaml` in the appropiate spot.
6. Customize remaining settings 6. 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. Set any remaining settings in the config file that you would like. Such as music library, and base url of the Plex server.
7. Start the service: 7. Start the service:
``` ```bash
$ docker-compose up -d docker-compose up -d
``` ```
## Logs ## Logs
You can view the logs with the following command You can view the logs with the following command
``` ```bash
$ docker-compose logs -f CONTAINER_NAME_OR_ID docker-compose logs -f CONTAINER_NAME_OR_ID
# For example # For example
$ docker-compose logs -f PlexBot docker-compose logs -f PlexBot
``` ```
## Usage ## Usage
``` ```text
General: General:
kill - Stop the bot. kill - Stop the bot.
Plex: Plex:
@ -129,11 +128,4 @@ Type ?help command for more info on a command.
You can also type ?help category for more info on a category. You can also type ?help category for more info on a category.
``` ```
## Support
Reach out to me at one of the following places!
- Email (Best) at joshua.gf.arul@gmail.com
- Twitter at <a href="http://twitter.com/jarulsamy_" target="_blank">`@jarulsamy_`</a>
* * * * * *