calamity-0.7.0.1: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Calamity.Types.Model.Channel.Component

Description

Message components

Synopsis

Documentation

newtype CustomID Source #

Constructors

CustomID Text 

Instances

Instances details
FromJSON CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Eq CustomID Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Ord 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

data Component Source #

Instances

Instances details
FromJSON Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON Component Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show 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

TextShow Component Source # 
Instance details

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

Instance details

Defined in Calamity.Types.Tellable

data Button Source #

Instances

Instances details
FromJSON Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

CalamityToJSON' Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toPairs :: KeyValue kv => Button -> [Maybe kv] Source #

ToMessage Button Source #

Add a singleton row containing a Button to the message,

Instance details

Defined in Calamity.Types.Tellable

TextShow Button Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ CustomID, b ~ CustomID) => LabelOptic "customID" k Button Button a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "disabled" k Button Button a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe RawEmoji, b ~ Maybe RawEmoji) => LabelOptic "emoji" k Button Button a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "label" k Button Button a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ ButtonStyle, b ~ ButtonStyle) => LabelOptic "style" k Button Button a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage [Button] Source #

Add an row of Buttons to the message

Instance details

Defined in Calamity.Types.Tellable

data LinkButton Source #

Constructors

LinkButton 

Instances

Instances details
FromJSON LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

CalamityToJSON' LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toPairs :: KeyValue kv => LinkButton -> [Maybe kv] Source #

ToMessage LinkButton Source #

Add a singleton row containing a LinkButton to the message,

Instance details

Defined in Calamity.Types.Tellable

TextShow LinkButton Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "disabled" k LinkButton LinkButton a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe RawEmoji, b ~ Maybe RawEmoji) => LabelOptic "emoji" k LinkButton LinkButton a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "label" k LinkButton LinkButton a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ ButtonStyle, b ~ ButtonStyle) => LabelOptic "style" k LinkButton LinkButton a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "url" k LinkButton LinkButton a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage [LinkButton] Source #

Add an row of LinkButtons to the message

Instance details

Defined in Calamity.Types.Tellable

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

Instances

Instances details
FromJSON Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

CalamityToJSON' Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toPairs :: KeyValue kv => Select -> [Maybe kv] Source #

ToMessage Select Source #

Add a singleton row containing a Select to the message,

Instance details

Defined in Calamity.Types.Tellable

TextShow Select Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ CustomID, b ~ CustomID) => LabelOptic "customID" k Select Select a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "disabled" k Select Select a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "maxValues" k Select Select a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "minValues" k Select Select a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ [SelectOption], b ~ [SelectOption]) => LabelOptic "options" k Select Select a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "placeholder" k Select Select a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToMessage [Select] Source #

Add an row of Selects to the message

Instance details

Defined in Calamity.Types.Tellable

data SelectOption Source #

Instances

Instances details
FromJSON SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

CalamityToJSON' SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toPairs :: KeyValue kv => SelectOption -> [Maybe kv] Source #

TextShow SelectOption Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "default_" k SelectOption SelectOption a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "description" k SelectOption SelectOption a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe RawEmoji, b ~ Maybe RawEmoji) => LabelOptic "emoji" k SelectOption SelectOption a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "label" k SelectOption SelectOption a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "value" k SelectOption SelectOption a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

sopt Source #

Arguments

:: Text

Label

-> Text

Value

-> SelectOption 

data TextInput Source #

Instances

Instances details
FromJSON TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

ToJSON TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Show TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

CalamityToJSON' TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

Methods

toPairs :: KeyValue kv => TextInput -> [Maybe kv] Source #

TextShow TextInput Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ CustomID, b ~ CustomID) => LabelOptic "customID" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "label" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "maxLength" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "minLength" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "placeholder" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "required" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ TextInputStyle, b ~ TextInputStyle) => LabelOptic "style" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "value" k TextInput TextInput a b Source # 
Instance details

Defined in Calamity.Types.Model.Channel.Component

textInput Source #

Arguments

:: TextInputStyle 
-> Text

Label

-> CustomID 
-> TextInput