danxfisher / plex-discord-bot Goto Github PK
View Code? Open in Web Editor NEWA Discord bot that allows you to search, play, and queue music from your Plex Media Server.
A Discord bot that allows you to search, play, and queue music from your Plex Media Server.
Using the default settings of the bot, the music quality we can hear in Discord is bad. The bot runs on the same server as the plex server, and the network quality is not a problem.
Is this a library fault, or can you maybe request a better quality version to plex ?
The files in the library are MP3 320kbps .
Everytime I try and launch the bot, I get the following error:
TypeError [ClientMissingIntents]: Valid intents must be provided for the Client.
at Client._validateOptions (C:\Plex-Discord-Bot-master\node_modules\discord.js\src\client\Client.js:480:13)
at new Client (C:\Plex-Discord-Bot-master\node_modules\discord.js\src\client\Client.js:78:10)
at Object. (C:\Plex-Discord-Bot-master\index.js:8:16)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'ClientMissingIntents'
Hi, I keep getting the following error after I authorize my bot:
c:\Users\Zantri-La\Desktop\PlexPy\Plex-Discord-Bot-master>node index.js
module.js:549
throw err;
^
Error: Cannot find module 'discord.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (c:\Users\Zantri-La\Desktop\PlexPy\Plex-Discord-Bot-master\index.js:2:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Thoughts?
Having trouble starting after completing setup
module.js:538
throw err;
^
Error: Cannot find module 'discord.js'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (F:\Windows files\Desktop\Discord\index.js:2:17)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
The Cmder responds with Invalid Plex Server Hostname when I run node index.js according to the instructions. I am unable to figure out why this is occurring since in the previous instructions I changed the hostname field to my local server ip.
Any help would be appreciated.
I get
(node:5640) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: FFMPEG not found
in the console while trying to use !play or any commands
restarting and trying again yields this
(node:11796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: FFMPEG not found
(node:11796) [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.
I know, this sounds really dumb and nerdy, but I'm using this for D&D ambiance/music/effects and so I have all of my tracks (individually) categorized by a mood (which Plex supports).
Is it possible to add a !mood BLAH option so it can play something from the mood list instead of it being so direct, like, file name, list of songs, etc.?
Even if the appropriate port is set, the PlexAPI object is always created with the default port, so anyone not on port 32400 just gets given an error message.
First of all thank you for this, your code worked perfectly for my Plex / Discord server.
What I am curious about though is how do i get this bot to play random music? Right now its requiring my users to type !play for each individual song (or building a queue every session), and well when playing a game tabbing out for a new song is not ideal.
Is there a !playrandom or !playplaylist feature that this can reference? My Plex server has playlists setup in it but I cannot get it to reference those.
Please advise?
The bot can't be started properly without modifying the code :
This line should be replaced by plexCommands['plexTest'].process();
Would like to set the bot to just play through a playlist on shuffle.
Edit: Seems someone has already asked a feature like this #5
Hi,
I'm having a issues getting this to install and haven't got it to go just yet. Also I wasn't sure if this was still supported.
I followed the instructions on getting it going, but get errors when installing.
`λ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/bufferutil
npm ERR! bufferutil@"^3.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional bufferutil@"^4.0.0" from [email protected]
npm ERR! node_modules/discord.js
npm ERR! discord.js@"^11.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/bufferutil
npm ERR! peerOptional bufferutil@"^4.0.0" from [email protected]
npm ERR! node_modules/discord.js
npm ERR! discord.js@"^11.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-03-22T22_47_39_222Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2023-03-22T22_47_39_222Z-debug-0.log`
It looks like an issue with older versions of the discord.js/bufferutil.js and the latest versions maybe... I don't know what to do next. I tried the switches, but they still generate errors as well.
Thanks for any help. I would like to get this to work with my plex server for my music.
Any chance your can make a docker for this?
plex@mymedia:/home/plex/Bot/ZeroTwo$ node index.js
bot ready
logged in as: ZeroTwo#5586
name: MyPlex
v: 1.24.3.5033-757abe6b4
(node:10427) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'voiceChannel' of null
at playSong (/home/plex/Bot/ZeroTwo/commands/plex.js:116:33)
at addToQueue (/home/plex/Bot/ZeroTwo/commands/plex.js:105:7)
at /home/plex/Bot/ZeroTwo/commands/plex.js:62:7
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:10427) 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)
(node:10427) [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
Sincerly Your,
It appears as though this project has been abandoned, but I'll shoot my luck anyway:
So, I've followed the instructions enough to have successfully gotten my Plex bot onto my Discord server and status online, but when I try to use the commands, they all fail. The bot doesn't join the voice chat and just gives me "Sorry, that's not a command." I've tried 'plexText,' 'play,' 'playsong' ... etc. Nothing works. Any help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.