class ThumbnailBuilder
extends
ComponentBuilder<APIThumbnailComponent>export declare class ThumbnailBuilder extends ComponentBuilder<APIThumbnailComponent>A builder that creates API-compatible JSON data for thumbnails.
Constructors
constructor(data?: Partial<APIThumbnailComponent>)
data?: Partial<APIThumbnailComponent>
Creates a new thumbnail.
Examples:Creating a thumbnail from an API data object:Creating a thumbnail using setters and API data:
const thumbnail = new ThumbnailBuilder({
	description: 'some text',
 media: {
     url: 'https://cdn.discordapp.com/embed/avatars/4.png',
 },
});const thumbnail = new ThumbnailBuilder({
	media: {
     url: 'attachment://image.png',
 },
})
	.setDescription('alt text');Clears the id of this component, defaulting to a default incremented id.
Inherited from: ComponentBuilder
 setDescription(description: string) : this
description: string
Sets the description of this thumbnail.
 setSpoiler(spoiler?: boolean) : this
spoiler?: boolean
Sets the spoiler status of this thumbnail.
 setURL(url: string) : this
url: string
Sets the media URL of this thumbnail.
 toJSON(validationOverride?: boolean) : APIThumbnailComponent
validationOverride?: boolean
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.