MessageEmbedBuilder

com.discord.api.message.embed.MessageEmbed builder

Constructors

Link copied to clipboard
constructor()
Creates a rich embed
constructor(type: EmbedType)
Creates an embed with a specific type.

Functions

Link copied to clipboard
open fun addField(field: EmbedField): MessageEmbedBuilder
open fun addField(name: String, value: String, inline: Boolean): MessageEmbedBuilder
Adds a field to the embed.
Link copied to clipboard
open fun build(): MessageEmbed
Builds the MessageEmbed
Link copied to clipboard
open fun createField(name: String, value: String, inline: Boolean): EmbedField
Link copied to clipboard
open fun setAuthor(author: EmbedAuthor): MessageEmbedBuilder
Sets the embed author.
open fun setAuthor(name: String, iconUrl: String): MessageEmbedBuilder
open fun setAuthor(name: String, iconUrl: String, proxyIconUrl: String): MessageEmbedBuilder
Link copied to clipboard
Sets the embed color.
Link copied to clipboard
open fun setDescription(description: String): MessageEmbedBuilder
Sets the embed description.
Link copied to clipboard
open fun setFields(fields: List<EmbedField>): MessageEmbedBuilder
Sets embed fields.
Link copied to clipboard
open fun setFooter(footer: EmbedFooter): MessageEmbedBuilder
open fun setFooter(text: String, iconUrl: String): MessageEmbedBuilder
open fun setFooter(text: String, iconUrl: String, proxyIconUrl: String): MessageEmbedBuilder
Sets the embed footer.
Link copied to clipboard
open fun setImage(image: EmbedImage): MessageEmbedBuilder
open fun setImage(imageUrl: String): MessageEmbedBuilder
open fun setImage(imageUrl: String, proxyImageUrl: String): MessageEmbedBuilder
open fun setImage(imageUrl: String, proxyImageUrl: String, imageHeight: Integer, imageWidth: Integer): MessageEmbedBuilder
Sets the embed image.
Link copied to clipboard
open fun setProvider(provider: EmbedProvider): MessageEmbedBuilder
Sets the embed provider.
Link copied to clipboard
Sets a random embed color.
Link copied to clipboard
open fun setThumbnail(image: EmbedThumbnail): MessageEmbedBuilder
open fun setThumbnail(imageUrl: String, proxyImageUrl: String): MessageEmbedBuilder
open fun setThumbnail(imageUrl: String, proxyImageUrl: String, imageHeight: Integer, imageWidth: Integer): MessageEmbedBuilder
Sets the embed thumbnail.
Link copied to clipboard
open fun setTimestamp(timestamp: UtcDateTime): MessageEmbedBuilder
Sets the embed timestamp.
Link copied to clipboard
Sets the embed title.
Link copied to clipboard
open fun setType(type: EmbedType): MessageEmbedBuilder
Sets the embed type.
Link copied to clipboard
Sets the embed URL.
Link copied to clipboard
open fun setVideo(video: EmbedVideo): MessageEmbedBuilder
open fun setVideo(videoUrl: String): MessageEmbedBuilder
open fun setVideo(videoUrl: String, proxyVideoUrl: String): MessageEmbedBuilder
open fun setVideo(videoUrl: String, proxyVideoUrl: String, height: Integer, width: Integer): MessageEmbedBuilder
Sets the embed video.