public class ReadonlyEmbed extends WebhookEmbed
WebhookEmbed
with additional meta-data on receivable embeds.| Modifier and Type | Class and Description |
|---|---|
static class |
ReadonlyEmbed.EmbedImage
POJO containing meta-data about an embed image component
|
static class |
ReadonlyEmbed.EmbedProvider
POJO containing meta-data for an embed provider
|
static class |
ReadonlyEmbed.EmbedVideo
POJO containing meta-data about an embed video
|
WebhookEmbed.EmbedAuthor, WebhookEmbed.EmbedField, WebhookEmbed.EmbedFooter, WebhookEmbed.EmbedTitleMAX_FIELDS| Constructor and Description |
|---|
ReadonlyEmbed(@Nullable java.time.OffsetDateTime timestamp,
@Nullable java.lang.Integer color,
@Nullable java.lang.String description,
@Nullable ReadonlyEmbed.EmbedImage thumbnail,
@Nullable ReadonlyEmbed.EmbedImage image,
@Nullable WebhookEmbed.EmbedFooter footer,
@Nullable WebhookEmbed.EmbedTitle title,
@Nullable WebhookEmbed.EmbedAuthor author,
@NotNull java.util.List<WebhookEmbed.EmbedField> fields,
@Nullable ReadonlyEmbed.EmbedProvider provider,
@Nullable ReadonlyEmbed.EmbedVideo video) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable ReadonlyEmbed.EmbedImage |
getImage()
The image of this embed.
|
@Nullable ReadonlyEmbed.EmbedProvider |
getProvider()
The
ReadonlyEmbed.EmbedProvider
Used for services that are automatically embedded by discord when posting a link, this includes services like youtube or twitter. |
@Nullable ReadonlyEmbed.EmbedImage |
getThumbnail()
The thumbnail of this embed.
|
@Nullable ReadonlyEmbed.EmbedVideo |
getVideo()
The video of this embed.
|
@NotNull WebhookEmbed |
reduced()
Reduces this embed to a simpler
WebhookEmbed
instance that can be used for sending, this is done implicitly
when trying to send an instance of a readonly-embed. |
java.lang.String |
toJSONString() |
java.lang.String |
toString()
JSON representation of this embed.
|
getAuthor, getColor, getDescription, getFields, getFooter, getImageUrl, getThumbnailUrl, getTimestamp, getTitlepublic ReadonlyEmbed(@Nullable
@Nullable java.time.OffsetDateTime timestamp,
@Nullable
@Nullable java.lang.Integer color,
@Nullable
@Nullable java.lang.String description,
@Nullable
@Nullable ReadonlyEmbed.EmbedImage thumbnail,
@Nullable
@Nullable ReadonlyEmbed.EmbedImage image,
@Nullable
@Nullable WebhookEmbed.EmbedFooter footer,
@Nullable
@Nullable WebhookEmbed.EmbedTitle title,
@Nullable
@Nullable WebhookEmbed.EmbedAuthor author,
@NotNull
@NotNull java.util.List<WebhookEmbed.EmbedField> fields,
@Nullable
@Nullable ReadonlyEmbed.EmbedProvider provider,
@Nullable
@Nullable ReadonlyEmbed.EmbedVideo video)
@Nullable public @Nullable ReadonlyEmbed.EmbedProvider getProvider()
ReadonlyEmbed.EmbedProvider
@Nullable public @Nullable ReadonlyEmbed.EmbedImage getThumbnail()
ReadonlyEmbed.EmbedImage for the thumbnail@Nullable public @Nullable ReadonlyEmbed.EmbedImage getImage()
ReadonlyEmbed.EmbedImage for the image@Nullable public @Nullable ReadonlyEmbed.EmbedVideo getVideo()
ReadonlyEmbed.EmbedVideo@NotNull public @NotNull WebhookEmbed reduced()
WebhookEmbed
instance that can be used for sending, this is done implicitly
when trying to send an instance of a readonly-embed.reduced in class WebhookEmbedpublic java.lang.String toString()
toString in class WebhookEmbedpublic java.lang.String toJSONString()
toJSONString in interface org.json.JSONStringtoJSONString in class WebhookEmbed