ButtonBuilder
ButtonBuilder is used to construct a button component for a Discord message.
Properties
Style
ButtonBuilder.Style :: table
An enumeration of button styles.
- Blurple: 1
- Grey: 2
- Green: 3
- Red: 4
- Link: 5
Methods
setStyle
ButtonBuilder : setStyle () -> Builders.Interface.ButtonBuilder
buttonStyle: number
Sets the style of the button.
setLabel
ButtonBuilder : setLabel () -> Builders.Interface.ButtonBuilder
buttonLabel: string
Sets the label of the button.
setEmoji
ButtonBuilder : setEmoji () -> Builders.Interface.ButtonBuilder
emojiId: string
emojiName: string
Sets the emoji for the button.
setLinkUrl
ButtonBuilder : setLinkUrl () -> Builders.Interface.ButtonBuilder
url: string
Sets the URL for the button. This should only be used if the button style is set to Link
.
setDisabled
ButtonBuilder : setDisabled () -> Builders.Interface.ButtonBuilder
isDisabled: boolean
Sets whether the button is disabled.
toPayloadObject
ButtonBuilder : toPayloadObject () -> Network.Resolvable
Converts the button to a JSON object that can be sent to the Discord API.
Functions
new
ButtonBuilder . new () -> ()
buttonId: string
Creates a new instance of ButtonBuilder.