Class WebhookEmbed.EmbedAuthor

  • All Implemented Interfaces:
    org.json.JSONString
    Enclosing class:
    WebhookEmbed

    public static class WebhookEmbed.EmbedAuthor
    extends Object
    implements org.json.JSONString
    POJO for an embed author.
    This can contain an icon (avatar), a name, and a url. Often useful for posts from other platforms such as twitter/github.
    • Method Detail

      • getName

        @NotNull
        public @NotNull String getName()
        The name of the author, this is the only visible text of this component.
        Returns:
        The name
      • getIconUrl

        @Nullable
        @JSONPropertyName("icon_url")
        public @Nullable String getIconUrl()
        The iconUrl of this author.
        This is displayed left to the name, similar to messages in discord.
        Returns:
        Possibly-null iconUrl url
      • getUrl

        @Nullable
        public @Nullable String getUrl()
        The url of this author.
        This can be used to highlight the name as a hyperlink to the platform's profile service.
        Returns:
        Possibly-null url
      • toString

        public String toString()
        JSON representation of this author
        Overrides:
        toString in class Object
        Returns:
        The JSON representation
      • toJSONString

        public String toJSONString()
        Specified by:
        toJSONString in interface org.json.JSONString