DiscordButtonComponent
Documentation / @discordeno/types / DiscordButtonComponent
Interface: DiscordButtonComponent
Defined in: discord/components.ts:128
https://docs.discord.com/developers/components/reference#button-button-structure
Extends
Properties
custom_id?
optionalcustom_id?:string
Defined in: discord/components.ts:154
A dev-defined unique string sent on click (max 100 characters).
Remarks
A button of style Link or Premium cannot have a custom_id
disabled?
optionaldisabled?:boolean
Defined in: discord/components.ts:172
Whether or not this button is disabled
emoji?
optionalemoji?:Partial<Pick<DiscordEmoji,"id"|"name"|"animated">>
Defined in: discord/components.ts:147
Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis.
Remarks
A button of style Premium cannot have an emoji
id?
optionalid?:number
Defined in: discord/components.ts:100
32 bit integer used as an optional identifier for component
Inherited from
label?
optionallabel?:string
Defined in: discord/components.ts:140
Text that appears on the button
Remarks
A label can have a max of 80 characters A button of style Premium cannot have a label
sku_id?
optionalsku_id?:string
Defined in: discord/components.ts:161
Identifier for a purchasable SKU
Remarks
Buttons of style Premium must have a sku_id, any other button with a different style can not have a a sku_id
style
style:
ButtonStyles
Defined in: discord/components.ts:132
For different styles/colors of the buttons
type
type:
Button
Defined in: discord/components.ts:129
The type of the component
Overrides
url?
optionalurl?:string
Defined in: discord/components.ts:170
Url for link buttons that can navigate a user to the web.
Remarks
Buttons of style Link must have an url, any other button with a different style can not have an url
Maximum 512 characters.