Reputation: 129
I've been trying to display little images in my embeds titles. But I can't make it work, the whole URL is displayed.
Code I tried to use:
var embed = new Discord.RichEmbed()
.setTitle(message.author.displayAvatar)
//I tried displayAvatarURL too
.setDescription('Test');
channel.send(embed);
Upvotes: 2
Views: 22545
Reputation: 1
If you want to add a little little image you need defaultAvatarUR
var embed = new Discord.RichEmbed()
.setAuthor(message.author.defaultAvatarUR)
.setDescription('Test');
channel.send(embed);
it's will be like this click here to see
Upvotes: 0
Reputation: 4497
That icon is from embed.setAuthor
.
var embed = new Discord.RichEmbed()
.setTitle("My Title")
.setAuthor("My Name", message.author.avatarURL)
.setDescription("My Description");
channel.send(embed);
And also to get the URL from the user avatar, on the current Discord.js version is message.author.avatarURL
and not displayAvatar
.
Upvotes: 4