Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 # | |
ToJSON CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
FromJSON CustomID Source # | |
Uniform CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component uniformM :: StatefulGen g m => g -> m CustomID # | |
TextShow CustomID Source # | |
Defined in Calamity.Types.Model.Channel.Component |
Instances
Show Component Source # | |
ToJSON Component Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
FromJSON Component Source # | |
TextShow Component Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
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 | |
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 |
Instances
data LinkButton Source #
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
:: ButtonStyle | |
-> Text | The link to use |
-> LinkButton |
Constuct a non-disabled LinkButton
with the given ButtonStyle
, link, all
other fields are set to Nothing
:: 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 #
Instances
Instances
data SelectOption Source #
Instances
Instances
data TextInputStyle Source #
Instances
data ComponentType Source #