Bot is not joining voice channel after executing function in voiceStateUpdate event
After I made a function that is responsible for automatically playing the radio when a user joins the channel, the bot does not join the channel at all despite the variables being correctly defined. Debugging showed nothing (I tried logging
connection, player, stream, resource
sequentially), however everything seems to be used correctly.
I am using almost the same code in the radio.ts
command which is responsible for starting the radio manually, where everything works correctly. The only thing that changes is adapterCreator
which I currently think is the problem in my function.16 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPand also idk why in the @discordjs/voice documentation basically every page I go to returns a 404 error
and no, I have no error
I've never used @djs/voice with djs, but you should use discord.js to join it
Something that can also be happening is
channel.id
not exist, or settings.radioStation
not exist toothey both exist
I'll let someone more experienced with djs/voice with djs handle this
wait, it's not like these methods are only in @discord.js/voice?
in the docs only they are there
Usually we handle voice joining manually when not using with djs or being an independent node
Unless you are not calling startRadio in voiceStateUpdate, I'm unsure why it's not joining
if I hadn't called it in voiceStateUpdate, I wouldn't have got response from console.logs
Well, you only provided half of the
voiceStateUpdate
, hard to make any assumptions
But this is most likely to be an issue on how you're using joinVChannel function if it's being reached
just I don't think the rest is necessary
lol i fixed it somehow xDD
i replaced guildId with guild.id
💀 LMAO
Please mark this as solved btw
Yeah
?
I'll close
Just click this button
oh
nvm