class ThumbnailBuilder

external
declare class ThumbnailBuilder extends ComponentBuilder<APIThumbnailComponent>

Constructors

constructor()

Creates a new thumbnail from API data.

Examples:Creating a thumbnail from an API data object:
const thumbnaik = new ThumbnailBuilder({
	description: 'some text',
 media: {
     url: 'https://cdn.discordapp.com/embed/avatars/4.png',
 },
});
Creating a thumbnail using setters and API data:
const thumbnail = new ThumbnailBuilder({
	media: {
     url: 'attachment://image.png',
 },
})
	.setDescription('alt text');

readonlyexternal
data : Partial<APIThumbnailComponent>

The API data associated with this component.

Inherited from: ComponentBuilder

external
clearDescription() : this

Clears the description of this thumbnail.

external
clearId() : this

Clears the id of this component, defaulting to a default incremented id.

Inherited from: ComponentBuilder

external
setDescription(
description: string
) : this

Sets the description of this thumbnail.

external
setId(
id: number
) : this

Sets the id (not the custom id) for this component.

Inherited from: ComponentBuilder

external
setSpoiler(
spoiler?: boolean
) : this

Sets the spoiler status of this thumbnail.

external
setURL(
url: string
) : this

Sets the media URL of this thumbnail.

external
toJSON() : APIThumbnailComponent

Serializes this builder to API-compatible JSON data.