@discord-types/builders/message/components/button
API reference for @discord-types/builders/message/components/button
@discord-types/builders/message/components/button
Types
Button
Raw Type
type Button = Button.Prototype, & {
style: messageTypes.ButtonStyle,
label: string?,
emoji: emoji.JSON?,
customId: string?,
skuId: string?,
url: string?,
disabled: boolean?
}
Intersection with variants:
Variant 2
Prop | Type | Description |
---|---|---|
style | - | |
label? | - | |
emoji? | - | |
customId? | - | |
skuId? | - | |
url? | - | |
disabled? | - |
JSON
Raw Type
type JSON = apiTypes.ButtonComponentObject
apiTypes.ButtonComponentObject
Functions
Button.Prototype.setStyle
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setStyle(self: Button, buttonStyle: messageTypes.ButtonStyle) -> Button end
Arguments
buttonStyle
Returns
ret1
Button.Prototype.setLabel
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setLabel(self: Button, label: string) -> Button end
Arguments
label
Returns
ret1
Button.Prototype.setEmoji
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setEmoji(self: Button, emoji: emoji.JSON) -> Button end
Arguments
emoji
Returns
ret1
Button.Prototype.setCustomId
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setCustomId(self: Button, customId: string) -> Button end
Arguments
customId
Returns
ret1
Button.Prototype.setSkuId
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setSkuId(self: Button, skuId: string) -> Button end
Arguments
skuId
Returns
ret1
Button.Prototype.setUrl
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setUrl(self: Button, url: string) -> Button end
Arguments
url
Returns
ret1
Button.Prototype.setDisabled
[[
]]
Function Signature
--[[
]]
function Button.Prototype.setDisabled(self: Button, disabled: boolean) -> Button end
Arguments
disabled
Returns
ret1
Button.Prototype.build
[[ Responsible for building the Button JSON that can be parsed by the Discord API. ]]
Function Signature
--[[
Responsible for building the Button JSON that can be parsed by the Discord API.
]]
function Button.Prototype.build(self: Button) -> JSON end
Returns
ret1
Button.Interface.new
[[ Responsible for creating a new Button.
```lua
``` ]]
Function Signature
--[[
Responsible for creating a new Button.
\`\`\`lua
\`\`\`
]]
function Button.Interface.new(resource: {
style: messageTypes.ButtonStyle,
label: string?,
emoji: emoji.JSON?,
customId: string?,
skuId: string?,
url: string?,
disabled: boolean?
}?) -> Button end
Arguments
resource
This field is optional and may not be specified
{style: messageTypes.ButtonStyle, label: string?, emoji: emoji.JSON?, customId: string?, skuId: string?, url: string?, disabled: boolean?}?
Returns
ret1
Last updated on