DiscordButtonComponent
Documentation / @discordeno/bot / DiscordButtonComponent
Interface: DiscordButtonComponent
Defined in: packages/types/dist/types/discord/interactions.d.ts:417
https://discord.com/developers/docs/interactions/message-components#button-object-button-structure
Properties
custom_id?
optional
custom_id:string
Defined in: packages/types/dist/types/discord/interactions.d.ts:434
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?
optional
disabled:boolean
Defined in: packages/types/dist/types/discord/interactions.d.ts:459
Whether or not this button is disabled
emoji?
optional
emoji:object
Defined in: packages/types/dist/types/discord/interactions.d.ts:443
Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis.
animated?
optional
animated:boolean
Whether this emoji is animated
id?
optional
id:string
Emoji id
name?
optional
name:string
Emoji name
Remarks
A button of style Premium cannot have an emoji
label?
optional
label:string
Defined in: packages/types/dist/types/discord/interactions.d.ts:427
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?
optional
sku_id:string
Defined in: packages/types/dist/types/discord/interactions.d.ts:466
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: packages/types/dist/types/discord/interactions.d.ts:436
For different styles/colors of the buttons
type
type:
Button
Defined in: packages/types/dist/types/discord/interactions.d.ts:419
All button components have type 2
url?
optional
url:string
Defined in: packages/types/dist/types/discord/interactions.d.ts:457
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