How to Send Embed Messages on Discord-Smart Guide

Last Updated on January 1, 2022

In Discord, an embed object is another component of a specific Discord message that you can use for presenting data with special formatting and in some cases special structure. This usually includes Author including the link and avatar. Also, there can be an image, thumbnail image, field, a footer with text and icon, color, title, description, etc. If you want to learn how to send embed messages on Discord, stay tuned!

The Difficulty

Yes, embeds look nice. But when it comes to sending them via text, you might face issues. They might be disabled through permissions. According to user preferences, they might be disabled too. And while sending it, they won’t look the same on mobile!

If you are dealing with a complex embed, chances are, you won’t understand if you are on a mobile. So, we suggest you only use them if you have got a text-only fallback. Try skipping embeds unless you need to use it!

Rules for Embed

We have listed a few rules for embedding that will help you send embed messages on Discord without complication. Take a look!

  • Every field in embed is optional
  • No field will be empty or cannot be empty, undefined, or null
  • At least there must be one field or one field must be present there

You might think that skipping these rules won’t affect the embed message. But let us tell you if you go against any of these rules, chances are, the embed message will not be sent. Also, it will return as a Bad Request! You surely don’t want that right?

Methods of Sending Embed Message on Discord

Here, we have brought two different methods of doing embeds. If you want to go for a clean way, we recommend you settle for the MessageEmbed builder. Here, the second one is writing the object itself. Check both of these methods! 

MessageEmbed Builder

The rules we have mentioned above works for the MessageEmbed Builder too! The builder method is a shortcut one but the best thing is you get a neat and clean embed no doubt!

const embed = new Discord.MessageEmbed()

  /*

   * Alternatively, use “#3498DB”, [52, 152, 219] or an integer number.

   */

  .setColor(0x3498DB)

  .setAuthor(“Author Name, it can hold 256 characters”, “https://i.imgur.com/lm8s41J.png”)

  .setTitle(“This is your title, it can hold 256 characters”)

  .setURL(“https://discord.js.org/#/docs/main/stable/class/MessageEmbed”)

  .setDescription(“This is the main body of text, it can hold 4096 characters.”)

  .setImage(“http://i.imgur.com/yVpymuV.png”)

  .setThumbnail(“http://i.imgur.com/p2qNFag.png”)

  .addField(“This is a single field title, it can hold 256 characters”, “This is a field value, it can hold 1024 characters.”)

  /*

   * Inline fields may not display as inline if the thumbnail and/or image is too big.

   */

  .addFields(

    { name: “Inline fields”, value: “They can have different fields with small headlines, and you can inline them.”, inline: true },

    { name: “Masked links”, value: “You can put [masked links](https://discord.js.org/#/docs/main/master/class/MessageEmbed) inside of rich embeds.”, inline: true },

    { name: “Markdown”, value: “You can put all the *usual* **__Markdown__** inside of them.”, inline: true }

  )

  /*

   * Blank field, useful to create some space.

   */

  .addField(“\u200b”, “\u200b”)

  /*

   * Takes a Date object, defaults to current date.

   */

  .setTimestamp()

  .setFooter(“This is the footer text, it can hold 2048 characters”, “http://i.imgur.com/w1vhFSR.png”);

  /*

   * With Discord now allowing messages to contain up to 10 embeds, we need to put it in an array.

   */

  message.channel.send({ embeds: });

Object Version

Now, let’s come to the object version. As we have told you before, the same rules apply here too just like MessageEmbed builder. Yes, this method looks a little complicated but if you check the output, both of them are the same!

  message.channel.send({ embeds: [{

    color: 3447003,

    author: {

      name: “Author Name, it can hold 256 characters”,

      icon_url: “https://i.imgur.com/lm8s41J.png”

    },

    thumbnail: {

      url: “http://i.imgur.com/p2qNFag.png”

    },

    image: {

      url: “http://i.imgur.com/yVpymuV.png”

    },

    title: “This is your title, it can hold 256 characters”,

    url: “https://discord.js.org/#/docs/main/master/class/MessageEmbed”,

    description: “This is the main body of text, it can hold 2048 characters.”,

    fields: [{

      name: “This is a single field title, it can hold 256 characters”,

      value: “This is a field value, it can hold 1024 characters.”,

      inline: false

    },

    {

      name: “Inline fields”,

      value: “They can have different fields with small headlines, and you can inline them.”,

      inline: true

    },

    {

      name: “Masked links”,

      value: “You can put [masked links](https://discord.js.org/#/docs/main/master/class/MessageEmbed) inside of rich embeds.”,

      inline: true

    },

    {

      name: “Markdown”,

      value: “You can put all the *usual* **__Markdown__** inside of them.”,

      inline: true

    },

    {

      name: “\u200b”,

      value:”\u200b”

    }],

    timestamp: new Date(),

    footer: {

      icon_url: “http://i.imgur.com/w1vhFSR.png”,

      text: “This is the footer text, it can hold 2048 characters”

    }

  }]});

Result

Both of them will bring up a result like this-

Result

Wrap Up

The process is easy- we won’t say that. But if you follow the rules, it isn’t too tough either. Make sure you are strict about the rules. Also, we have shown both the shortcut and object version methods. If you can, pick up the shortcut one because it looks better. But both of them give the same result anyway!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top