在文档中,它指出 Message
可以有一个 array of Embeds .
如果可以用一条消息发送多个 RichEmbed
,这显然提出了一个问题。
发送嵌入的正常方式是使用 MessageOptions对象,像这样:
message.channel.send({embed: embedName});
虽然这似乎不允许多个 RichEmbeds,但有人知道是否可以发送多个吗?
最佳答案
作为Abz6is指出,您可以使用 Webhook 一次发布多个 RichEmbeds
。
Here是 WebhookMessageOptions
的文档。
简单示例:
message.channel.createWebhook('Webhook Name', message.author.displayAvatarURL)
.then(w => w.send({embeds: [
new Discord.RichEmbed().setAuthor('Embed 1'),
new Discord.RichEmbed().setAuthor('Embed 2'),
]}));
这适用于最多 10 个嵌入。
关于discord - 是否可以在一条消息中发送多个 RichEmbeds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57746816/