rez
rez

Reputation: 331

Having Issues with "Client" inside MessageEmbed

Code:

    const specifyembed = new Discord.MessageEmbed()
    .setAuthor("Auto-Partner", client.user.displayAvatarURL())
    .setThumbnail(client.user.displayAvatarURL())
    .setDescription("**__Want to grow fast?__** \nWith this bot you can gain up to **3,000 Members** per week! \nThis bot will share your server in many active servers and to many active users! \nSimply add me to your server and use the command ``-partner {MESSAGE}``")
    .addFields([
        {
            name: '**__Bot Invite Link:__**',
            value: '[- Click To Add Bot -](your link goes here)'
        }
      ])
    .setTimestamp()
    .setFooter("© Auto-Partner")

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

Error:

(node:7920) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined

So if anyone got any solutions on how to fix this please help me out.

Upvotes: 0

Views: 28

Answers (1)

rez
rez

Reputation: 331

Issue was in util.js and command handler, i havent connected util.js with command handler, depends on what your issue is hopefully this one helps, i know it can depend.

Upvotes: 1

Related Questions