ButtonComponent

An interactive component rendered on a Message. If this button contains a customId and is clicked by a user, a InteractionCreateEvent with a ComponentInteraction will fire.

Constructors

Link copied to clipboard
constructor(data: ChatComponentData)

Properties

Link copied to clipboard

The custom identifier for any ComponentInteractions this button will trigger. Present if this button is not a link or premium button.

Link copied to clipboard
open override val data: ChatComponentData
Link copied to clipboard

Whether this button can be clicked.

Link copied to clipboard

The emoji that appears on the button, if present.

Link copied to clipboard

The text that appears on the button, if present.

Link copied to clipboard

The ID of the Sku this button will prompt to purchase. Present if this button is a premium button.

Link copied to clipboard

The style of this button, ButtonStyle.Link buttons will always have a url, ButtonStyle.Premium buttons will always have an skuId.

Link copied to clipboard
open override val type: ComponentType.Button

The type of component.

Link copied to clipboard
val url: String?

The url the button will link to. Present if this button is a link button.

Functions

Link copied to clipboard
open override fun toString(): String