EmbedBuilder

A builder for discord embeds.

Inline Markdown links are supported in in all description-like fields.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Link copied to clipboard
object Companion
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object Limits
Link copied to clipboard

Properties

Link copied to clipboard

The author of the embed.

Link copied to clipboard
var color: Color?

The color of the embed.

Link copied to clipboard

The description of the embed. Limited to the length of Limits.description.

Link copied to clipboard

The embed fields.

Link copied to clipboard

The footer of the embed.

Link copied to clipboard

The image url of the embed.

Link copied to clipboard

The thumbnail of the embed.

Link copied to clipboard

The timestamp displayed at the bottom of the embed.

Link copied to clipboard

The title of the embed. Limited to the length of Limits.title.

Link copied to clipboard
var url: String?

The url of the embed's title.

Functions

Link copied to clipboard
inline fun author(builder: EmbedBuilder.Author.() -> Unit)

Adds or updates the author as configured by the builder.

Link copied to clipboard
inline fun field(builder: EmbedBuilder.Field.() -> Unit)

Adds a new Field configured by the builder.

inline fun field(name: String, inline: Boolean = false, value: () -> String = { ZERO_WIDTH_SPACE })

Adds a new Field using the given name and value.

Link copied to clipboard
inline fun footer(builder: EmbedBuilder.Footer.() -> Unit)

Adds or updates the footer as configured by the builder.

Link copied to clipboard
inline fun thumbnail(builder: EmbedBuilder.Thumbnail.() -> Unit)

Adds or updates the thumbnail as configured by the builder.

Link copied to clipboard
open override fun toRequest(): EmbedRequest