Skip to main content

ButtonComponent

@discordeno/bot


Documentation / @discordeno/bot / ButtonComponent

Interface: ButtonComponent

Defined in: packages/types/dist/types/discordeno.d.ts:55

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

Properties

customId?

optional customId: string

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

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


disabled?

optional disabled: boolean

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

Whether or not this button is disabled


emoji?

optional emoji: object

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

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


label?

optional label: string

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

for what the button says (max 80 characters)


style

style: ButtonStyles

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

For different styles/colors of the buttons


type

type: Button

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

All button components have type 2


url?

optional url: string

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

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