Q: Error Code 50006 when any gif or sticker is put into chat My discord script is currently working as intended except in rare situations. When anyone posts a gif or a sticker into the chats I'm monitoring, it crashes and throws back an error 50006 back at me. I tried this myself by sending a regular message and a gif right after. The regular message went through just fine, but the gif threw back an error at me. See the following.
DiscordAPIError[50006]: Cannot send an empty message
    at SequentialHandler.runRequest (FILE_LOCATION\node_modules\@discordjs\rest\dist\index.js:748:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (FILE_LOCATION\node_modules\@discordjs\rest\dist\index.js:560:14)
    at async REST.request (FILE_LOCATION\node_modules\@discordjs\rest\dist\index.js:1000:22)
    at async WebhookClient.send (FILE_LOCATION\node_modules\discord.js\src\structures\Webhook.js:213:15) {
  rawError: { message: 'Cannot send an empty message', code: 50006 },
  code: 50006,
  status: 400,
  method: 'POST',
  url: 'MYWEBHOOK',
  requestBody: {
    files: [],
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: [],
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    }
  }
}

I make sure the data doesn't equal null before sending it off to a switch statement that checks the channel_id the message is coming from. In there, I verify that there is an author before even sending the webhook. So should I be verifying something other than the author in my second check before sending it off to the webhook?
Example of my switch statement:
function listener(d) {
    if (d.author != null) {
        if (d.channel_id === CHANNEL_ADDRESS) {
            let content = d.content ? d.content : { embeds: d.embeds };
            let client = new WebhookClient({ URL: "WEBHOOK_URL" })

            client.send(content);
        }
    }
};

