Skip to content

Thumbnail

Implementation of discords Thumbnail object as a Luau builder.

https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure

Thumbnail.url  :: string

The source url of the thumbnail.

Thumbnail.proxyUrl  :: string?

A proxied url of the thumbnail.

Thumbnail.height  :: number?

The height of the thumbnail.

Thumbnail.width  :: number?

The width of the thumbnail.

Thumbnail : setUrl ( url proxyUrl )  -> Thumbnail

Set the image url for this embed.

Parameters

url: string
proxyUrl: string?

Returns

Thumbnail
Thumbnail : setHeight ( height )  -> Thumbnail

Set the image height for this embed.

Parameters

height: number

Returns

Thumbnail
Thumbnail : setWidth ( width )  -> Thumbnail

Set the image width for this embed.

Parameters

width: number

Returns

Thumbnail
Thumbnail : build ( )  -> JSON

Responsible for building the Thumbnail JSON that can be parsed by the Discord API.

Returns

JSON
Thumbnail . new ( resource )  -> Thumbnail

Responsible for creating a new Thumbnail.

local thumbnail = Thumbnail.new({
url = "https://example.com/image.png",
height = 100,
width = 100
})

Parameters

resource: {
url: string,
proxyUrl: string?,
height: number?,
width: number?,
}

Returns

Thumbnail