Safe Haskell | Safe-Inferred |
---|---|
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
FromJSON CustomID Source # | |
ToJSON CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
Show CustomID Source # | |
Eq CustomID Source # | |
Ord CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
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 |
Constructors
ActionRow' [Component] | |
Button' Button | |
LinkButton' LinkButton | |
Select' Select | |
TextInput' TextInput |
Instances
FromJSON Component Source # | |
ToJSON Component Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
Show Component Source # | |
ToMessage Component Source # | Add a singleton row containing a If the component is not already an actionrow, it is wrapped in a singleton row |
Defined in Calamity.Types.Tellable | |
TextShow Component Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
ToMessage [Component] Source # | Add many components to a message. Each component will be wrapped in a singleton ActionRow if not already |
Defined in Calamity.Types.Tellable |
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 |