Plex-Discord-Bot icon indicating copy to clipboard operation
Plex-Discord-Bot copied to clipboard

Bot Queues song but doesn't join VC

Open Synth9617 opened this issue 4 years ago • 17 comments

Hey,

So when ever it tries to join, i get this in the console window: image

Does anyone know how to fix this and get it working again?

Synth9617 avatar Jul 13 '19 01:07 Synth9617

I get the same

nmcc1212 avatar Nov 07 '19 14:11 nmcc1212

Fixed and working for me.

I added the missing npm modules in a new folder called node_modules (may have been overkill to get this working).

I changed the variable call syntax on node-opus module. I added the latest node-ogg-packet module. I also ran npm update after the above two changes.

slyfox1186 avatar Jan 04 '20 03:01 slyfox1186

probs should reupload without your personal info in the configs... btw it doesnt seem to have worked for me :/

Spideychicken avatar Jan 17 '20 01:01 Spideychicken

Good point about the personal info. Sorry it doesn't work.

slyfox1186 avatar Jan 17 '20 03:01 slyfox1186

Found a solution.

Replace your package.json by this:

{
  "name": "plexbot",
  "version": "1.0.1",
  "description": "a plex bot for discord",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "danxfisher",
  "license": "ISC",
  "dependencies": {
    "bufferutil": "^3.0.2",
    "discord.js": "^11.1.0",
    "erlpack": "github:hammerandchisel/erlpack",
    "ffmpeg-static": "^4.0.1",
    "libsodium-wrappers": "^0.5.2",
    "node-opus": "^0.2.6",
    "opusscript": "^0.0.3",
    "plex-api": "^5.1.0",
    "request": "^2.81.0",
    "uws": "^8.14.1"
  }
}

then type: rm -rf node_modules (delete the node_modules directory) npm cache clean npm install

Basically, ffmpeg-binaries is deprecated so you need to replace it by ffmpeg-static (btw, ffmpeg node package doesn't work)

(All of the credit goes to Irbyk btw, i don't know anything about node.js)

Adelick avatar Mar 08 '20 03:03 Adelick

I am having the same issue, and I stumbled upon this thread.

I tried Adelick's solution with no luck.

I have tried multiple python version and node.js versions each producing at least one error that prevents the bot from entering voice chat (they are all different. I even tried combinations of these different versions of python and node.js along with Adelick's solution.

Any other suggestions?

wittilywish avatar Mar 23 '20 02:03 wittilywish

Can you describe your environment ? Node v11 (not the v12, wich is the latest) and python 3(latest) should work (and if you can post your error message, that will be a nice bonus ^^).

irbyk avatar Mar 23 '20 04:03 irbyk

See following system information.

System

I installed node.js 11.15.0 and python 3.7.7 (64-bit) and tried it again following your most recent comment. See below output file copied from cmder as well as the complete log of the run.

output.txt 2020-03-24T00_39_12_694Z-debug.log

wittilywish avatar Mar 24 '20 00:03 wittilywish

Okay, so your error this time is because he try to used a python 2 script (with the print statment as key word and not a function) with python 3.7...

I'm not familliar with npm on Windows, but can you try npm install --python=python3.7 or npm install --python=path/to/your/python?

irbyk avatar Mar 24 '20 01:03 irbyk

I tried both, no luck. Command failed output1.txt

wittilywish avatar Mar 24 '20 01:03 wittilywish

Okay, I test with adelick a solution. Basically we install our bot on Windows (you can find it here : https://github.com/irbyk/Plex-Discord-Bot_V2 , it is an upgrade and update of this bot).

irbyk avatar Mar 24 '20 01:03 irbyk

Thanks for the help. I downloaded the new bot. I am still returning errors. output2.txt

Should i update node.js to the most recent (13.11.0) as well as python (3.8.2)? I used python 3.7.7 since it was the most recent stable build for 64-bit systems.

wittilywish avatar Mar 24 '20 02:03 wittilywish

Ok so with our bot it should work 🤔 . Just install node LTS version here (with the option to install the necessery tools) and that will be fine ... Don't forget to change the config file 😄 Then just do npm install Edit : yes you need at least node v12 this time, and if you install node with the installer and select the ''install the necessery tools" box, that should be enought.

irbyk avatar Mar 24 '20 03:03 irbyk

When installing the necessary tools when installing the LTS version, this error shows up.

Error

wittilywish avatar Mar 24 '20 18:03 wittilywish

Yes, I have the same issue. It seems that it appear when you already have Visual Studio isntall on your machine. Have you try to see if you are able to do a proper npm install with the node LTS latest version ?

Note : make sure to have the latest version of the bot too. When I clean it to put it on github, I create some bugs 😅

irbyk avatar Mar 24 '20 18:03 irbyk

It works! Thank you very much! I will let you know if I have any more questions.

wittilywish avatar Mar 24 '20 18:03 wittilywish

The plasure is all mine, and feel free to ask on the github if need new features or meet some issues !

irbyk avatar Mar 24 '20 18:03 irbyk