New Button (Expression) — DiSky
Addon: DiSky · Category: Expression · Since: 5.0.0-a1
Syntax
[a] new %types.buttonstyle% button [with] [the] id %text% [(named|with [the] label) %text%] [with [the] emoji %types.emote/text%]Description
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.
Examples
set {_b} to a new primary button with id "confirm" named "Confirm"
set {_b} to a new danger button with id "delete" named "Delete" with emoji "🗑️"
add {_b} to components of {_message}