Class WebhookEmbed.EmbedField

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

    public static class WebhookEmbed.EmbedField
    extends Object
    implements org.json.JSONString
    POJO for an embed field.
    An embed can have up to 25 fields. A row of fields can be up 3 wide, or 2 when a thumbnail is configured. To be displayed in the same row as other fields, the field has to be set to inline.
    • Method Detail

      • isInline

        public boolean isInline()
        Whether this field should share a row with other fields
        Returns:
        True, if this should be in the same row as other fields
      • getName

        @NotNull
        public @NotNull String getName()
        The name of this field.
        This is displayed above the value in a bold font.
        Returns:
        The name
      • getValue

        @NotNull
        public @NotNull String getValue()
        The value of this field.
        This is displayed below the name in a regular font.
        Returns:
        The value
      • toString

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

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