为什么我的机器人不发送嵌入图像
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);
}
}
我正在尝试创建一个嵌入,但它没有加载缩略图请帮我做,因为我很不高兴
它甚至没有在嵌入中提供我的照片它背后的问题是在代码中还是来自 discord
使用user.displayAvatarURL()
代替user.avatarURL()
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);
}
}
我正在尝试创建一个嵌入,但它没有加载缩略图请帮我做,因为我很不高兴
它甚至没有在嵌入中提供我的照片它背后的问题是在代码中还是来自 discord
使用user.displayAvatarURL()
代替user.avatarURL()