java.lang.Object
net.joseplay.allianceutils.api.discord.webhook.WebHookEmbed

public class WebHookEmbed extends Object
Represents a Discord webhook embed object. Uses a fluent builder-style API for easier construction.
  • Constructor Details

    • WebHookEmbed

      public WebHookEmbed()
  • Method Details

    • setAuthor

      public WebHookEmbed setAuthor(String name, String iconUrl, String url)
      Sets the embed author.
      Parameters:
      name - Author name
      iconUrl - Author icon URL
      url - Author link URL
    • setTitle

      public WebHookEmbed setTitle(String title)
      Sets the embed title.
    • setDescription

      public WebHookEmbed setDescription(String description)
      Sets the embed description.
    • setColor

      public WebHookEmbed setColor(int color)
      Sets the embed color (decimal format, e.g., 0xFF0000).
    • setFooter

      public WebHookEmbed setFooter(String text, String iconUrl)
      Sets the embed footer.
    • setThumbnail

      public WebHookEmbed setThumbnail(String url)
      Sets the embed thumbnail image.
    • setImage

      public WebHookEmbed setImage(String url)
      Sets the embed main image.
    • setTimestamp

      public WebHookEmbed setTimestamp(Instant instant)
      Sets the embed timestamp using ISO-8601 format.
    • addField

      public WebHookEmbed addField(String name, String value, boolean inline)
      Adds a field to the embed.
      Parameters:
      name - Field title
      value - Field content
      inline - Whether the field is inline