title: Discord.JS Avatar Command using User ID
body: <p>I want to use the avatar command using user id's/mentions. I was able to use mentions, however I am unable to use the user ids.</p>
  <p>Here is my current code:</p>
  <pre class="lang-js prettyprint-override"><code>const Discord = require('discord.js');
  
  module.exports = {
      name: 'avatar',
      description: 'avatar',
      aliases: ['av'],
      cooldown: 5,
      async execute(message, args) {
         let member = message.mentions.users.first() || message.guild.members.cache.get(args[0]) || message.author;
         let avatar = member.displayAvatarURL({ size: 1024, dynamic: true });
  
         const embed = new Discord.MessageEmbed()
          .setAuthor(avatar, message.username)
          .setTitle(`Avatar`)
          .setImage(avatar)
          .setColor(&quot;BLACK&quot;)
          .setAuthor(member.username, avatar, avatar);
          message.channel.send(embed);
      },
  };
  </code></pre>
  <p>Whenever I run this code I receive this error:</p>
  <pre><code>Test Bot v1 ready!
  (node:835) UnhandledPromiseRejectionWarning: TypeError: member.displayAvatarURL is not a function
      at Object.execute (/home/runner/no/commands/ping.js:13:28)
      at Client.&lt;anonymous&gt; (/home/runner/no/index.js:106:13)
      at Client.emit (events.js:314:20)
      at Client.EventEmitter.emit (domain.js:483:12)
      at MessageCreateAction.handle (/home/runner/no/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
      at Object.module.exports [as MESSAGE_CREATE] (/home/runner/no/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
      at WebSocketManager.handlePacket (/home/runner/no/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
      at WebSocketShard.onPacket (/home/runner/no/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
      at WebSocketShard.onMessage (/home/runner/no/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
      at WebSocket.onMessage (/home/runner/no/node_modules/ws/lib/event-target.js:132:16)
  (node:835) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
  (node:835) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  </code></pre>