another bot not joining the voice channel
Hi there, im learning my way through the docs and making my first bot, i was following line by line the basic example repo from
discord/voice
(https://github.com/discordjs/voice-examples/blob/main/basic/src/main.ts) but its not working, its basically the same code minus the formatting and the difference in current Status
comparison since it seems the deesctructuring of Constants
for Events, Status
is not longer used... the code logs is ready to play but when i type -join
on the chat it doesnt respond at all, is it because of the intents?
these are my dependencies
GitHub
voice-examples/basic/src/main.ts at main · discordjs/voice-examples
A collection of examples of how to use @discordjs/voice in your projects - voice-examples/basic/src/main.ts at main · discordjs/voice-examples
7 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Yes, you'll want the MessageContent intent if you want to receive message content
i tried before, but it crashes with the following error
Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
If you are using the GuildMembers
, GuildPresences
, or MessageContent
intents, you need to enable them in the developer portal:
- Developer Portal > Your app > Bot > Privileged Gateway Intentsholy sh, it worked wonders, only it joins deaf, but i imagine its because of permissions too and ive seen some posts with the same issue, ill try them out, thank you!
selfDeaf
is true
default
you can specify otherwise in joinVoiceChannel
it worked! now it doesnt reproduce anything but thats because i dediced to refactor it and take my
playSong()
function to its own file to use it in my ready()
function but it seems it never triggers, guess ill make it work first and then reestructure haha, thank you so much duck!