Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
89
rated 0 times [  93] [ 4]  / answers: 1 / hits: 16337  / 6 Years ago, thu, june 14, 2018, 12:00:00

How would I add a emote to the embed. I can only get it to work where it reacts on the command message itself.



message.react(👍) // Is the command to add one normally.


I write out my embeds like this too:



let suggestembed = new Discord.RichEmbed()
.setDescription( )
.setColor(#00FFFF)
.addField(New Suggestion By:, `${message.author}`)
.addField(Suggestion:, suggestion);


Which at the end is where I'd put the react command I can only assume.


More From » discord

 Answers
158

As the question is quite unclear it might have 2 answers.



1: If you're trying to add the emoji to the description of the embed you should do .setDescription(👍).






2: If you're trying to add the emoji as reaction after you send the embed, you will need to use promises, to wait for the embed to be sent and then add the reaction. If should have something to send the embed like this:



message.channel.send({embed: suggestedembed});


All you need to do is replace that to contain the promise:



message.channel.send({embed: suggestedembed}).then(embedMessage => {
embedMessage.react(👍);
});


This is just gonna wait until the message was sent successfully, and then return you the message that was sent. From there you can do whatever you want with that new message.


[#54202] Monday, June 11, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kennedi

Total Points: 702
Total Questions: 109
Total Answers: 111

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
;