'Embeds appearing as empty when sent discord.js [duplicate]

i'm getting an error whenever I try to send an embed. This has only just started happening, and i've not done any form of updates (as far as I know) Here's my code:

const ping = new Discord.MessageEmbed()
      .setTitle('Pong!')
      .setDescription(`🏓 \`${Date.now() - message.createdTimestamp} ms\``)
      .setColor(0x39f79e);

message.channel.send('test')
console.log(ping)
message.channel.send(ping)

and here's the error that i'm getting, as well as the content logged to the console:

MessageEmbed {
  type: 'rich',
  title: 'Pong!',
  description: '🏓 `50 ms`',
  url: null,
  color: 3798942,
  timestamp: null,
  fields: [],
  thumbnail: null,
  image: null,
  video: null,
  author: null,
  provider: null,
  footer: null
}

/home/runner/Jungle-Bot/node_modules/discord.js/src/rest/RequestHandler.js:350
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/home/runner/Jungle-Bot/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/runner/Jungle-Bot/node_modules/discord.js/src/rest/RequestHandler.js:51:14) {
  method: 'post',
  path: '/channels/938846693884047410/messages',
  code: 50006,
  httpStatus: 400,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}

any help would be appreciated, i'm relatively new to this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source