Remedy.Schema.Component.Button (Remedy v0.6.8) View Source
Helpers for dealing with Button Components
Link to this section Summary
Functions
Create a button.
This function provides direct access to the new/1
callback.
Disables the button.
Enables the button.
Create an interaction button.
Read more about interaction buttons in the Nostrum.Struct.Component
documentation.
Create a link button.
Read more about link buttons in the Nostrum.Struct.Component
documentation.
Changes the style of the button.
Toggle the buttons disabled state.
Link to this section Types
Specs
interaction_button() :: %{ type: Remedy.Schema.Component.type(), style: Remedy.Schema.Component.style(), label: Remedy.Schema.Component.label(), emoji: Remedy.Schema.Component.emoji(), custom_id: Remedy.Schema.Component.custom_id(), disabled: Remedy.Schema.Component.disabled() }
Specs
link_button() :: %{ type: Remedy.Schema.Component.type(), style: Remedy.Schema.Component.style(), label: Remedy.Schema.Component.label(), emoji: Remedy.Schema.Component.emoji(), url: Remedy.Schema.Component.url(), disabled: Remedy.Schema.Component.disabled() }
Specs
opt() :: {:style, Remedy.Schema.Component.style()} | {:label, Remedy.Schema.Component.label()} | {:label, Remedy.Schema.Component.label()} | {:emoji, Remedy.Schema.Component.emoji()} | {:custom_id, Remedy.Schema.Component.custom_id()} | {:disabled, Remedy.Schema.Component.disabled()} | {:url, Remedy.Schema.Component.url()}
Specs
opts() :: [opt()]
Specs
t() :: link_button() | interaction_button()
Link to this section Functions
Create a button.
This function provides direct access to the new/1
callback.
Note: While using this function directly you are not guaranteed to return a valid button, providing a valid combination of options becomes the responsibility of the reader. It is instead recommended to use the helper functions provided below.
Disables the button.
Enables the button.
Create an interaction button.
Read more about interaction buttons in the Nostrum.Struct.Component
documentation.
Create a link button.
Read more about link buttons in the Nostrum.Struct.Component
documentation.
Changes the style of the button.
Toggle the buttons disabled state.