所以我想问一问,如果有人使用我的embed命令,如果可能的话,嵌入图像会自动设置为作者的个人资料图片。
在命令处理程序中放置我的代码:
const Discord = require('discord.js');
const {
Client,
MessageAttachment
} = require('discord.js');
const footer = "Thanks For Reading"
var Version = '1.0';
module.exports = {
name: 'embeds',
description: '',
execute(msg, args) {
const embed = new Discord.MessageEmbed()
.setTitle('user information')
.setColor(0xf1c40f)
.addField('Username', msg.author.username)
.addField("server's name", msg.guild.name)
.addField('Bots Version', Version)
.setImage("https://static-cdn.jtvnw.net/jtv_user_pictures/988e306e-a4f5-44c0-9685-69cab4a8e7ae-profile_image-70x70.jpg")
.setFooter("Have fun!")
.setTimestamp(Date.now())
msg.reply(embed)
}
}
谢谢。
答案 0 :(得分:1)