neon
neon

Reputation: 13

Avatar command doesn't show the profile picture

I'm making an avatar command, and it shows the users name in the embed, but not the actual avatar.

if (message.content.startsWith(PREFIX + 'avatar')) {
    const user = message.mentions.users.first() || message.author;
    const avatarEmbed = new Discord.MessageEmbed()
        .setImage(user.avatarURL)
        .setAuthor(user.username)
        .setColor(0x7732a8);
    message.channel.send(avatarEmbed);
}

a screenshot of the command

Upvotes: 0

Views: 106

Answers (1)

doc. Chocholoušek
doc. Chocholoušek

Reputation: 317

Easy to solve,
user#avatarURL() is a function, so just add () after it.

Upvotes: 1

Related Questions