Safe Haskell | None |
---|---|
Language | Haskell2010 |
Calamity.Types.Model.Channel.Component
Description
Message components
Synopsis
- data Component
- = Button' Button
- | ActionRow' [Component]
- data Button = Button {}
- button :: ButtonStyle -> Button
- button' :: ButtonStyle -> Text -> Button
- data ButtonStyle
- data ComponentType
- componentType :: Component -> ComponentType
Documentation
Constructors
Button' Button | |
ActionRow' [Component] |
Instances
Show Component Source # | |
Generic Component Source # | |
TextShow Component Source # | |
FromJSON Component Source # | |
Defined in Calamity.Types.Model.Channel.Component | |
ToJSON Component Source # | |
Defined in Calamity.Types.Model.Channel.Component Methods toEncoding :: Component -> Encoding toJSONList :: [Component] -> Value toEncodingList :: [Component] -> Encoding | |
type Rep Component Source # | |
Defined in Calamity.Types.Model.Channel.Component type Rep Component = D1 ('MetaData "Component" "Calamity.Types.Model.Channel.Component" "calamity-0.2.0.2-inplace" 'False) (C1 ('MetaCons "Button'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Button)) :+: C1 ('MetaCons "ActionRow'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Component]))) |
Constructors
Button | |
Instances
button :: ButtonStyle -> Button Source #
Constuct a non-disabled Button
with the given ButtonStyle
, all other
fields are set to Nothing
button' :: ButtonStyle -> Text -> Button Source #
Constuct a non-disabled Button
with the given ButtonStyle
and label,
all other fields are set to Nothing
data ButtonStyle Source #
Constructors
ButtonPrimary | |
ButtonSecondary | |
ButtonSuccess | |
ButtonDanger | |
ButtonLink |
Instances
data ComponentType Source #
Constructors
ActionRowType | |
ButtonType |