title: Discord API Gif Avatars
body: <p>Im making a discord bot dashboard, Id like it if when there logged in it shows them their avatar. Ive successfully got that working however it. This is my react code:</p>
  <pre><code>&lt;div&gt;
    {user.avatar === 'null' ?
       &lt;img onClick={toggleMenu} src={discord} width=&quot;40px&quot; height=&quot;40px&quot; className=&quot;uimg&quot; /&gt;
    :
       &lt;img onClick={toggleMenu} src={`https://cdn.discordapp.com/avatars/${user.discordId}/${user.avatar}.png`} width=&quot;40px&quot; height=&quot;40px&quot; className=&quot;uimg&quot; /&gt;
    }
  &lt;/div&gt;
  </code></pre>
  <p>This makes their avatar appear. If their avatar is a gif I want it to animate like a gif. I know I can just put <code>${user.avatar}.gif</code> instead of <code>png</code> but then png images won't show up. Does anyone know how to test if their avatar is a gif??</p>