Skip to content
This repository was archived by the owner on Sep 21, 2024. It is now read-only.

bramnijssen/plex-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

112 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlexDiscordBot

Discord bot which notifies server members about Plex events. The bot is dockerized and written in Python.

Features

  • Server members can (un)subscribe to TV Shows available on the connected Plex server.
  • Upon adding an episode of a show to the Plex server, server members who are subscribed to the show will get notified about the new episode via a DM with some additional information about the episode.
  • Option to specify a channel in the server in which a message will be posted when a new show has been added to the Plex server. This message will also include some additional information about the show.

Requirements

Make sure you have:

Discord bot requirements

Server Members Intent has to be turned on (located in Privileged Gateway Intents). And the Permission Integer has to be set to 10304 (= Send Messages, Manage Messages, Add Reactions).

Setup

  1. Clone the repository via git clone https://github.com/bramnijssen/PlexDiscordBot.git
  2. Provide info in the .env.example file
    • PDB_BOT_TOKEN: Token of the created bot.
    • PDB_NEW_SHOW_CHANNEL_ID: Channel ID of the channel in the server in which messages will be sent when a new show has been added to the Plex server. See this guide on how to retrieve a channel's ID. If you do not wish to use this feature, then remove the entire line containing the variable from the file.
    • PDB_PLEX_BASEURL: The IP or URL of the Plex server (e.g. http://10.0.0.1:32400/). Remember to specify the full private IP address of the device on which the Plex server is running, because in the case of having the bot run on the same device as the Plex server and specifying localhost as the IP, localhost will point to the Docker container's own network and thus not find the server. It is therefore also recommended to, if not already setup, set a static IP for the device on which the Plex server is running.
    • PDB_PLEX_TOKEN: Token to access Plex. See this guide on how to retrieve the token.
    • PDB_PLEX_TV_SHOWS: The name of the TV shows library. Plex's default is "TV Shows" (without quotes).
  3. Rename .env.example to .env
  4. Start the bot with docker-compose up -d

Commands

  • .help: Shows the help message with the list of available commands.
  • .sub | .subscribe <search_term>: Search for a TV show to which you want to subscribe / unsubscribe. When subscribed to a TV show, you will receive a notification when a new episode of that TV show has been added to the server.
  • .shows | .tvshows: Lists available TV Shows.
  • .subs | .subscriptions: Lists subscriptions.

About

Discord bot which notifies server members about Plex events.

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors