Discord Rich embed reaction

Asked by At

I am making a discord bot in js. I have a rich embed but I don't know how to react to it. The message.react('emoji name thing') doesn't work. code:

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

1 Answers

2
Community On Best Solutions

Your problem is that you can't react to a RichEmbed object, only a message. Use the following code to react to the newly sent message instead...

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