Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I want to add a reaction to my embed but it doesnt really work…. [Discord.js v12.5]

I want to add a reaction to this embed that is automatically sent to a specific channel after a user is done answering some questions. It’s a discord application system. I believe I’m doing this right, since I’ve done this before the same way but now in this exact code, it doesn’t work. This is my code :

 function send_finished(){
             let embed = new Discord.MessageEmbed()
             .setColor("#CD8BF2")
             .setTitle("💻A new Discord Helper application from: " + user.tag) 
             .setDescription(`${user}`)
             .setFooter(user.tag, user.displayAvatarURL({dynamic:true}))
             .setTimestamp()
             for(let i = 0; i < config.QUESTIONS.length; i++){
                 try{
                     embed.addField(config.QUESTIONS[i], '```' + String(answers[i]).substr(0, 1024) + '```')
                 }catch{
                 }
             }
 
 
             channel_tosend.send(embed);
             embed.react('✅')
 
             user.send("Thanks for applying to: " + message.guild.name)
       
         }

This is the error i get :

            embed.react('✅')
                  ^

TypeError: embed.react is not a function

Any help or actually telling me what the heck I’m doing wrong? 😂

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Perhaps:

let embed = new Discord.RichEmbed()

message.channel.send({embed: embed});
message.channel.send({embed: embed}).then(embedMessage => {
    embedMessage.react("👍");
});
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading