calamity-0.1.0.0: A library for writing discord bots

Safe HaskellNone
LanguageHaskell2010

Calamity.HTTP.Internal.Types

Description

Types for the http lib

Documentation

data RestError Source #

Constructors

HTTPError 

Fields

DecodeError Text 
Instances
Show RestError Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

Generic RestError Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

Associated Types

type Rep RestError :: Type -> Type #

type Rep RestError Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

data RateLimitState Source #

Constructors

RateLimitState 
Instances
Generic RateLimitState Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

Associated Types

type Rep RateLimitState :: Type -> Type #

type Rep RateLimitState Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

type Rep RateLimitState = D1 (MetaData "RateLimitState" "Calamity.HTTP.Internal.Types" "calamity-0.1.0.0-inplace" False) (C1 (MetaCons "RateLimitState" PrefixI True) (S1 (MetaSel (Just "rateLimits") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map Route Lock)) :*: S1 (MetaSel (Just "globalLock") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event)))

data DiscordResponseType Source #

Constructors

Good ByteString

A good response

ExhaustedBucket ByteString Int

Retry after (milliseconds) | We hit a 429, no response and ratelimited

Ratelimited 

Fields

  • Int

    Retry after (milliseconds)

  • Bool

    Global ratelimit | Discord's error, we should retry (HTTP 5XX)

ServerError Int 
ClientError Int ByteString

Our error, we should fail

data GatewayResponse Source #

Instances
Show GatewayResponse Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

Generic GatewayResponse Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

Associated Types

type Rep GatewayResponse :: Type -> Type #

FromJSON GatewayResponse Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

type Rep GatewayResponse Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

type Rep GatewayResponse = D1 (MetaData "GatewayResponse" "Calamity.HTTP.Internal.Types" "calamity-0.1.0.0-inplace" True) (C1 (MetaCons "GatewayResponse" PrefixI True) (S1 (MetaSel (Just "url") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))