Thumbnail
Implementation of discords Thumbnail object as a Luau builder.
https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure
Summary
Properties
Thumbnail.url :: stringThumbnail.proxyUrl :: string?Thumbnail.height :: number?Thumbnail.width :: number?Properties
Section titled “Properties”The source url of the thumbnail.
proxyUrl
Section titled “proxyUrl”A proxied url of the thumbnail.
height
Section titled “height”The height of the thumbnail.
The width of the thumbnail.
Methods
Section titled “Methods”setUrl
Section titled “setUrl”Thumbnail : setUrl ( url , proxyUrl ) -> Thumbnail
Set the image url for this embed.
setHeight
Section titled “setHeight”Thumbnail : setHeight ( height ) -> Thumbnail
Set the image height for this embed.
Parameters
| height: number |
Returns
| Thumbnail |
setWidth
Section titled “setWidth”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 |
Functions
Section titled “Functions”Thumbnail . new ( resource ) -> Thumbnail
Responsible for creating a new Thumbnail.
local thumbnail = Thumbnail.new({ url = "https://example.com/image.png", height = 100, width = 100})