Reputation: 23
I'm trying to get user's avatars for a welcome message but when someone joins it never shows it. I've tried many different methods. Here is my current code.
bot.on('guildMemberAdd', member => {
const exampleEmbed = new MessageEmbed()
.setColor('#0000FF')
.addField('Welcome!', `Welcome to the server, ${member}! Go to <#channel> for the rules, then grab some roles at <#channel>!`)
.setThumbnail(member.user.displayAvatarURL)
member.guild.channels.cache.get('693219932904751177').send(exampleEmbed);
});
Upvotes: 2
Views: 527
Reputation: 566
All you need to do it add a ()
behind the .displayAvatarURL
So the line would look like this:
.setThumbnail(member.user.displayAvatarURL())
Upvotes: 1