Jump to content
CyaOnDaNet

[Support] Plex-Discord Role Management Docker

55 posts in this topic Last Reply

Recommended Posts

8 hours ago, Bolagnaise said:

yes it does, (well http://192.168.0.101:8181/tautulli/home does)  so it seems its not the issue, i installed the default tautulli, same issue.  Best bet is too nuke everything i guess

 

Okay, so it looks like changing the webroot does have an effect. It looks like you changed the webroot to add the /tautulli then. I changed the code to allow webroot overrides by leaving the port field blank. Go ahead and check for docker updates or force apply and you should have bot version 1.1.6. What you need to do is leave the Tautulli port field in the template blank and instead put the full root path in the ip section. So in your case put 192.168.0.101:8181/tautulli as the ip and the port field empty. If you changed the webroot for Sonarr then do the same thing for that. I will go ahead and edit my OP to reflect this so others can see it easily if they also changed their webroot. Sorry for the issues, I was unaware I needed to account for webroot changes, but all should be good now.

Share this post


Link to post
12 hours ago, CyaOnDaNet said:

Okay, so it looks like changing the webroot does have an effect. It looks like you changed the webroot to add the /tautulli then. I changed the code to allow webroot overrides by leaving the port field blank. Go ahead and check for docker updates or force apply and you should have bot version 1.1.6. What you need to do is leave the Tautulli port field in the template blank and instead put the full root path in the ip section. So in your case put 192.168.0.101:8181/tautulli as the ip and the port field empty. If you changed the webroot for Sonarr then do the same thing for that. I will go ahead and edit my OP to reflect this so others can see it easily if they also changed their webroot. Sorry for the issues, I was unaware I needed to account for webroot changes, but all should be good now.

IT WORKED!

 

For anyone with LetsEncrypt and reverse proxy setup for Sonarr and Tautulli, this is how you configure the settings 0f43984037c8bdb330dc5973f24d314c.png

Edited by Bolagnaise

Share this post


Link to post

@CyaOnDaNet in your guide you wrote 

Quote

If you want to see if its working, run `!bot logchannel @channel

it should be 

 

If you want to see if its working, run `!bot logchannel #channel

Share this post


Link to post

@CyaOnDaNet new error when running !notifications list

 

DiscordAPIError: Maximum number of guild roles reached (250)
at /app/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15
at /app/node_modules/snekfetch/src/index.js:215:21
at processTicksAndRejections (internal/process/task_queues.js:94:5) {
name: 'DiscordAPIError',
message: 'Maximum number of guild roles reached (250)',
path: '/api/v7/guilds/632476253542154240/roles',
code: 30005,
method: 'POST'

Share this post


Link to post
On 1/19/2020 at 5:06 AM, Bolagnaise said:

@CyaOnDaNet in your guide you wrote 

it should be 

 

If you want to see if its working, run `!bot logchannel #channel

Thanks, I updated the guide.
 

 

On 1/19/2020 at 5:13 AM, Bolagnaise said:

@CyaOnDaNet new error when running !notifications list

 

DiscordAPIError: Maximum number of guild roles reached (250)
at /app/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15
at /app/node_modules/snekfetch/src/index.js:215:21
at processTicksAndRejections (internal/process/task_queues.js:94:5) {
name: 'DiscordAPIError',
message: 'Maximum number of guild roles reached (250)',
path: '/api/v7/guilds/632476253542154240/roles',
code: 30005,
method: 'POST'


That error means that you hit the Discord Server Role Limit which I had not accounted for until now. Go ahead and check for updates and you should have bot version 1.2.1. I adjusted the code to work around the limit so it should be functional but you will still have that error in your logs. By the way, !notifications preview is a new command that can be used in place of !notifications list when experimenting, I created it because the bot now tracks the most recent call of !notifications list and updates the emoji reactions on bot startup to reflect any changes while it was offline. If you run !notifications preview or !notifications list it will generate as many roles as it can until it hits the Discord limit and then stops generating new roles. You can then proceed to edit that list with !notifications exclude show to get rid of anything you don't like and recall !notifications preview or !notifications list to let it reprocess and add new shows. 

As an FYI, I also added a !delete command which deletes all Roles that have been generated by the Bot for easy cleanup if anyone decides to stop using the bot.

Share this post


Link to post

I keep getting the following after starting the container:

(node:1) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.

at WebSocketConnection.<anonymous> (/app/node_modules/discord.js/src/client/ClientManager.js:48:41)
at Object.onceWrapper (events.js:313:26)
at WebSocketConnection.emit (events.js:223:5)
at WebSocketConnection.onClose (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:390:10)
at WebSocket.onClose (/app/node_modules/ws/lib/event-target.js:124:16)
at WebSocket.emit (events.js:223:5)
at WebSocket.emitClose (/app/node_modules/ws/lib/websocket.js:191:10)
at TLSSocket.socketOnClose (/app/node_modules/ws/lib/websocket.js:850:15)
at TLSSocket.emit (events.js:228:7)
at net.js:664:12
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Database not ready for scheduled job, client not fully online yet. Waiting to try again...
Database not ready for scheduled job, client not fully online yet. Waiting to try again...

 

501956243_ScreenShot2020-01-21at8_58_28PM.thumb.png.329d36150f4fc090cdb27046b8681b61.png

 

Any idea on how to resolve?

Share this post


Link to post
1 hour ago, killjoy85 said:

501956243_ScreenShot2020-01-21at8_58_28PM.thumb.png.329d36150f4fc090cdb27046b8681b61.png

Any idea on how to resolve?

I have tested and confirmed that that error is the result of an invalid Discord Bot Token. Make sure you have a valid Token in the template and try again. 
Go to https://discordapp.com/developers/applications/ Click on your Bot application or make a new one. On that application click the bot tab and copy the Token and use it in your template.image.thumb.png.b94c4c3b6f9a7956d2127979d832439c.png

Share this post


Link to post
15 hours ago, CyaOnDaNet said:

I have tested and confirmed that that error is the result of an invalid Discord Bot Token. Make sure you have a valid Token in the template and try again. 
Go to https://discordapp.com/developers/applications/ Click on your Bot application or make a new one. On that application click the bot tab and copy the Token and use it in your template.image.thumb.png.b94c4c3b6f9a7956d2127979d832439c.png

Resolved. Thanks.

Share this post


Link to post

Hi I am trying to get this Docker to work. When I call

!notifications edit 

It opens the boxes with the react commands but nothing happens when I react. Also when I try to call 

!show list

I get this in my logs.
 

(node:1) UnhandledPromiseRejectionWarning: RangeError: RichEmbed descriptions may not exceed 2048 characters.
at RichEmbed.setDescription (/app/node_modules/discord.js/src/structures/RichEmbed.js:103:42)
at Object.execute (/app/commands/showlist.js:23:5)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

(node:1) UnhandledPromiseRejectionWarning: RangeError: RichEmbed descriptions may not exceed 2048 characters.
at RichEmbed.setDescription (/app/node_modules/discord.js/src/structures/RichEmbed.js:103:42)
at Object.execute (/app/commands/showlist.js:23:5)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

Any help would be appreciated thanks!

Share this post


Link to post
4 hours ago, Reldnahc said:



Also when I try to call 


!show list

I get this in my logs.
 


(node:1) UnhandledPromiseRejectionWarning: RangeError: RichEmbed descriptions may not exceed 2048 characters.
at RichEmbed.setDescription (/app/node_modules/discord.js/src/structures/RichEmbed.js:103:42)
at Object.execute (/app/commands/showlist.js:23:5)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

(node:1) UnhandledPromiseRejectionWarning: RangeError: RichEmbed descriptions may not exceed 2048 characters.
at RichEmbed.setDescription (/app/node_modules/discord.js/src/structures/RichEmbed.js:103:42)
at Object.execute (/app/commands/showlist.js:23:5)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

 

@Reldnahc

I apologize for my oversight on this issue. I have a small library and neglected to envision what would happen with a larger library. All the Discord embeds that I could see exceeding limitations go through checks now and split up into multiple messages to prevent an error like this one. It should be fixed now, click on the advanced view in docker containers to force an update now or click check for updates at the bottom of the docker page and then apply update to the docker container. You will know if you have this update if the !bot info command shows Bot Version 1.2.2

 

4 hours ago, Reldnahc said:

Hi I am trying to get this Docker to work. When I call


!notifications edit 

It opens the boxes with the react commands but nothing happens when I react. 


That's strange that nothing happens after reacting. Is there anything in the logs? Does it say nothing was selected in time?
image.png.04e0a1ed5551f3e06d6c3061bd571a62.png
If no to both, then it is most likely hanging during the create Discord Role process. I would make sure your Bot has administrative privileges or at least manage role privileges but that should have still produced an error in the logs. 

Share this post


Link to post

Would this work for Radarr? I'd like to be notified via Discord of movies added

Edited by Fiservedpi

Share this post


Link to post
28 minutes ago, Fiservedpi said:

Would this work for Radarr? I'd like to be notified via Discord of movies added

@Fiservedpi
As of right now it doesn't connect to Radarr. You can have 2 types of movie based notifications though, triggered by the self-generated Tautulli recently added webhook. There is an All Movies react role and a New Movies react role (set if the movie was released within the last 9 months). These can be enabled with `!notifications edit`.
image.png.749d6664c204cff791f9fb1ce148d86d.png

I have a few cool ideas brewing that may need a Radarr connection, so that may be a thing in the future.
 

Share this post


Link to post

Even if you don't select the movie react roles with `!notifications edit`, the #notifications channel you set up will still receive recently added movie notifications, just with no roles if none are enabled.
image.thumb.png.91fa7bd13e0c3a289a169ee7365140ed.png

Share this post


Link to post

Sweet thank

EDIT: well look at that!! It seems to just work! For movies too. Must be the way I have my mapping set

Screenshot_20200209-110620.png

Edited by Fiservedpi

Share this post


Link to post

@CyaOnDaNet how are you getting images? Associated with the notification, is the .jpg inside the file with the .mkv?

Edited by Fiservedpi

Share this post


Link to post
9 hours ago, Fiservedpi said:

@CyaOnDaNet how are you getting images? Associated with the notification, is the .jpg inside the file with the .mkv?

@Fiservedpi You don't need to worry about generating images in the sub-folders or anything, Tautulli can provide image URL's. The image URL has to be publicly accessible and is automatically grabbed from Tautulli when the notification is pushed. To use this, enable image hosting in Tautulli. Go to Settings > 3rd Party APIs and select an option from the Image Host drop down. I self host my Tautulli now but in the past I have used Imgur with no problems.

Share this post


Link to post
message: 'request to http://192.168.1.73:8181/plog/api/v2?apikey=0501b2695dcd44a6ba6df9fbe9b587c1&cmd=get_activity&out_type=json failed, reason: connect EHOSTUNREACH 192.168.1.73:8181',
~Tautulli Webhhok Startup~ Connection refused [Attempt #1], retrying in 30 seconds...

I keep getting these errors.  I've tried to directly accessing the url and it works fine from Chrome.  Any ideas?

Share this post


Link to post

Hey there! Thank you for the wonderful work on this - I did have a question, though.

I currently have customized Tautulli to send Recently Added notifications like so (it took me sending a newsletter to an email and then setting it up to be parsed into a Discord Webhook). I do this on purpose, I don't like spamming my discord with a bunch of notifications, and would rather have this fire-off into the server once per day. Is there a way for me to setup your bot to detect which shows are in this list and, in turn, tag that role?

Thank you so much in advance!

Discord_2020-04-24_04-15-28.png

Share this post


Link to post
On 3/24/2020 at 12:01 PM, Roken said:

message: 'request to http://192.168.1.73:8181/plog/api/v2?apikey=0501b2695dcd44a6ba6df9fbe9b587c1&cmd=get_activity&out_type=json failed, reason: connect EHOSTUNREACH 192.168.1.73:8181',

~Tautulli Webhhok Startup~ Connection refused [Attempt #1], retrying in 30 seconds...

I keep getting these errors.  I've tried to directly accessing the url and it works fine from Chrome.  Any ideas?

@Roken Sorry for such a late response. I'm not sure why this would be an issue. It looks like you have a webroot set to /plog/ on Tautulli. That means when you access the main UI page for tautulli the address is http://192.168.1.73:8181/plog/home. 
The only other thing I can think of is for you to double check that you api is enabled in Settings > Web Interface > API > Enable API.

Share this post


Link to post
On 4/24/2020 at 4:18 AM, KINO said:

Hey there! Thank you for the wonderful work on this - I did have a question, though.

I currently have customized Tautulli to send Recently Added notifications like so (it took me sending a newsletter to an email and then setting it up to be parsed into a Discord Webhook). I do this on purpose, I don't like spamming my discord with a bunch of notifications, and would rather have this fire-off into the server once per day. Is there a way for me to setup your bot to detect which shows are in this list and, in turn, tag that role?

Thank you so much in advance!

Discord_2020-04-24_04-15-28.png

@KINO The intention behind the role mentions is that the channel the notifications feed into is muted and set to notify @mentions only. That way the user is not constantly spammed by all notifications but rather the ones that matter to them. You can manually give shows a role using the bot commands if it didn't auto create it for the desired show. 

Firing off messages once per day is not currently possible. That gave me the idea of being able to set quiet hours, where the bot caches all messages during the window and sends them out once quiet hours are over. I will look into adding that; it should be possible to have it fire off once a day by just setting the quiet hours to only allow a 1 minute opening. It will be a little while before I can get to that as I need to refactor my code to work with Discord.js 12 first.

Share this post


Link to post
Just now, CyaOnDaNet said:

@KINO The intention behind the role mentions is that the channel the notifications feed into is muted and set to notify @mentions only. That way the user is not constantly spammed by all notifications but rather the ones that matter to them. You can manually give shows a role using the bot commands if it didn't auto create it for the desired show. 

Firing off messages once per day is not currently possible. That gave me the idea of being able to set quiet hours, where the bot caches all messages during the window and sends them out once quiet hours are over. I will look into adding that; it should be possible to have it fire off once a day by just setting the quiet hours to only allow a 1 minute opening. It will be a little while before I can get to that as I need to refactor my code to work with Discord.js 12 first.

Yeah, I got it setup and really like the Watching role that it assigns to users currently watching shows.

 

The quiet hours idea sounds like it would work, if you ever add that, I'll definitely use it to it's full potential a lot more. Great job on this!

Share this post


Link to post

anyone else's container randomly stop? I always have to keep an eye on it is this a bug?

 

Share this post


Link to post
6 hours ago, Fiservedpi said:

anyone else's container randomly stop? I always have to keep an eye on it is this a bug?

 

I saw your issue on github, my response is below:
 

Quote

That happens to me when discord has an outage, but that is usually only like once a month for me. If it is happening that frequently for you then maybe you have another issue causing discord to be unreachable. I will look into a way to handle this, like a reconnect handler. The last time I looked into this I hit a dead end. For now, you can use the docker flag `--restart always` to make it restart automatically.

To add the `--restart always` flag on unraid, enable advanced view on your container settings, go to the `Extra Parameters:` option and put `--restart always`.

Share this post


Link to post
3 hours ago, CyaOnDaNet said:

I saw your issue on github, my response is below:
 

To add the `--restart always` flag on unraid, enable advanced view on your container settings, go to the `Extra Parameters:` option and put `--restart always`.

Yep I've implemented it thanks for the swift responses!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.