DiSky DiSky v5.0.0-b1

Button

type

A clickable button. A styled button carries an id you get back in 'on button click'; a link button opens a url instead and never fires an event; a premium button opens a sku purchase. A button needs a label or an emoji. Up to 5 buttons fit in one row.

9 syntaxesextends Componentnet.itsthesky.disky5.api.components.ButtonBuilder
9 / 9

Properties

6
propertyTextsince 5.0.0-a1
[the] label of %button%
%button%'s label

The text shown on a button or a dropdown option, or the title above a text input or a dropdown inside a modal.

A text input or a dropdown added to a modal must have one.

change modes set
Helpful?
propertyTextsince 5.0.0-a1
[the] custom id of %button%
%button%'s custom id

The text id of a component: what 'clicked id' returns for a button, the key of a dropdown or a text input in the received values, the id of a modal.

A link or premium button has none.

change modes set
Helpful?
propertyTextsince 5.0.0-a1
[the] url of %button%
%button%'s url

The url a link button opens. Setting it turns the button into a link button.

change modes set
Helpful?
propertyTextsince 5.0.0-a1
[the] emoji of %button%
%button%'s emoji

The emoji shown on a button or a dropdown option. Accepts an emote, a unicode emoji or the '<:name:id>' form of a custom one.

change modes set
Helpful?
propertyBooleansince 5.0.0-a1
[the] disabled of %button%
%button%'s disabled

Whether the component is greyed out and cannot be used.

change modes set
Helpful?
propertyButtonStyle since 5.0.0-a1
[the] style of %button%
%button%'s style

The style of a button (its color) or of a text input (short or paragraph). Co-owned with Skript's native Property.STYLE.

change modes set
Helpful?

Expressions

3
expressionButtonsince 5.0.0-a1
[a] new %buttonstyle% button [with] [the] id %string% [(named|with [the] label) %-string%] [with [the] emoji %-emote/string%]

Creates a styled button (primary, secondary, success or danger) with the id you will read back as 'clicked id' when it is clicked.

The label and the emoji are optional here and can be set later, but one of them is required before the button is sent.

Helpful?
expressionButtonsince 5.0.0-a1
[a] new premium button [with] [the] sku [id] %string%

Creates a button that opens the purchase flow of one of the application's skus. Discord draws its label itself.

Helpful?

Returned by

3

Syntaxes elsewhere in DiSky that return Button.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.