EmbedBuilder

class EmbedBuilder : SpecBuilder<EmbedCreateSpec>

Types

EmbedAuthor
Link copied to clipboard
class EmbedAuthor

Embed author field builder

EmbedField
Link copied to clipboard
class EmbedField
EmbedFooter
Link copied to clipboard
class EmbedFooter

Functions

author
Link copied to clipboard
fun author(authorSpec: EmbedBuilder.EmbedAuthor.() -> Unit)
fun author(name: String, url: String? = null, iconUrl: String? = null)

Sets the author for this embed.

build
Link copied to clipboard
open override fun build(): EmbedCreateSpec

Create the spec from this builder.

color
Link copied to clipboard
fun color(color: Color)

Sets the color for this embed.

description
Link copied to clipboard
fun description(description: String)

Sets the description for this embed.

field
Link copied to clipboard
fun field(fieldSpec: EmbedBuilder.EmbedField.() -> Unit)
fun field(name: String, value: String, inline: Boolean = false)

Adds a field to this embed.

footer
Link copied to clipboard
fun footer(footerSpec: EmbedBuilder.EmbedFooter.() -> Unit)
fun footer(text: String, icon: String? = null)

Sets the footer for this embed.

image
Link copied to clipboard
fun image(url: String)

Sets the image for this embed.

thumbnail
Link copied to clipboard
fun thumbnail(url: String)

Sets the thumbnail for this embed.

timestamp
Link copied to clipboard
fun timestamp(timestamp: Instant)

Sets the timestamp for this embed.

title
Link copied to clipboard
fun title(title: String)

Sets the title for this embed.

url
Link copied to clipboard
fun url(url: String)

Sets the url for this embed.

Properties

color
Link copied to clipboard
var color: Color

The color for this embed.

description
Link copied to clipboard
var description: String

The description for this embed.

image
Link copied to clipboard
var image: String

The image url for this embed.

imageUrl
Link copied to clipboard
var imageUrl: String
thumbnail
Link copied to clipboard
var thumbnail: String

The thumbnail url for this embed.

thumbnailUrl
Link copied to clipboard
var thumbnailUrl: String
timestamp
Link copied to clipboard
var timestamp: Instant

The timestamp for this embed.

title
Link copied to clipboard
var title: String

The title for this embed.

url
Link copied to clipboard
var url: String

The url for this embed.

Sources

jvm source
Link copied to clipboard