ComponentThumbnail
Implementation of Discord’s Thumbnail component as a Luau builder. This is a Components V2 layout component, distinct from the embed thumbnail.
https://discord.com/developers/docs/components/reference#thumbnail
Summary
Properties
ComponentThumbnail.url :: string?ComponentThumbnail.description :: string?ComponentThumbnail.spoiler :: boolean?Properties
Section titled “Properties”The URL of the media to display. Use attachment://filename for uploaded files.
description
Section titled “description”Alt text for the thumbnail image.
spoiler
Section titled “spoiler”Whether the thumbnail is blurred as a spoiler.
Methods
Section titled “Methods”setUrl
Section titled “setUrl”ComponentThumbnail : setUrl ( url ) -> ComponentThumbnail
Sets the media URL for the thumbnail.
Parameters
| url: string |
Returns
| ComponentThumbnail |
setDescription
Section titled “setDescription”ComponentThumbnail : setDescription ( description ) -> ComponentThumbnail
Sets the alt text description for the thumbnail.
Parameters
| description: string |
Returns
| ComponentThumbnail |
setSpoiler
Section titled “setSpoiler”ComponentThumbnail : setSpoiler ( spoiler ) -> ComponentThumbnail
Sets whether the thumbnail is blurred as a spoiler.
Parameters
| spoiler: boolean |
Returns
| ComponentThumbnail |
ComponentThumbnail : build ( ) -> JSON
Responsible for building the ComponentThumbnail JSON that can be parsed by the Discord API.
Returns
| JSON |
Functions
Section titled “Functions”ComponentThumbnail . new ( resource ) -> ComponentThumbnail
Responsible for creating a new ComponentThumbnail.