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

Calamity.HTTP.Reason

Description

A wrapper request that adds a reson to a request

Synopsis

Documentation

data Reason a Source #

Constructors

Reason a Text 

Instances

Instances details
Eq a => Eq (Reason a) Source # 
Instance details

Defined in Calamity.HTTP.Reason

Methods

(==) :: Reason a -> Reason a -> Bool #

(/=) :: Reason a -> Reason a -> Bool #

Show a => Show (Reason a) Source # 
Instance details

Defined in Calamity.HTTP.Reason

Methods

showsPrec :: Int -> Reason a -> ShowS #

show :: Reason a -> String #

showList :: [Reason a] -> ShowS #

Generic (Reason a) Source # 
Instance details

Defined in Calamity.HTTP.Reason

Associated Types

type Rep (Reason a) :: Type -> Type #

Methods

from :: Reason a -> Rep (Reason a) x #

to :: Rep (Reason a) x -> Reason a #

Request a => Request (Reason a) Source # 
Instance details

Defined in Calamity.HTTP.Reason

Associated Types

type Result (Reason a) Source #

Methods

route :: Reason a -> Route Source #

action :: Reason a -> Options -> String -> IO (Response ByteString) Source #

invoke :: forall (r :: [(Type -> Type) -> Type -> Type]). (BotC r, FromJSON (Result (Reason a))) => Reason a -> Sem r (Either RestError (Result (Reason a))) Source #

type Rep (Reason a) Source # 
Instance details

Defined in Calamity.HTTP.Reason

type Rep (Reason a) = D1 ('MetaData "Reason" "Calamity.HTTP.Reason" "calamity-0.1.14.6-inplace" 'False) (C1 ('MetaCons "Reason" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type Result (Reason a) Source # 
Instance details

Defined in Calamity.HTTP.Reason

type Result (Reason a) = Result a

reason :: Request a => Text -> a -> Reason a Source #

Attach a reason to a request