title: Slash Command: DiscordAPIError: Unknown Webhook error?
body: <p>I am trying to make an avatar command with slash commands and I keep on getting an error.</p>
  <p>Here is my code and error. The name, description and options for the slash commands are in another file:</p>
  <p><strong>Data Handler.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>async function createCmd(Client, guildId) {
      const data = [
          // ping
          {
              name: 'ping',
              description: &quot;Return Websocket ping.&quot;
          },
  
          {
              name: 'slowmode',
              description: &quot;Set Channel Slowmode.&quot;,
              options: [{
                  name: &quot;time&quot;,
                  type: 'NUMBER',
                  description: &quot;Message Delay of the channel.&quot;,
                  required: true
              }]
          },
          {
              name: 'avatar',
              description: 'Get a user\'s avatar.',
              options: [{
                  name: 'target',
                  type: 'USER',
                  description: 'Choose a user',
                  required: true,
              }]
          }
  
  
      ]
  
  
      await Client.guilds.cache.get(guildId)?.commands.set(data);
  }
  //834698665213952051
  
  
  
  module.exports = { createCmd }
  </code></pre>
  <p><strong>Avatar.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>const Client = require(&quot;../../bot&quot;).Client
  const Discord = require('discord.js');
  
  module.exports.run = async (inter) =&gt; {
      const user = inter.options.getUser('target')
  
      const embed = new Discord.MessageEmbed()
          .setTitle(`${user.username}'s Avatar`)
          .setColor('#FFA500')
          .setImage(user.displayAvatarURL({
              dynamic: true,
              size: 1024
          }))
          .setTimestamp()
          .setDescription(`[Png](${user.avatarURL({ format: 'png' })}) | [Webp](${user.avatarURL({ dynamic: true })}) | [Jpg](${user.avatarURL({ format: 'jpg' })})`)
          .setFooter(`Requested by: ${inter.user.username}`, inter.user.displayAvatarURL({ dynamic: true }));
      
      await inter.followUp({
          embeds: [embed]
      }); 
  }
  
  module.exports.help = {
      name: 'avatar',
  }
  </code></pre>
  <p><strong>Error</strong></p>
  <pre class="lang-js prettyprint-override"><code>C:\Users\user\OneDrive\Documents\Vetlix-Utilities\node_modules\discord.js\src\rest\RequestHandler.js:349
        throw new DiscordAPIError(data, res.status, request);
              ^
  
  DiscordAPIError: Unknown Webhook
      at RequestHandler.execute (C:\Users\user\OneDrive\Documents\Vetlix-Utilities\node_modules\discord.js\src\rest\RequestHandler.js:349:13)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async RequestHandler.push (C:\Users\user\OneDrive\Documents\Vetlix-Utilities\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
      at async InteractionWebhook.send (C:\Users\user\OneDrive\Documents\Vetlix-Utilities\node_modules\discord.js\src\structures\Webhook.js:192:15)
      at async Object.module.exports.run (C:\Users\user\OneDrive\Documents\Vetlix-Utilities\SlashCommands\Utility\avatar.js:18:5) {
    method: 'post',
    path: '/webhooks/834730290463244300/aW50ZXJhY3Rpb246OTA4NzA2NjE5NzU4NjEyNDgwOnlONG1Md1NNazVCeVA5Slo1RldXTExlY3VmZVdMcGh6ZGI4NjJFYUZFWHNPWW8wbnVTaml0VTd5bldtbW9oVjQ5ekxCZ0NtV0NmM2FhQjVSTDY5bGhRSjFId1htRDRTUWJUMVN2SkZXVHZxNk5QQUFUZHU2MnRRNGE2dWM1NXZ3?wait=true',
    code: 10015,
    httpStatus: 404,
    requestData: {
      json: {
        content: undefined,
        tts: false,
        nonce: undefined,
        embeds: [
          {
            title: &quot;ShxZz's Avatar&quot;,
            type: 'rich',
            description: '[Png](https://cdn.discordapp.com/avatars/817779965856055317/128445caf9d891b9c1aedb609e3ee745.png) | [Webp](https://cdn.discordapp.com/avatars/817779965856055317/128445caf9d891b9c1aedb609e3ee745.webp) | [Jpg](https://cdn.discordapp.com/avatars/817779965856055317/128445caf9d891b9c1aedb609e3ee745.jpg)',
            url: null,
            timestamp: 2021-11-12T13:15:37.140Z,
            color: 16753920,
            fields: [],
            thumbnail: null,
            image: {
              url: 'https://cdn.discordapp.com/avatars/817779965856055317/128445caf9d891b9c1aedb609e3ee745.webp?size=1024',
              proxyURL: undefined,
              height: undefined,
              width: undefined
            },
            author: null,
            footer: {
              text: 'Requested by: Vetlix',
              icon_url: 'https://cdn.discordapp.com/avatars/751405982562648146/32a3b7ada0724d08bec225ffa92aef84.webp'
            }
          }
        ],
        components: undefined,
        username: undefined,
        avatar_url: undefined,
        allowed_mentions: undefined,
        flags: undefined,
        message_reference: undefined,
        attachments: undefined,
        sticker_ids: undefined
      },
      files: []
    }
  }
  </code></pre>
  <p>Node.js v17.0.0</p>