public class WebhookEmbed
extends java.lang.Object
implements org.json.JSONString
ReadonlyEmbed
used for sending. A webhook can send up to embeds
in a single message.WebhookEmbedBuilder| Modifier and Type | Class and Description |
|---|---|
static class |
WebhookEmbed.EmbedAuthor
POJO for an embed author.
|
static class |
WebhookEmbed.EmbedField
POJO for an embed field.
|
static class |
WebhookEmbed.EmbedFooter
POJO for an embed footer.
|
static class |
WebhookEmbed.EmbedTitle
POJO for an embed title.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_FIELDS
Max amount of fields an embed can hold (25)
|
| Constructor and Description |
|---|
WebhookEmbed(@Nullable java.time.OffsetDateTime timestamp,
@Nullable java.lang.Integer color,
@Nullable java.lang.String description,
@Nullable java.lang.String thumbnailUrl,
@Nullable java.lang.String imageUrl,
@Nullable WebhookEmbed.EmbedFooter footer,
@Nullable WebhookEmbed.EmbedTitle title,
@Nullable WebhookEmbed.EmbedAuthor author,
@NotNull java.util.List<WebhookEmbed.EmbedField> fields) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable WebhookEmbed.EmbedAuthor |
getAuthor()
The embed author.
|
@Nullable java.lang.Integer |
getColor()
The rgb color of this embed.
|
@Nullable java.lang.String |
getDescription()
The description of this embed
|
@NotNull java.util.List<WebhookEmbed.EmbedField> |
getFields()
List of fields for this embed.
|
@Nullable WebhookEmbed.EmbedFooter |
getFooter()
The footer of the embed.
|
@Nullable java.lang.String |
getImageUrl()
The image url
|
@Nullable java.lang.String |
getThumbnailUrl()
The thumbnail url
|
@Nullable java.time.OffsetDateTime |
getTimestamp()
The timestamp for the embed.
|
@Nullable WebhookEmbed.EmbedTitle |
getTitle()
The title of the embed, this is displayed
above the description and below the author.
|
@NotNull WebhookEmbed |
reduced()
Returns this embed instance, as its already reduced.
|
java.lang.String |
toJSONString() |
java.lang.String |
toString()
JSON representation of this embed
|
public static final int MAX_FIELDS
public WebhookEmbed(@Nullable
@Nullable java.time.OffsetDateTime timestamp,
@Nullable
@Nullable java.lang.Integer color,
@Nullable
@Nullable java.lang.String description,
@Nullable
@Nullable java.lang.String thumbnailUrl,
@Nullable
@Nullable java.lang.String imageUrl,
@Nullable
@Nullable WebhookEmbed.EmbedFooter footer,
@Nullable
@Nullable WebhookEmbed.EmbedTitle title,
@Nullable
@Nullable WebhookEmbed.EmbedAuthor author,
@NotNull
@NotNull java.util.List<WebhookEmbed.EmbedField> fields)
@Nullable @JSONPropertyIgnore public @Nullable java.lang.String getThumbnailUrl()
@Nullable @JSONPropertyIgnore public @Nullable java.lang.String getImageUrl()
@Nullable public @Nullable java.time.OffsetDateTime getTimestamp()
OffsetDateTime of the timestamp@Nullable @JSONPropertyIgnore public @Nullable WebhookEmbed.EmbedTitle getTitle()
WebhookEmbed.EmbedTitle@Nullable public @Nullable java.lang.Integer getColor()
@Nullable public @Nullable java.lang.String getDescription()
@Nullable public @Nullable WebhookEmbed.EmbedFooter getFooter()
WebhookEmbed.EmbedFooter@Nullable public @Nullable WebhookEmbed.EmbedAuthor getAuthor()
getTitle().WebhookEmbed.EmbedAuthor@NotNull public @NotNull java.util.List<WebhookEmbed.EmbedField> getFields()
@NotNull public @NotNull WebhookEmbed reduced()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toJSONString()
toJSONString in interface org.json.JSONString