How do I use custom emojis in an Await Reaction function

Hello, I am currently working on a command where I need an await reaction function for it to work. This is a small snippet of the command I am working on. Can anybody help?

 message.channel.send(startEmbed).then(function (message) {
      message.react('769948403772817418')
      message.react('769948393992093716')
      message.react('769948383837421608')
      message.react('769948373884338207')
      message.react('769948361985753108')
      message.react('769948342053765140')
      message.react('769948352233209897')
      message.react('769948333124354089')
      message.react('769948319995920434')
      message.react('769948309405040640')
      message.react('769948292812898334')
    
    const filter = (user) => {
        return user.id === message.author.id;
    }
    
    
        message.awaitReactions(filter, { max: 1, time: 60000 })
        .then(collected => {
    
                if (reaction.emoji.id === '769948403772817418') {
                    message.reply('test');
                }
            
   
        })

.then(function (message) {
For code maintainability and consistency, change this to an arrow function like you used below.
Otherwise, what’s the expected action of your code? You could try looking up using custom emojis in DJS, or (if I recall correctly) you have to say <EMOJI ID> or something similar

Like this?
message.channel.send(startEmbed).then (function (message) => {

I am really sorry, but I’m really new to coding. Could you tell me how to cooperate an arrow function into a .then function? Also, what I am trying to do is when you click one of the reactions it will do an action, but I can’t get it to work with custom emojis.

Can you try logging reaction.emoji.id? What does it show?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.