public interface MessageEmbed
Modifier and Type | Interface and Description |
---|---|
static class |
MessageEmbed.AuthorInfo
Class that represents the author of content, possibly including an icon
that Discord proxies.
|
static class |
MessageEmbed.Field
Represents a field in an embed.
|
static class |
MessageEmbed.Footer
Class that represents a footer at the bottom of an embed
|
static class |
MessageEmbed.ImageInfo
Represents the information provided to embed an image.
|
static class |
MessageEmbed.Provider
Multipurpose class that represents a provider of content,
whether directly through creation or indirectly through hosting.
|
static class |
MessageEmbed.Thumbnail
Represents the information Discord provided about a thumbnail image that should be
displayed with an embed message.
|
static class |
MessageEmbed.VideoInfo
Represents the information provided to embed a video.
|
Modifier and Type | Field and Description |
---|---|
static int |
EMBED_MAX_LENGTH_BOT |
static int |
EMBED_MAX_LENGTH_CLIENT |
static int |
TEXT_MAX_LENGTH |
static int |
TITLE_MAX_LENGTH |
static int |
URL_MAX_LENGTH |
static int |
VALUE_MAX_LENGTH |
Modifier and Type | Method and Description |
---|---|
MessageEmbed.AuthorInfo |
getAuthor()
The information on the creator of the embedded content.
|
java.awt.Color |
getColor()
The color of the stripe on the side of the embed.
|
java.lang.String |
getDescription()
The description of the embedded resource.
|
java.util.List<MessageEmbed.Field> |
getFields()
The fields in a message embed.
|
MessageEmbed.Footer |
getFooter()
The footer (bottom) of the embedded content.
|
MessageEmbed.ImageInfo |
getImage()
The information about the image in the message embed
|
int |
getLength()
The total amount of characters that is displayed when this embed is displayed by the Discord client.
|
MessageEmbed.Provider |
getSiteProvider()
The information on site from which the embed was generated from.
|
MessageEmbed.Thumbnail |
getThumbnail()
The information about the
Thumbnail image to be displayed with the embed. |
java.time.OffsetDateTime |
getTimestamp()
The timestamp of the embed.
|
java.lang.String |
getTitle()
The title of the embed.
|
EmbedType |
getType()
The
EmbedType of this embed. |
java.lang.String |
getUrl()
The that was originally placed into chat that spawned this embed.
|
MessageEmbed.VideoInfo |
getVideoInfo()
The information about the video which should be displayed as an embed.
|
default boolean |
isSendable(AccountType type)
Whether this MessageEmbed can be used in a message.
|
static final int TITLE_MAX_LENGTH
static final int VALUE_MAX_LENGTH
static final int TEXT_MAX_LENGTH
static final int URL_MAX_LENGTH
static final int EMBED_MAX_LENGTH_BOT
static final int EMBED_MAX_LENGTH_CLIENT
java.lang.String getUrl()
java.lang.String getTitle()
EmbedType
= IMAGE
,
this method will return null.java.lang.String getDescription()
MessageEmbed.Thumbnail getThumbnail()
Thumbnail
image to be displayed with the embed.
Thumbnail
was not part of this embed, this returns null.Thumbnail
instance
containing general information on the displayable thumbnail.MessageEmbed.Provider getSiteProvider()
Provider
containing site information.MessageEmbed.AuthorInfo getAuthor()
AuthorInfo
containing author information.MessageEmbed.VideoInfo getVideoInfo()
EmbedType
!= VIDEO
this will always return null.VideoInfo
containing the information about the video which should be embedded.MessageEmbed.Footer getFooter()
Footer
containing the embed footer content.MessageEmbed.ImageInfo getImage()
ImageInfo
containing image information.java.util.List<MessageEmbed.Field> getFields()
Field
objects
containing field information.java.awt.Color getColor()
java.time.OffsetDateTime getTimestamp()
int getLength()
An Embed can only have, at max, 4000 displayable text characters for AccountType.BOT
accounts or 2000 displayable text characters for AccountType.CLIENT
accounts.
Both of these values are defined by EMBED_MAX_LENGTH_BOT
and
EMBED_MAX_LENGTH_CLIENT
respectively.
default boolean isSendable(AccountType type)
Bot
- and Client Accounts
Total Character Limits
type
- The AccountType
to inspectjava.lang.IllegalArgumentException
- If the provided AccountType is null
or not supported by this operationgetLength()