Class Embed

    • Field Detail

      • MAX_TITLE_LENGTH

        public static final int MAX_TITLE_LENGTH
        The maximum amount of characters that can be in an embed title.
        See Also:
        Constant Field Values
      • MAX_DESCRIPTION_LENGTH

        public static final int MAX_DESCRIPTION_LENGTH
        The maximum amount of characters that can be in an embed description.
        See Also:
        Constant Field Values
      • MAX_FIELDS

        public static final int MAX_FIELDS
        The maximum amount of fields that can be appended to an embed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Embed

        public Embed​(GatewayDiscordClient gateway,
                     discord4j.discordjson.json.EmbedData data)
        Constructs an Embed with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient associated to this object, must be non-null.
        data - The raw data as represented by Discord, must be non-null.
    • Method Detail

      • getData

        public discord4j.discordjson.json.EmbedData getData()
        Gets the data of the embed.
        Returns:
        The data of the embed.
      • getTitle

        public Optional<String> getTitle()
        Gets the title of the embed, if present.
        Returns:
        The title of the embed, if present.
      • getType

        public Embed.Type getType()
        Gets the type of embed, if present.
        Returns:
        The type of embed, if present.
      • getDescription

        public Optional<String> getDescription()
        Gets the description of the embed, if present.
        Returns:
        The description of the embed, if present.
      • getUrl

        public Optional<String> getUrl()
        Gets the URL of the embed, if present.
        Returns:
        The URL of the embed, if present.
      • getTimestamp

        public Optional<Instant> getTimestamp()
        Gets the timestamp of the embed content, if present.
        Returns:
        The timestamp of the embed content, if present.
      • getColor

        public Optional<Color> getColor()
        Gets the color of the embed, if present.
        Returns:
        The color of the embed, if present.
      • getFooter

        public Optional<Embed.Footer> getFooter()
        Gets the footer information, if present.
        Returns:
        The footer information, if present.
      • getImage

        public Optional<Embed.Image> getImage()
        Gets the image information, if present.
        Returns:
        The image information, if present.
      • getThumbnail

        public Optional<Embed.Thumbnail> getThumbnail()
        Gets the thumbnail information, if present.
        Returns:
        The thumbnail information, if present.
      • getVideo

        public Optional<Embed.Video> getVideo()
        Gets the video information, if present.
        Returns:
        The video information, if present.
      • getProvider

        public Optional<Embed.Provider> getProvider()
        Gets the provider information, if present.
        Returns:
        The provider information, if present.
      • getAuthor

        public Optional<Embed.Author> getAuthor()
        Gets the author information, if present.
        Returns:
        The author information, if present.
      • getFields

        public List<Embed.Field> getFields()
        Gets the field information.
        Returns:
        The field information.