Closed Ravenwulf closed 4 years ago
the stack trace shows the error is coming from prism-media. I tried looking at the source code from that line, but it looks like that file is no longer there
https://github.com/amishshah/prism-media/tree/master/src
likely you're using an older version of prism-media
So what do you suggest I do to fix it? I already installed the latest version of ytdl. Is there a way to easily get the new version of prism-media w/o risk of screwing something up?
look at what depends on it that you have, and update that. it's probably discord.js. and then make sure it's on its latest version by checking with npm version prism-media
Well, I tried to do that and now i'm getting this error. Forgive me, I'm not used to this side of programming. I couldnt find any object declarations so im not sure why its telling me that Prism is not a constructor.
2020-02-29T06:49:18.362690+00:00 app[worker.1]: TypeError: Prism is not a constructor
2020-02-29T06:49:18.362692+00:00 app[worker.1]: at new VoiceConnection (/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:46:18)
2020-02-29T06:49:18.362693+00:00 app[worker.1]: at /app/node_modules/discord.js/src/client/voice/ClientVoiceManager.js:63:22
2020-02-29T06:49:18.362693+00:00 app[worker.1]: at new Promise (<anonymous>)
2020-02-29T06:49:18.362695+00:00 app[worker.1]: at ClientVoiceManager.joinChannel (/app/node_modules/discord.js/src/client/voice/ClientVoiceManager.js:45:12)
2020-02-29T06:49:18.362695+00:00 app[worker.1]: at VoiceChannel.join (/app/node_modules/discord.js/src/structures/VoiceChannel.js:130:30)
2020-02-29T06:49:18.362696+00:00 app[worker.1]: at Client.<anonymous> (/app/index.js:124:80)
2020-02-29T06:49:18.362696+00:00 app[worker.1]: at Client.emit (events.js:323:22)
2020-02-29T06:49:18.362697+00:00 app[worker.1]: at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
2020-02-29T06:49:18.362736+00:00 app[worker.1]: at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
2020-02-29T06:49:18.362737+00:00 app[worker.1]: at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
And seriously thanks for helping man, this isn't even really your problem but the fact that you were willing to help me is awfully humbling.
the syntax for the new version of prism updated. look at the files in the stack trace that are yours. in this case, app/index.js
Hey, I can't find any solutions to this online so I figured i'd ask here.
When I run the below code in my discord.js bot, I receive the below error and I have no idea how to fix it or if the problem is even on my end.
My code works when a user types
$queue <youtube url>
My Code
The Error
I understand what the error is trying to tell me but it seems to me that I am passing a string so...