title: React to a Message Previously Sent in Discord.js
body: <p>This is a pretty basic one, but I'm wondering how I could possibly have any user send a message, then have someone type something (e.g. !react EMOJI_NAME) and have it react to the message sent by the random user and THEN delete the message &quot;!react EMOJI_NAME&quot;. I already have a system that can send any custom emoji, animated or not, but I do not have a way to react to a specific message sent by a different user (which is why I can't just search for the first message in a channel or identify a message sent by the author) Anyone got any tips for how to identify the second message sent in a channel? Any help is appreciated :)</p>
  <p><strong>Note:</strong> This code below won't work because it will react to the message &quot;!react EMOJI_NAME&quot; and then proceed to delete the exact same message. Thanks for reading!</p>
  <pre><code>case 'react':
            var { MessageEmbed } = require('discord.js');
            var emojis = client.emojis.cache.filter(e =&gt; e.name.toLowerCase() === args.join(' ').toLowerCase());
  
              var content = '';
  
              emojis.forEach(emoji =&gt; {
                content = `${content} ${emoji}`;
              });
  
              message.react(content)
                .then(function () {
                  message.delete()
                })
                .catch(function () {
                  var errorEmbed = new MessageEmbed()
                    .setColor('#ff0000')
                    .setDescription(`&lt;:error:784747315960479754&gt; There was an error finding that emoji`);
                  message.channel.send(errorEmbed);
                });
              break;
  </code></pre>