𝖂𝖎𝖓𝖌𝖊𝖉𝕰𝖓𝖙𝖗𝖔𝖕𝖞
𝖂𝖎𝖓𝖌𝖊𝖉𝕰𝖓𝖙𝖗𝖔𝖕𝖞
DIdiscord.js - Imagine ❄
Created by 𝖂𝖎𝖓𝖌𝖊𝖉𝕰𝖓𝖙𝖗𝖔𝖕𝖞 on 7/23/2023 in #djs-questions
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');
}
}
4 replies