Can't join voice channel
I am making a background music bot that joins a voice channel and plays, well background music. I copy-pasted the code from the documentation but it refuses to work. What am I doing wrong?
14 Replies
What documentation, any errors?
Documentation: https://discordjs.guide/voice/voice-connections.html#voice-connections
Errors: No errors, but bot refuses to respond.
Code:
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
1. ids need to be strings
2. you'll need the
GuildVoiceStates
intent- Discord ids follow the snowflake format: learn more
- Discord ids must be represented as strings as they are larger than
Number.MAX_SAFE_INTEGER
, the largest integer that can be represented in JavaScript
Oh, okay.
I tried it, and it still doesn't work.
Error:
Code:
so then import
joinVoiceChannel
from @discordjs/voice
I’ll try
Wait a second, how do I import it again?
Importing/requring something is basic JavaScript, do you know much of JavaScript?
i only know html javascript and i forgot most of it 💀
Then I recommend you check out #resources to brush up on your JavaScript fundamentals
Thanks
Of course
I'll try it tomorrow because I have to go soon
Sounds good