CyaOnDaNet / plex_discord_role_management

A discord bot that synchronizes with Tautulli and Sonarr to deliver tailored notifications.
MIT License
22 stars 6 forks source link

Bot errors whenever issuing a command #8

Closed BEisem closed 3 years ago

BEisem commented 3 years ago

Something seems to have changed recently, I don't know if Discord updated something in their API but the bot is now broken.

It doesn't respond to any commands, and whenever any command is issued to the bot in Discord, the following error appears in the console:

today at 11:36 AM at /app/commands/help.js:15:54
today at 11:36 AM at Map.map (/app/node_modules/discord.js/src/util/Collection.js:343:47)
today at 11:36 AM at Object.execute (/app/commands/help.js:13:16)
today at 11:36 AM at Client.<anonymous> (/app/index.js:225:12)
today at 11:36 AM at Client.emit (events.js:223:5)
today at 11:36 AM at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
today at 11:36 AM at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
today at 11:36 AM at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
today at 11:36 AM at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
today at 11:36 AM at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:120:16)
today at 11:36 AM (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: 1)
today at 11:36 AM (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.

Any help would be greatly appreciated. I really love having this bot and I'm missing it since it has stopped working!

CyaOnDaNet commented 3 years ago

It looks like mine also stopped working within the last 48 hours and I didn’t notice. It appears Discord.js v11 was deprecated so the latest version of this bot doesn’t work. The good news is I already refactored for v12. I just have one known bug left to work out. I will try and get an update out later today to fix this.

BEisem commented 3 years ago

Ok, thanks! Good to know it's not just me. I'll be looking forward to a new docker container...

CyaOnDaNet commented 3 years ago

A new version is up and it works again, it's bot v2.0.2 3db5fe263c936e1cfc8c7ef195b84d8d2a48e173. It should be live on docker hub too so you can update your container. There are some settings you will have to change in your discord developer portal to get the @Watching role feature back. Your bot should send you a DM with instructions after updating or you can checkout the readme.