Can't join voice channel, "Cannot read properties of undefined (reading 'status')" #283
Answered
by
skick1234
NoNameLmao
asked this question in
Q&A
-
my first time using distube, and i've gotten this error while trying to join a voice channel:
// my custom class
/** @param {discord.VoiceBasedChannel} voiceChannel */
async joinVC(voiceChannel) {
this.currentVC = await this.distube.voices.join(voiceChannel)
return this.currentVC
} // discord slash command code
async run(interaction) {
const subcommand = interaction.options.getSubcommand(true)
if (subcommand == 'join') {
if (interaction.options.getUser('user', false)) {
const userId = interaction.member.user.id
const user = interaction.guild.members.cache.get(userId)
const voiceChannel = user.voice.channel
if (!voiceChannel) {
interaction.reply(`❌ The user is not in a voice channel that is visible to me!`)
return
}
interaction.reply(`Joining the voice channel "${voiceChannel.name}"`)
await musicPlayer.joinVC(voiceChannel)
}
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
skick1234
Nov 18, 2022
Replies: 1 comment 6 replies
-
Not related to distube. It is due to your |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
NoNameLmao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not related to distube. It is due to your
@discordjs/voice
version is not compatible with yourdiscord.js
version?What are your installed versions?