ReferenceError: Member is not defined

So I am currently trying to use discord.js and ytdl to play music off of youtube, and it's saying that member is not defined because it cant really tell what member is, but i'm struggling to brainstorm on how to define a member. NPM 14.11.0 Node v 18.17.0
try {
const connection = joinVoiceChannel({
channelId: member.voice.channel/channelId,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
console.log('I have joined a voice channel!');
play(msg.guild, queueContruct.songs[0]);
} catch (err) {
console.log(err);
queue.delete(msg.guild.id);
return msg.channel.send(err);
}
} else {
serverQueue.songs.push(song);
return msg.channel.send(`${song.title} has been added to the queue!`);
console.log('i have added a song to the queue');
}
}
try {
const connection = joinVoiceChannel({
channelId: member.voice.channel/channelId,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
console.log('I have joined a voice channel!');
play(msg.guild, queueContruct.songs[0]);
} catch (err) {
console.log(err);
queue.delete(msg.guild.id);
return msg.channel.send(err);
}
} else {
serverQueue.songs.push(song);
return msg.channel.send(`${song.title} has been added to the queue!`);
console.log('i have added a song to the queue');
}
}
3 Replies
d.js toolkit
d.js toolkit2y ago
- 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. - Issue solved? Press the button!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
𝖂𝖎𝖓𝖌𝖊𝖉𝕰𝖓𝖙𝖗𝖔𝖕𝖞
Ahhh right i forgot about that, thank you!

Did you find this page helpful?