Plexy connects your plex server to your discord server. By sending messages to a certain discord channel when new content is added. And enabling users to look trough and get info about the plex server.
Plexy is a one of a kind discord bot
First go to the Discord Developer Portal
login with your discord account
press new application
type the application name and press Create
set your application/bot icon and description/about me
choose form the navbar in the left Bot
option
press add bot
and yes, do it!
configs/secrets.example.json
it should look like this:{
"bot_token": "<Bot Token>",
"notificationsChannelId": 1000000000000000000,
"plexAdminDiscordId": 1000000000000000000,
"plexBaseUrl": "<Plex Base Url>",
"plexToken": "<Plex X-Token>",
"contentUrl": "<Plex Content URL>"
}
bot_token
→ The discord bot token you can find in the Discord developer portalnotificationChannelid
→ Go to discord client Settings
> Advanced
> Developer Mode
and enable it. Then go to the channel you want the new content notifications and right click it and Copy ID
plexAdminDiscordId
→ Do the same as notificationChannelid
but select the discord user you that controls the plex serverplexBaseUrl
→ Go to Plex and open the dashboard. goto Settings
> Remote Access
if plex server is on the same system as the bot use http://localhost:32400/
, otherwise use the public ip and portplexToken
→ See Finding an authentication token / X-Plex-TokencontentUrl
→ Go to the Plex Dashboard and open a media item. then in the address-bar copy everything until /details
secrets.json
configs/config.example.json
"plex_config": {
"refreshTime": 15,
"max-recently-added": 20,
"scanLibraries": ["TV Shows", "Movies", "Anime"],
"allLibraries": ["Anime", "Movies", "Home videos", "TV Shows"]
}
scanLibraries
→ Are all the libraries Plexy searches for new contentallLibraries
→ All the libraries you want plexy to see"args": {
"-all": ["Anime", "Movies", "TV Shows"],
"-movie": ["Movies"],
"-m": ["Movies"],
"-show": ["TV Shows"],
"-s": ["TV Shows"],
"-anime": ["Anime"],
"-a": ["Anime"],
"-h": ["Home videos"],
"-videos": ["Videos"],
"-v": ["Videos"]
}
These are all the flags users can use to filter for libraries you can add and remove any flag you want
:exclamation: This is very important |
---|
"general_config" : {
"safe-mode": true
}
🛑 Plexy uses the plex token to get media assets from the plex server. But that exposes the plex token you have set to everybody in the discord server/channel. 🛑
config.json
To run the project
(Optional) Make a virtual environment
Install all the dependencies
pip install -r requirements.txt
Run the bot
python Bot.py
Plexy is free and will always be free to use. I did spend a lot of time on creating it.
So any donations are welcome but of course not required. (˵ ͡° ͜ʖ ͡°˵)
if you find any issues please create a new issue with logs and details what went wrong.
Contributions are always welcome!
Copyright 2021 Cecilio Silva Monteiro
Licensed under the GNU General Public License v3.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.gnu.org/licenses/gpl-3.0-standalone.html
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.