Discord Rich 嵌入反应

Discord Rich embed reaction

我正在用 js 制作一个不和谐的机器人。我有一个丰富的嵌入,但我不知道如何对它做出反应。 message.react('emoji name thing') 不起作用。 代码:

var pollEmbed = new discord.RichEmbed()
                .setTitle(message.author.username + " asks " + args)
                .setAuthor(message.author.username)
            message.channel.send(pollEmbed);
            pollEmbed.react("✔")

您的问题是您无法对 RichEmbed 对象做出反应,只能对 message 做出反应。使用以下代码对新发送的 消息 做出反应...

message.channel.send(pollEmbed)
.then(m => m.react('✔'));