ButtonBuilder

export declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent>
export declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent>
Represents a button component
constructor(data?)
Constructs a new instance of the ButtonBuilder class
NameTypeOptionalDescription
dataPartial<APIButtonComponent>YesNone
Readonly
data:Partial<DataType>
The API data associated with this component
Inherited from ComponentBuilder
setCustomId(customId):this
Sets the custom id for this button
NameTypeOptionalDescription
customIdstringNoThe custom id to use for this button
setDisabled(disabled?):this
Sets whether this button is disabled
NameTypeOptionalDescription
disabledbooleanYesWhether to disable this button
setEmoji(emoji):this
Sets the emoji to display on this button
NameTypeOptionalDescription
emojiAPIMessageComponentEmojiNoThe emoji to display on this button
setLabel(label):this
Sets the label for this button
NameTypeOptionalDescription
labelstringNoThe label to display on this button
setStyle(style):this
Sets the style of this button
NameTypeOptionalDescription
styleButtonStyleNoThe style of the button
setURL(url):this
Sets the URL for this button
NameTypeOptionalDescription
urlstringNoThe URL to open when this button is clicked