所以它没有像应该那样发送头像作为图像,但也没有错误,所以我想我忘记了什么?
execute(message, args) {
const Discord = require('discord.js');
if (!message.mentions.users.size) {
let embed1 = new Discord.MessageEmbed()
.setColor('0x0099ff')
.setDescription(`Your avatar:`)
.setImage(message.author.avatarURL)
.addField(`Link:`, `${message.author.displayAvatarURL({ format: "png", dynamic: true })}`)
message.channel.send(embed1);
}
else{
const user = message.mentions.users.first()
let embed2 = new Discord.MessageEmbed()
.setColor('0x0099ff')
.setDescription(`${user.username}'s avatar:`)
.setImage(user.avatarURL)
.addField(`Link:`, `${user.displayAvatarURL({ format: "png", dynamic: true })}`)
message.channel.send(embed2);
}
},