Skip to main content

ButtonComponent

@discordeno/botDocs


Documentation / @discordeno/bot / ButtonComponent

Interface: ButtonComponent

https://discord.com/developers/docs/interactions/message-components#button-object-button-structure

Properties

customId?

optional customId: string

a dev-defined unique string sent on click (max 100 characters). type 5 Link buttons can not have a custom_id

Defined in

packages/types/dist/types/discordeno.d.ts:61


disabled?

optional disabled: boolean

Whether or not this button is disabled

Defined in

packages/types/dist/types/discordeno.d.ts:76


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: bigint

Emoji id

name?

optional name: string

Emoji name

Defined in

packages/types/dist/types/discordeno.d.ts:65


label?

optional label: string

for what the button says (max 80 characters)

Defined in

packages/types/dist/types/discordeno.d.ts:59


style

style: ButtonStyles

For different styles/colors of the buttons

Defined in

packages/types/dist/types/discordeno.d.ts:63


type

type: Button

All button components have type 2

Defined in

packages/types/dist/types/discordeno.d.ts:57


url?

optional url: string

optional url for link-style buttons that can navigate a user to the web. Only type 5 Link buttons can have a url

Defined in

packages/types/dist/types/discordeno.d.ts:74