TypeError: Cannot read property 'client' of undefined

Hello.

I was coding my bot, when I got this error:

Here is the code:

const Discord = require(‘discord.js’);

exports.run = async (client, message, args) => {

let specifyembed = new Discord.MessageEmbed()
    .setColor(0xF55D5D)
    .setDescription(`${message.author}, Por favor especifica uma frase ou uma palavra.`)
    .setTimestamp();

if (!args[0]) return message.channel.send(specifyembed);

let embedsay = new Discord.MessageEmbed()
    .setColor('RANDOM')
    .setAuthor(message.author.tag, message.author.avatarURL)
    .setDescription(`${args[0]}`);

message.channel.send(embedsay);

};

exports.conf = {
enabled: true,
guildOnly: false,
aliases: [“”],
permLevel: “User”
};

exports.help = {
name: “embed”,
category: “Outros”,
description: “Cria um embed com uma palavra ou frase especificada”,
usage: “embed ”
};

What’s happening?

Hi @TheBigerGamer if you’re still encountering this problem, what’s the project name?

Hi @TheBigerGamer

replace with

    let specifyembed = new Discord.RichEmbed()
    .setColor(0xF55D5D)
    .setDescription(`${message.author}, Por favor especifica uma frase ou uma palavra.`)
    .setTimestamp();

    if (!args[0]) return message.channel.send(specifyembed);

    let embedsay = new Discord.RichEmbed()
    .setColor('RANDOM')
    .setAuthor(message.author.tag, message.author.avatarURL)
    .setDescription(`${args[0]}`);
    message.channel.send(embedsay);

let embed = new Discord.RichEmbed()
Use as

The project name is testbot-js

@TheBigerGamer

If you look at my answer