Thumbnail

fun Thumbnail(url: String, uniqueId: Int = -1, description: String? = null, spoiler: Boolean = false, block: InlineThumbnail.() -> Unit = {}): Thumbnail(source)

See Thumbnail.fromUrl.

This requires Components V2 to be enabled.

Parameters

url

The URL of the image to display

uniqueId

Unique identifier of this component

description

Known as an "alternative text", must not exceed MAX_DESCRIPTION_LENGTH characters

spoiler

Hides the thumbnail until the user clicks on it

block

Lambda allowing further configuration


fun Thumbnail(file: FileUpload, uniqueId: Int = -1, description: String? = null, spoiler: Boolean = false, block: InlineThumbnail.() -> Unit = {}): Thumbnail(source)

See Thumbnail.fromFile.

This requires Components V2 to be enabled.

Parameters

file

The image to display

uniqueId

Unique identifier of this component

description

Known as an "alternative text", must not exceed MAX_DESCRIPTION_LENGTH characters.

spoiler

Hides the thumbnail until the user clicks on it

block

Lambda allowing further configuration