calamity-0.2.0.2: A library for writing discord bots in haskell
Safe HaskellNone
LanguageHaskell2010

Calamity.Types.Model.Channel.Component

Description

Message components

Synopsis

Documentation

data Component Source #

Instances

Instances details
Show Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep Component :: Type -> Type #

TextShow Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

parseJSON :: Value -> Parser Component

parseJSONList :: Value -> Parser [Component]

ToJSON Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toJSON :: Component -> Value

toEncoding :: Component -> Encoding

toJSONList :: [Component] -> Value

toEncodingList :: [Component] -> Encoding

type Rep Component Source # 
Instance details

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])))

data Button Source #

Instances

Instances details
Show Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep Button :: Type -> Type #

Methods

from :: Button -> Rep Button x #

to :: Rep Button x -> Button #

TextShow Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

parseJSON :: Value -> Parser Button

parseJSONList :: Value -> Parser [Button]

ToJSON Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toJSON :: Button -> Value

toEncoding :: Button -> Encoding

toJSONList :: [Button] -> Value

toEncodingList :: [Button] -> Encoding

type Rep Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

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 #

Instances

Instances details
Show ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep ButtonStyle :: Type -> Type #

TextShow ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

parseJSON :: Value -> Parser ButtonStyle

parseJSONList :: Value -> Parser [ButtonStyle]

ToJSON ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toJSON :: ButtonStyle -> Value

toEncoding :: ButtonStyle -> Encoding

toJSONList :: [ButtonStyle] -> Value

toEncodingList :: [ButtonStyle] -> Encoding

type Rep ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep ButtonStyle = D1 ('MetaData "ButtonStyle" "Calamity.Types.Model.Channel.Component" "calamity-0.2.0.2-inplace" 'False) ((C1 ('MetaCons "ButtonPrimary" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ButtonSecondary" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ButtonSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ButtonDanger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ButtonLink" 'PrefixI 'False) (U1 :: Type -> Type))))

data ComponentType Source #

Constructors

ActionRowType 
ButtonType 

Instances

Instances details
Show ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep ComponentType :: Type -> Type #

TextShow ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

parseJSON :: Value -> Parser ComponentType

parseJSONList :: Value -> Parser [ComponentType]

ToJSON ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toJSON :: ComponentType -> Value

toEncoding :: ComponentType -> Encoding

toJSONList :: [ComponentType] -> Value

toEncodingList :: [ComponentType] -> Encoding

type Rep ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep ComponentType = D1 ('MetaData "ComponentType" "Calamity.Types.Model.Channel.Component" "calamity-0.2.0.2-inplace" 'False) (C1 ('MetaCons "ActionRowType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ButtonType" 'PrefixI 'False) (U1 :: Type -> Type))