Package com.aliucord.entities
Class MessageEmbedBuilder
-
- All Implemented Interfaces:
public class MessageEmbedBuilder
com.discord.api.message.embed.MessageEmbed builder
-
-
Constructor Summary
Constructors Constructor Description MessageEmbedBuilder()
Creates a rich embed MessageEmbedBuilder(EmbedType type)
Creates an embed with a specific type.
-
Method Summary
Modifier and Type Method Description MessageEmbed
build()
Builds the MessageEmbed MessageEmbedBuilder
setAuthor(String name)
MessageEmbedBuilder
setAuthor(String name, String iconUrl)
MessageEmbedBuilder
setAuthor(String name, String iconUrl, String proxyIconUrl)
MessageEmbedBuilder
setAuthor(EmbedAuthor author)
Sets the embed author. MessageEmbedBuilder
setRandomColor()
Sets a random embed color. MessageEmbedBuilder
setColor(Integer color)
Sets the embed color. MessageEmbedBuilder
setDescription(String description)
Sets the embed description. MessageEmbedBuilder
addField(String name, String value, boolean inline)
Adds a field to the embed. MessageEmbedBuilder
addField(EmbedField field)
Adds a field to the embed. MessageEmbedBuilder
setFields(List<EmbedField> fields)
Sets embed fields. MessageEmbedBuilder
setFooter(String text)
Sets the embed footer. MessageEmbedBuilder
setFooter(String text, String iconUrl)
Sets the embed footer. MessageEmbedBuilder
setFooter(String text, String iconUrl, String proxyIconUrl)
Sets the embed footer. MessageEmbedBuilder
setFooter(EmbedFooter footer)
Sets the embed footer. MessageEmbedBuilder
setImage(String imageUrl)
Sets the embed image. MessageEmbedBuilder
setImage(String imageUrl, String proxyImageUrl)
Sets the embed image. MessageEmbedBuilder
setImage(String imageUrl, String proxyImageUrl, Integer imageHeight, Integer imageWidth)
Sets the embed image. MessageEmbedBuilder
setImage(EmbedImage image)
Sets the embed image. MessageEmbedBuilder
setProvider(EmbedProvider provider)
Sets the embed provider. MessageEmbedBuilder
setThumbnail(String imageUrl)
Sets the embed thumbnail. MessageEmbedBuilder
setThumbnail(String imageUrl, String proxyImageUrl)
Sets the embed thumbnail. MessageEmbedBuilder
setThumbnail(String imageUrl, String proxyImageUrl, Integer imageHeight, Integer imageWidth)
Sets the embed thumbnail. MessageEmbedBuilder
setThumbnail(EmbedThumbnail image)
Sets the embed thumbnail. MessageEmbedBuilder
setTimestamp(UtcDateTime timestamp)
Sets the embed timestamp. MessageEmbedBuilder
setTitle(String title)
Sets the embed title. MessageEmbedBuilder
setType(EmbedType type)
Sets the embed type. MessageEmbedBuilder
setUrl(String url)
Sets the embed URL. MessageEmbedBuilder
setVideo(String videoUrl, String proxyVideoUrl, Integer height, Integer width)
Sets the embed video. MessageEmbedBuilder
setVideo(String videoUrl)
Sets the embed video. MessageEmbedBuilder
setVideo(String videoUrl, String proxyVideoUrl)
Sets the embed video. MessageEmbedBuilder
setVideo(EmbedVideo video)
Sets the embed video. static EmbedField
createField(String name, String value, Boolean inline)
-
-
Method Detail
-
build
MessageEmbed build()
Builds the MessageEmbed
-
setAuthor
MessageEmbedBuilder setAuthor(String name)
- Parameters:
name
- Name of the author.
-
setAuthor
MessageEmbedBuilder setAuthor(String name, String iconUrl)
- Parameters:
name
- Name of the author.iconUrl
- Icon URL of the author.
-
setAuthor
MessageEmbedBuilder setAuthor(String name, String iconUrl, String proxyIconUrl)
- Parameters:
name
- Name of the author.iconUrl
- Icon URL of the author.proxyIconUrl
- Proxy icon URL of the author.
-
setAuthor
MessageEmbedBuilder setAuthor(EmbedAuthor author)
Sets the embed author.
- Parameters:
author
- EmbedAuthor
-
setRandomColor
MessageEmbedBuilder setRandomColor()
Sets a random embed color.
-
setColor
MessageEmbedBuilder setColor(Integer color)
Sets the embed color.
- Parameters:
color
- Embed color.
-
setDescription
MessageEmbedBuilder setDescription(String description)
Sets the embed description.
- Parameters:
description
- Embed description.
-
addField
MessageEmbedBuilder addField(String name, String value, boolean inline)
Adds a field to the embed.
- Parameters:
name
- Name of the field.value
- Content of the field.inline
- Whether to inline the field or not.
-
addField
MessageEmbedBuilder addField(EmbedField field)
Adds a field to the embed.
- Parameters:
field
- EmbedField
-
setFields
MessageEmbedBuilder setFields(List<EmbedField> fields)
Sets embed fields.
- Parameters:
fields
- List of EmbedField
-
setFooter
MessageEmbedBuilder setFooter(String text)
Sets the embed footer.
- Parameters:
text
- Footer text.
-
setFooter
MessageEmbedBuilder setFooter(String text, String iconUrl)
Sets the embed footer.
- Parameters:
text
- Footer text.iconUrl
- Footer icon URL.
-
setFooter
MessageEmbedBuilder setFooter(String text, String iconUrl, String proxyIconUrl)
Sets the embed footer.
- Parameters:
text
- Footer text.iconUrl
- Footer icon URL.proxyIconUrl
- Footer Proxy icon URL.
-
setFooter
MessageEmbedBuilder setFooter(EmbedFooter footer)
Sets the embed footer.
- Parameters:
footer
- EmbedFooter
-
setImage
MessageEmbedBuilder setImage(String imageUrl)
Sets the embed image.
- Parameters:
imageUrl
- Image URL.
-
setImage
MessageEmbedBuilder setImage(String imageUrl, String proxyImageUrl)
Sets the embed image.
- Parameters:
imageUrl
- Image URL.proxyImageUrl
- Proxy image URL.
-
setImage
MessageEmbedBuilder setImage(String imageUrl, String proxyImageUrl, Integer imageHeight, Integer imageWidth)
Sets the embed image.
- Parameters:
imageUrl
- Image URL.proxyImageUrl
- Proxy image URL.imageHeight
- Image height.imageWidth
- Image width.
-
setImage
MessageEmbedBuilder setImage(EmbedImage image)
Sets the embed image.
- Parameters:
image
- EmbedImage
-
setProvider
MessageEmbedBuilder setProvider(EmbedProvider provider)
Sets the embed provider.
- Parameters:
provider
- EmbedProvider.
-
setThumbnail
MessageEmbedBuilder setThumbnail(String imageUrl)
Sets the embed thumbnail.
- Parameters:
imageUrl
- Image URL.
-
setThumbnail
MessageEmbedBuilder setThumbnail(String imageUrl, String proxyImageUrl)
Sets the embed thumbnail.
- Parameters:
imageUrl
- Image URL.proxyImageUrl
- Proxy image URL.
-
setThumbnail
MessageEmbedBuilder setThumbnail(String imageUrl, String proxyImageUrl, Integer imageHeight, Integer imageWidth)
Sets the embed thumbnail.
- Parameters:
imageUrl
- Image URL.proxyImageUrl
- Proxy image URL.imageHeight
- Image height.imageWidth
- Image width.
-
setThumbnail
MessageEmbedBuilder setThumbnail(EmbedThumbnail image)
Sets the embed thumbnail.
- Parameters:
image
- EmbedThumbnail
-
setTimestamp
MessageEmbedBuilder setTimestamp(UtcDateTime timestamp)
Sets the embed timestamp.
- Parameters:
timestamp
- UtcDateTime timestamp.
-
setTitle
MessageEmbedBuilder setTitle(String title)
Sets the embed title.
- Parameters:
title
- Embed title.
-
setType
MessageEmbedBuilder setType(EmbedType type)
Sets the embed type.
- Parameters:
type
- EmbedType.
-
setUrl
MessageEmbedBuilder setUrl(String url)
Sets the embed URL.
- Parameters:
url
- Embed URL.
-
setVideo
MessageEmbedBuilder setVideo(String videoUrl, String proxyVideoUrl, Integer height, Integer width)
Sets the embed video.
- Parameters:
videoUrl
- Video URL.
-
setVideo
MessageEmbedBuilder setVideo(String videoUrl)
Sets the embed video.
- Parameters:
videoUrl
- Video URL.
-
setVideo
MessageEmbedBuilder setVideo(String videoUrl, String proxyVideoUrl)
Sets the embed video.
- Parameters:
videoUrl
- Video URL.
-
setVideo
MessageEmbedBuilder setVideo(EmbedVideo video)
Sets the embed video.
- Parameters:
video
- EmbedVideo.
-
createField
static EmbedField createField(String name, String value, Boolean inline)
- Parameters:
name
- Field name.value
- Field content.inline
- Whether to inline the field or not.
-
-
-
-