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

Calamity.Types.Model.Channel.Component

Description

Message components

Synopsis

Documentation

newtype CustomID Source #

Constructors

CustomID Text 

Instances

Instances details
Eq CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Ord CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep CustomID :: Type -> Type #

Methods

from :: CustomID -> Rep CustomID x #

to :: Rep CustomID x -> CustomID #

ToJSON CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Uniform CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

uniformM :: StatefulGen g m => g -> m CustomID #

TextShow CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep CustomID = D1 ('MetaData "CustomID" "Calamity.Types.Model.Channel.Component" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "CustomID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

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 #

ToJSON Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage Component Source #

Add a singleton row containing a Component to the message

If the component is not already an actionrow, it is wrapped in a singleton row

Instance details

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

Instance details

Defined in Calamity.Types.Tellable

type Rep Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.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 #

ToJSON Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage Button Source #

Add a singleton row containing a Button to the message,

Instance details

Defined in Calamity.Types.Tellable

ToMessage [Button] Source #

Add an row of Buttons to the message

Instance details

Defined in Calamity.Types.Tellable

type Rep Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

data LinkButton Source #

Constructors

LinkButton 

Instances

Instances details
Show LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep LinkButton :: Type -> Type #

ToJSON LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage LinkButton Source #

Add a singleton row containing a LinkButton to the message,

Instance details

Defined in Calamity.Types.Tellable

ToMessage [LinkButton] Source #

Add an row of LinkButtons to the message

Instance details

Defined in Calamity.Types.Tellable

type Rep LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

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

lbutton Source #

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

lbutton' Source #

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 #

Instances

Instances details
Eq ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

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 #

ToJSON ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow ButtonStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

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.3.0.0-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 Select Source #

Instances

Instances details
Show Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep Select :: Type -> Type #

Methods

from :: Select -> Rep Select x #

to :: Rep Select x -> Select #

ToJSON Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage Select Source #

Add a singleton row containing a Select to the message,

Instance details

Defined in Calamity.Types.Tellable

ToMessage [Select] Source #

Add an row of Selects to the message

Instance details

Defined in Calamity.Types.Tellable

type Rep Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

data SelectOption Source #

Instances

Instances details
Show SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep SelectOption :: Type -> Type #

ToJSON SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

sopt Source #

Arguments

:: Text

Label

-> Text

Value

-> SelectOption 

data TextInput Source #

Instances

Instances details
Show TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep TextInput :: Type -> Type #

ToJSON TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

data TextInputStyle Source #

Instances

Instances details
Show TextInputStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Generic TextInputStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Associated Types

type Rep TextInputStyle :: Type -> Type #

ToJSON TextInputStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON TextInputStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow TextInputStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep TextInputStyle Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

type Rep TextInputStyle = D1 ('MetaData "TextInputStyle" "Calamity.Types.Model.Channel.Component" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "TextInputShort" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TextInputParagraph" 'PrefixI 'False) (U1 :: Type -> Type))

textInput Source #

Arguments

:: TextInputStyle 
-> Text

Label

-> CustomID 
-> TextInput 

data ComponentType Source #

Instances

Instances details
Eq ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

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 #

ToJSON ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

FromJSON ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

TextShow ComponentType Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

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.3.0.0-inplace" 'False) ((C1 ('MetaCons "ActionRowType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ButtonType" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SelectType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TextInputType" 'PrefixI 'False) (U1 :: Type -> Type)))