Beginner to Discord JS, Audio Not Playing
Hello, I just started learning discord js, i wrote a simple connect and playcommand using the guide but didnt work, asked gpt to add some state logs and here is the code.
The bot joins the channel but no sound is played
Here is what gets logged:
š§ Connecting to voice channel...
ā ļø Voice connection is taking too long. Continuing anyway...
š Resolved audio path: h:\Programming\Discord Bot Practice\discord-bot\commands\voice\nya.wav
š Voice connection: signalling -> signalling
ā¶ļø Subscribed to player. Starting playback...
šµ Audio player: idle -> buffering
šµ Audio player: buffering -> playing
ā
Audio is playing!
šµ Audio player: playing -> autopaused
ā ļø Audio auto-paused! Probably alone in voice channel.
š„ Non-bot members in VC: 1
any guidance will be appreciated <3
2 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- 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 staffthank you scripted bot, it works now
it was the intents
i really think the guide should tell you that tho