TypeError: Cannot read properties of undefined (reading 'member') discord JS

Viewed 17
    async execute({ client, interaction }) {
        if (!interaction.member.voice.channel) return interaction.editReply("You need to be in a VC to use this command")

        const queue = await client.player.createQueue(interaction.guild)
        if (!queue.connection) await queue.connect(interaction.member.voice.channel)

        let embed = new MessageEmbed()

interaction.member.voice.channel How can I fix so this will work? I cannot find out how. TypeError: Cannot read properties of undefined (reading 'member')

0 Answers
Related