public final class Embed extends Object implements DiscordObject
Modifier and Type | Class and Description |
---|---|
class |
Embed.Author
An image for a Discord
embed . |
class |
Embed.Field
A field for a Discord
embed . |
class |
Embed.Footer
A footer for a Discord
embed . |
class |
Embed.Image
An image for a Discord
embed . |
class |
Embed.Provider
A provider for a Discord
embed . |
class |
Embed.Thumbnail
A thumbnail for a Discord
embed . |
static class |
Embed.Type
Represents the various types of embeds.
|
class |
Embed.Video
A video for a Discord
embed . |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_CHARACTER_LENGTH
The maximum amount of total characters that can be present in an embed.
|
static int |
MAX_DESCRIPTION_LENGTH
The maximum amount of characters that can be in an embed description.
|
static int |
MAX_FIELDS
The maximum amount of fields that can be appended to an embed.
|
static int |
MAX_TITLE_LENGTH
The maximum amount of characters that can be in an embed title.
|
Constructor and Description |
---|
Embed(ServiceMediator serviceMediator,
EmbedBean data)
Constructs an
Embed with an associated ServiceMediator and Discord data. |
Modifier and Type | Method and Description |
---|---|
Optional<Embed.Author> |
getAuthor()
Gets the author information, if present.
|
DiscordClient |
getClient()
Gets the DiscordClient associated to this object.
|
Optional<Color> |
getColor()
Gets the color of the embed, if present.
|
Optional<String> |
getDescription()
Gets the description of the embed, if present.
|
List<Embed.Field> |
getFields()
Gets the field information.
|
Optional<Embed.Footer> |
getFooter()
Gets the footer information, if present.
|
Optional<Embed.Image> |
getImage()
Gets the image information, if present.
|
Optional<Embed.Provider> |
getProvider()
Gets the provider information, if present.
|
Optional<Embed.Thumbnail> |
getThumbnail()
Gets the thumbnail information, if present.
|
Optional<Instant> |
getTimestamp()
Gets the timestamp of the embed content, if present.
|
Optional<String> |
getTitle()
Gets the title of the embed, if present.
|
Embed.Type |
getType()
Gets the type of embed, if present.
|
Optional<String> |
getUrl()
Gets the URL of the embed, if present.
|
Optional<Embed.Video> |
getVideo()
Gets the video information, if present.
|
String |
toString() |
public static final int MAX_TITLE_LENGTH
public static final int MAX_DESCRIPTION_LENGTH
public static final int MAX_FIELDS
public static final int MAX_CHARACTER_LENGTH
public Embed(ServiceMediator serviceMediator, EmbedBean data)
Embed
with an associated ServiceMediator and Discord data.serviceMediator
- The ServiceMediator associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.public DiscordClient getClient()
DiscordObject
getClient
in interface DiscordObject
public Optional<String> getTitle()
public Embed.Type getType()
public Optional<String> getDescription()
public Optional<String> getUrl()
public Optional<Instant> getTimestamp()
public Optional<Color> getColor()
public Optional<Embed.Footer> getFooter()
public Optional<Embed.Image> getImage()
public Optional<Embed.Thumbnail> getThumbnail()
public Optional<Embed.Video> getVideo()
public Optional<Embed.Provider> getProvider()
public Optional<Embed.Author> getAuthor()
public List<Embed.Field> getFields()