class ButtonBuilder
extends
ComponentBuilder<APIButtonComponent>export declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent>A builder that creates API-compatible JSON data for buttons.
readonlydata : Partial<APIButtonComponent>
The API data associated with this component.
Inherited from: ComponentBuilder
Clears the id of this component, defaulting to a default incremented id.
Inherited from: ComponentBuilder
setCustomId(customId: string) : this
customId: string
Sets the custom id for this button.
setDisabled(disabled?: boolean) : this
disabled?: boolean
Sets whether this button is disabled.
setEmoji(emoji: APIMessageComponentEmoji) : this
emoji: APIMessageComponentEmoji
Sets the emoji to display on this button.
setId(id: number) : this
id: number
Sets the id (not the custom id) for this component.
Inherited from: ComponentBuilder
setLabel(label: string) : this
label: string
Sets the label for this button.
setSKUId(skuId: Snowflake) : this
skuId: Snowflake
Sets the SKU id that represents a purchasable SKU for this button.
setStyle(style: ButtonStyle) : this
style: ButtonStyle
Sets the style of this button.
setURL(url: string) : this
url: string
Sets the URL for this button.
toJSON() : APIButtonComponent
Serializes this builder to API-compatible JSON data.