LogoAntiRaid

@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
PropTypeDescription
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

messageTypes.ButtonStyle

Returns

ret1

Button

Button.Prototype.setLabel

[[

]]

Function Signature
--[[
	
]]
function Button.Prototype.setLabel(self: Button, label: string) -> Button end

Arguments

label

string

Returns

ret1

Button

Button.Prototype.setEmoji

[[

]]

Function Signature
--[[
	
]]
function Button.Prototype.setEmoji(self: Button, emoji: emoji.JSON) -> Button end

Arguments

emoji

emoji.JSON

Returns

ret1

Button

Button.Prototype.setCustomId

[[

]]

Function Signature
--[[
	
]]
function Button.Prototype.setCustomId(self: Button, customId: string) -> Button end

Arguments

customId

string

Returns

ret1

Button

Button.Prototype.setSkuId

[[

]]

Function Signature
--[[
	
]]
function Button.Prototype.setSkuId(self: Button, skuId: string) -> Button end

Arguments

skuId

string

Returns

ret1

Button

Button.Prototype.setUrl

[[

]]

Function Signature
--[[
	
]]
function Button.Prototype.setUrl(self: Button, url: string) -> Button end

Arguments

url

string

Returns

ret1

Button

Button.Prototype.setDisabled

[[

]]

Function Signature
--[[
	
]]
function Button.Prototype.setDisabled(self: Button, disabled: boolean) -> Button end

Arguments

disabled

boolean

Returns

ret1

Button

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

JSON

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

Button

Last updated on