class ThumbnailBuilder

declare class ThumbnailBuilder extends ComponentBuilder<APIThumbnailComponent>

Constructors

constructor()

Creates a new thumbnail from API data.

protectedreadonly
data : Partial<APIThumbnailComponent>

clearDescription() : this

Clears the description of this thumbnail.

clearId() : this

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

Inherited from: ComponentBuilder

setDescription(
description: string
) : this

Sets the description of this thumbnail.

setId(
id: number
) : this

Sets the id of this component.

Inherited from: ComponentBuilder

setSpoiler(
spoiler?: boolean
) : this

Sets the spoiler status of this thumbnail.

setURL(
url: string
) : this

Sets the media URL of this thumbnail.

toJSON(
validationOverride?: boolean
) : APIThumbnailComponent

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.