calamity-0.1.13.0: A library for writing discord bots
Safe HaskellNone
LanguageHaskell2010

Calamity.Client.Types

Description

Types for the client

Synopsis

Documentation

data Client Source #

Constructors

Client 

Instances

Instances details
Generic Client Source # 
Instance details

Defined in Calamity.Client.Types

Associated Types

type Rep Client :: Type -> Type #

Methods

from :: Client -> Rep Client x #

to :: Rep Client x -> Client #

type Rep Client Source # 
Instance details

Defined in Calamity.Client.Types

newtype StartupError Source #

Constructors

StartupError String 

Instances

Instances details
Show StartupError Source # 
Instance details

Defined in Calamity.Client.Types

data GuildCreateStatus Source #

Constructors

GuildCreateNew

The guild was just joined

GuildCreateAvailable

The guild is becoming available

Instances

Instances details
Show GuildCreateStatus Source # 
Instance details

Defined in Calamity.Client.Types

Generic GuildCreateStatus Source # 
Instance details

Defined in Calamity.Client.Types

Associated Types

type Rep GuildCreateStatus :: Type -> Type #

TextShow GuildCreateStatus Source # 
Instance details

Defined in Calamity.Client.Types

type Rep GuildCreateStatus Source # 
Instance details

Defined in Calamity.Client.Types

type Rep GuildCreateStatus = D1 ('MetaData "GuildCreateStatus" "Calamity.Client.Types" "calamity-0.1.13.0-inplace" 'False) (C1 ('MetaCons "GuildCreateNew" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GuildCreateAvailable" 'PrefixI 'False) (U1 :: Type -> Type))

data GuildDeleteStatus Source #

Constructors

GuildDeleteUnavailable

The guild became unavailable

GuildDeleteRemoved

The bot was removed from the guild

Instances

Instances details
Show GuildDeleteStatus Source # 
Instance details

Defined in Calamity.Client.Types

Generic GuildDeleteStatus Source # 
Instance details

Defined in Calamity.Client.Types

Associated Types

type Rep GuildDeleteStatus :: Type -> Type #

TextShow GuildDeleteStatus Source # 
Instance details

Defined in Calamity.Client.Types

type Rep GuildDeleteStatus Source # 
Instance details

Defined in Calamity.Client.Types

type Rep GuildDeleteStatus = D1 ('MetaData "GuildDeleteStatus" "Calamity.Client.Types" "calamity-0.1.13.0-inplace" 'False) (C1 ('MetaCons "GuildDeleteUnavailable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GuildDeleteRemoved" 'PrefixI 'False) (U1 :: Type -> Type))

type family EHType (d :: EventType) where ... Source #

A type family to decide what the parameters for an event handler should be determined by the type of event it is handling.

type BotC r = (Members '[LogEff, MetricEff, CacheEff, Reader Client, AtomicState EventHandlers, Embed IO, Final IO, Async] r, Typeable r) Source #

type SetupEff r = LogEff ': (Reader Client ': (AtomicState EventHandlers ': (Async ': r))) Source #

A concrete effect stack used inside the bot

type ReactConstraints s = (InsertEventHandler s, RemoveEventHandler s) Source #

Some constraints that react needs to work. Don't worry about these since they are satisfied for any type s can be

newtype EventHandlers Source #

Constructors

EventHandlers (TypeRepMap EventHandler) 

class InsertEventHandler a where Source #

A helper typeclass that is used to decide how to register regular events, and custom events which require storing in a map at runtime.

Methods

makeEventHandlers :: Proxy a -> Integer -> StoredEHType a -> EventHandlers Source #

Instances

Instances details
(EHInstanceSelector a ~ flag, InsertEventHandler' flag a) => InsertEventHandler a Source # 
Instance details

Defined in Calamity.Client.Types

Methods

makeEventHandlers :: Proxy a -> Integer -> StoredEHType a -> EventHandlers Source #

class RemoveEventHandler a where Source #

Instances

Instances details
(EHInstanceSelector a ~ flag, RemoveEventHandler' flag a) => RemoveEventHandler (a :: EventType) Source # 
Instance details

Defined in Calamity.Client.Types

getEventHandlers :: GetEventHandlers a => EventHandlers -> [StoredEHType a] Source #