title: How to test if an emoji is animated in discord.js
body: <p>I'm making a discord bot and I want the bot to send an image or gif of an emoji that the user sent, but I can't seem to figure out how to detect if the emoji is animated or not.</p>
  
  <pre><code>        var emoji1 = args[0].split(':')
          var emojiID = emoji1[2].split('&gt;')
  
          const emoji = bot.emojis.get(emojiID);
  
          if (emoji.animated == true) {
              message.channel.send({
                  file: "https://cdn.discordapp.com/emojis/" + emojiID[0] + ".gif"
              });
          } else {
              message.channel.send({
                  file: "https://cdn.discordapp.com/emojis/" + emojiID[0] + ".png"
              });
          }
  </code></pre>
  
  <p>but when I run this I get an error</p>
  
  <pre><code>Cannot read property 'animated' of undefined
  </code></pre>