public class EmbedCreateSpec extends Object implements Spec<EmbedRequest>
Constructor and Description |
---|
EmbedCreateSpec() |
Modifier and Type | Method and Description |
---|---|
EmbedCreateSpec |
addField(String name,
String value,
boolean inline)
Adds a field to the embed.
|
EmbedRequest |
asRequest() |
EmbedCreateSpec |
setAuthor(String name,
String url,
String iconUrl)
Sets the author section of the embed.
|
EmbedCreateSpec |
setColor(Color color)
Sets the color of the embed.
|
EmbedCreateSpec |
setDescription(String description)
Sets the description of the embed.
|
EmbedCreateSpec |
setFooter(String text,
String iconUrl)
Sets the footer of the embed.
|
EmbedCreateSpec |
setImage(String url)
Sets the image of the embed.
|
EmbedCreateSpec |
setThumbnail(String url)
Sets the thumbnail of the embed.
|
EmbedCreateSpec |
setTimestamp(Instant timestamp)
Sets the timestamp to display in the embed.
|
EmbedCreateSpec |
setTitle(String title)
Sets the title of the embed.
|
EmbedCreateSpec |
setUrl(String url)
Sets the URL of the embed.
|
public EmbedCreateSpec setTitle(String title)
title
- The title of the embed.public EmbedCreateSpec setDescription(String description)
description
- The description of the embed.public EmbedCreateSpec setUrl(String url)
url
- A URL which can be clicked on through the title of the embed.public EmbedCreateSpec setTimestamp(Instant timestamp)
timestamp
- A Instant
to display in the embed footer.public EmbedCreateSpec setColor(Color color)
color
- A Color
to display on the embed.public EmbedCreateSpec setFooter(String text, @Nullable String iconUrl)
text
- The footer text.iconUrl
- An icon URL to display in the footer.public EmbedCreateSpec setImage(String url)
url
- An image URL.public EmbedCreateSpec setThumbnail(String url)
url
- An image URL.public EmbedCreateSpec setAuthor(String name, @Nullable String url, @Nullable String iconUrl)
name
- The author name to display.url
- A URL which can be clicked on through the author name.iconUrl
- An icon URL displayed as the avatar next to the author name.public EmbedCreateSpec addField(String name, String value, boolean inline)
name
- The name of the field.value
- The text inside of the field.inline
- Whether to inline the field or not.public EmbedRequest asRequest()
asRequest
in interface Spec<EmbedRequest>