【发布时间】:2019-11-24 18:40:21
【问题描述】:
如何在同一条消息中发送附件和嵌入?
发送附件:
if (message.content === ';file') {
const attachment = new Attachment('https://i.imgur.com/FpPLFbT.png');
message.channel.send(`text`, attachment);
}
发送嵌入:
if (msg.content === ';name') {
const embed = new Discord.RichEmbed()
.setTitle(`About`)
.setDescription(`My name is <@${msg.author.id}>`)
.setColor('RANDOM');
msg.channel.send(embed);
}
【问题讨论】:
标签: javascript node.js discord.js