The system does not work when the bot is on have voice channel and when someone enters the sound
When i put the bot in the voice channel with the command, the command does not work when someone comes or when someone enters the voice normally, the bot enters the voice and plays the mp3, if they exit and enter, the bot stops talking
33 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!my code
need help
@ShompiFlen I remember you helped me before and i tagged you for that. i have been waiting for 2 days to get help with something in the @discord.js/voice module but no one has helped me, i apologize for tagging you, can you please help me? (Sorry for tag)
i did tell you that your bot should join the voice channel through a command instead of a voice state update, you havent changed this
this looks like the same code from last week
It join voice channel with a command but then what should i do with the 'connection'
the same thing you do here in the voice state update
Joining the voice channel with this command
just copy and paste your voice state update over to the command file and then start debugging it
So should i log this section with console.log() and see the output? (I wanted to say that the connection here is undefined)
of course its undefined because you are not defining a connection anywhere
again
just get rid of all the code on the voice state update event, you dont need it there anymore
move it to your command
So should i do it like this?
I wrote all the imports after sending the ss
your if statememt in line 28 is not going to work because you dont have a newstate there. I think you can just remove that anyways
I made a code like this, but this time it gives an error like below, how do i fix it?
I think i accidentally left the ping sender on in the reply, sorry.
I think i need to sleep and this will be left for tomorrow, good night hoping to fix it tomorrow <:pepe_smile:884630934060695574>
and we are back to the voice state event....
you are moving and adding code to this script in unnecessary ways
But how can i make it shorter?
This code was not working