DiscordButtonComponent
@discordeno/bot • Docs
Documentation / @discordeno/bot / DiscordButtonComponent
Interface: DiscordButtonComponent
https://discord.com/developers/docs/interactions/message-components#buttons-button-object
Properties
custom_id?
optional
custom_id:string
A dev-defined unique string sent on click (max 100 characters).
Remarks
A button of style Link or Premium cannot have a custom_id
Defined in
packages/types/dist/types/discord.d.ts:1683
disabled?
optional
disabled:boolean
Whether or not this button is disabled
Defined in
packages/types/dist/types/discord.d.ts:1708
emoji?
optional
emoji:object
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
Defined in
packages/types/dist/types/discord.d.ts:1692
label?
optional
label:string
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
Defined in
packages/types/dist/types/discord.d.ts:1676
sku_id?
optional
sku_id:string
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
Defined in
packages/types/dist/types/discord.d.ts:1715
style
style:
ButtonStyles
For different styles/colors of the buttons
Defined in
packages/types/dist/types/discord.d.ts:1685
type
type:
Button
All button components have type 2
Defined in
packages/types/dist/types/discord.d.ts:1668
url?
optional
url:string
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
Defined in
packages/types/dist/types/discord.d.ts:1706