'why my bot is not dending the image in embed
const { MessageEmbed, WebhookClient, GuildMember} = require('discord.js');
module.exports = {
name : 'guildMemberAdd',
/**
*
* @param {GuildMember} member
*/
async execute(member) {
const {guild, user} = member;
const welcomer = new WebhookClient({
id : '958046742446759936',
token: '3X9d1gJT8rLCyV-WFkorfkpU5Tl9iF8IXWMz3BOfuR7GQ1Sf5V5OD1HwWxRHRLf97tK0'
});
const welcome = new MessageEmbed()
.setColor('AQUA')
.setAuthor({name: user.tag,iconURL: user.avatarURL({dynamic:true})})
.setThumbnail(user.avatarURL)
.setDescription(`Welcome ${member} to the **${guild.name}**!\nAccount Created: <t:${parseInt(user.createdTimestamp/1000)}:R>\nLatest Member Count: **${guild.memberCount}**`)
.setFooter({
text: user.tag,
iconURL: user.avatarURL()
})
welcomer.send({embeds:[welcome]})
let welcomeRole = guild.roles.cache.find(role => role.id === '954841166933811210');
console.log(`${user.tag} has joined the server`)
member.roles.add(welcomeRole);
}
}
I am trying to do create an embed but it is not loading the thumbnail please help me to do it as I am very upset
it did not even give my photo in the embed what is the problem behind it is this is in code or from discord
Solution 1:[1]
use user.displayAvatarURL() instead of user.avatarURL()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Imperial X |
