class ButtonBuilder
extends
ComponentBuilder<APIButtonComponent>export declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent>
A builder that creates API-compatible JSON data for buttons.
readonlyPartial<APIButtonComponent> data :
The API data associated with this component.
Inherited from: ComponentBuilder
setCustomIdcustomId: string) : this (
customId: string
Sets the custom id for this button.
setDisableddisabled?: boolean) : this (
disabled?: boolean
Sets whether this button is disabled.
setEmojiemoji: APIMessageComponentEmoji) : this (
emoji: APIMessageComponentEmoji
Sets the emoji to display on this button.
setLabellabel: string) : this (
label: string
Sets the label for this button.
setSKUIdskuId: Snowflake) : this (
skuId: Snowflake
Sets the SKU id that represents a purchasable SKU for this button.
setStylestyle: ButtonStyle) : this (
style: ButtonStyle
Sets the style of this button.
setURLurl: string) : this (
url: string
Sets the URL for this button.
toJSONAPIButtonComponent () :
Serializes this builder to API-compatible JSON data.