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');
    }                                                        
}                                                   
Was this page helpful?