discord-haskell-1.16.1: Write bots for Discord in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Discord.Internal.Gateway

Description

Provides a rather raw interface to the websocket events through a real-time Chan

Synopsis

Documentation

data GatewayHandle Source #

Info the event processing loop needs to

Constructors

GatewayHandle 

Fields

data CacheHandle Source #

Internal handle for cacheLoop to manage the cache

Constructors

CacheHandle 

newtype GatewayException Source #

Ways the gateway connection can fail with no possibility of recovery.

data Cache Source #

Cached data from gateway. Set RunDiscordOpts.discordEnableCache=true to enable all the fields

Constructors

Cache 

Fields

Instances

Instances details
Show Cache Source # 
Instance details

Defined in Discord.Internal.Gateway.Cache

Methods

showsPrec :: Int -> Cache -> ShowS #

show :: Cache -> String #

showList :: [Cache] -> ShowS #

initializeCache :: User -> FullApplication -> CacheHandle -> IO () Source #

Internally used to setup the first cache

startCacheThread :: Bool -> Chan Text -> IO (CacheHandle, ThreadId) Source #

Starts a thread for the cache

startGatewayThread :: Auth -> GatewayIntent -> CacheHandle -> Chan Text -> IO (GatewayHandle, ThreadId) Source #

Create a Chan for websockets. This creates a thread that writes all the received EventsInternalParse to the Chan

data Auth Source #

Authorization token for the Discord API

Instances

Instances details
Read Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Show Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Methods

showsPrec :: Int -> Auth -> ShowS #

show :: Auth -> String #

showList :: [Auth] -> ShowS #

Eq Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Methods

(==) :: Auth -> Auth -> Bool #

(/=) :: Auth -> Auth -> Bool #

Ord Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Methods

compare :: Auth -> Auth -> Ordering #

(<) :: Auth -> Auth -> Bool #

(<=) :: Auth -> Auth -> Bool #

(>) :: Auth -> Auth -> Bool #

(>=) :: Auth -> Auth -> Bool #

max :: Auth -> Auth -> Auth #

min :: Auth -> Auth -> Auth #

data EventInternalParse Source #

Internal Event representation. Each matches to the corresponding constructor of Event.

An application should never have to use those directly