| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Calamity.Types.Model.Channel.Component
Description
Message components
Synopsis
- newtype CustomID = CustomID Text
- data Component
- data Button = Button {}
- data LinkButton = LinkButton {}
- button :: ButtonStyle -> CustomID -> Button
- button' :: ButtonStyle -> Text -> CustomID -> Button
- lbutton :: ButtonStyle -> Text -> LinkButton
- lbutton' :: ButtonStyle -> Text -> Text -> LinkButton
- data ButtonStyle
- data Select = Select {}
- select :: [SelectOption] -> CustomID -> Select
- data SelectOption = SelectOption {}
- sopt :: Text -> Text -> SelectOption
- data TextInput = TextInput {}
- data TextInputStyle
- textInput :: TextInputStyle -> Text -> CustomID -> TextInput
- data ComponentType
- componentType :: Component -> ComponentType
Documentation
Instances
| Eq CustomID Source # | |
| Ord CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
| Show CustomID Source # | |
| Generic CustomID Source # | |
| ToJSON CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
| FromJSON CustomID Source # | |
| Uniform CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component Methods uniformM :: StatefulGen g m => g -> m CustomID # | |
| TextShow CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
| type Rep CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
Constructors
| ActionRow' [Component] | |
| Button' Button | |
| LinkButton' LinkButton | |
| Select' Select | |
| TextInput' TextInput |
Instances
Constructors
| Button | |
Instances
data LinkButton Source #
Constructors
| LinkButton | |
Instances
button :: ButtonStyle -> CustomID -> Button Source #
Constuct a non-disabled Button with the given ButtonStyle and CustomID,
all other fields are set to Nothing
button' :: ButtonStyle -> Text -> CustomID -> Button Source #
Constuct a non-disabled Button with the given ButtonStyle, CustomID,
and label, all other fields are set to Nothing
Arguments
| :: ButtonStyle | |
| -> Text | The link to use |
| -> LinkButton |
Constuct a non-disabled LinkButton with the given ButtonStyle, link, all
other fields are set to Nothing
Arguments
| :: ButtonStyle | |
| -> Text | The link to use |
| -> Text | The label to use |
| -> LinkButton |
Constuct a non-disabled LinkButton with the given ButtonStyle, link,
and label, all other fields are set to Nothing
data ButtonStyle Source #
Constructors
| ButtonPrimary | |
| ButtonSecondary | |
| ButtonSuccess | |
| ButtonDanger | |
| ButtonLink |
Instances
Constructors
| Select | |
Instances
data SelectOption Source #
Constructors
| SelectOption | |
Instances
Constructors
| TextInput | |
Instances
data TextInputStyle Source #
Constructors
| TextInputShort | |
| TextInputParagraph |
Instances
data ComponentType Source #
Constructors
| ActionRowType | |
| ButtonType | |
| SelectType | |
| TextInputType |