Cannot join voice channel
I am rewritting my bot from DJS v12 to v14. I started by writing a simple music bot that would play a youtube link using ytdl-core. But when it tries to join a voice channel it just doesn't and then it is unable to subscribe.
I believe it may have something to do with the voice adapter but I am not sure how that works.
Gateway intents are enabled, and I did manage to make it join using the discord-player package but that package is way beyond my understanding.
Using Windows 10 Enterprise
Node.js v18.13.0
├── @discordjs/[email protected]
├── @discordjs/[email protected]
├── [email protected]
├── [email protected]
└── [email protected]
12 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
<AudioPlayer>.subscribe()
doesn’t existhttps://discordjs.guide/voice/voice-connections.html I was trying to follow this guide, do I need to create an audio player and the subscribe? Wouldn't ytdl be enough?
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
don’t even know what you trynna do
My bad, wrong url
ok but what’s your goal?
there’s no
player.subscribe()
thereRight, So I am trying to make it join a Voice Channel, and then play music using ytdl core. The first problem is that the bot won't join the voice channel.
the guide correctly explains how to
As for the subscribe part, it seems to come from the bot not joining in the first place.
I don't seem to be able to do so...
interaction.channelId is the voice channel id?
... no, just changed it and it works
Thanks Idris, you're the real hero