'cannot read properties of (reading 'set')

This is the code

  module.exports ={
    name: 'command',
    description: "Embeds!",
    execute(message, args, Discord){
        const newEmbed = new Discord.MessageEmbed()
        .setColor('#304281')
        .setTitle('Rules')
        .setURL('xd')
        .setDescription('bu embed sv kurallari icin')
        .addFields(
            {name: 'Rule 1', value: 'iyi davran'},
            {name: 'Rule 2', value: 'iyi davran 2'},
            {name: 'Rule 3', value: 'iyi davran 3'},
        )
        .setImage('https://i.pinimg.com/originals/1f/7d/eb/1f7deb81f627a85616553ad7f6c7b08c.jpg')
        .setFooter('Kurallara bakmayi unutma');

        message.channel.send(newEmbed);
    }
}

I try the make discord bot i wrote this codes and try the test them then I get this error cannot read properties of (reading 'set') then I delete the js file it fixed can someone help me



Solution 1:[1]

Maybe add a declaration for the function? I don't know how to use Discordjs at all but this can be helpfull for you.

module.exports ={
    name: 'command',
    description: "Embeds!",
    executeFunction: execute(message, args, Discord){
    ...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ask4you