| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Discord.Internal.Gateway
Description
Provides a rather raw interface to the websocket events through a real-time Chan
Synopsis
- data GatewayHandle = GatewayHandle {}
- data CacheHandle = CacheHandle {}
- data GatewayException = GatewayExceptionIntent Text
- data Cache = Cache {}
- startCacheThread :: Chan Text -> IO (CacheHandle, ThreadId)
- startGatewayThread :: Auth -> GatewayIntent -> CacheHandle -> Chan Text -> IO (GatewayHandle, ThreadId)
- data Auth
- data EventInternalParse
- data GatewayIntent
Documentation
data GatewayHandle Source #
Info the event processing loop needs to
Constructors
| GatewayHandle | |
Fields
| |
data CacheHandle Source #
Constructors
| CacheHandle | |
Fields | |
data GatewayException Source #
Ways the gateway connection can fail with no possibility of recovery.
Constructors
| GatewayExceptionIntent Text |
Instances
| Show GatewayException Source # | |
Defined in Discord.Internal.Gateway.EventLoop Methods showsPrec :: Int -> GatewayException -> ShowS # show :: GatewayException -> String # showList :: [GatewayException] -> ShowS # | |
Constructors
| Cache | |
startCacheThread :: 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
Authorization token for the Discord API
data EventInternalParse Source #
Internal Event representation. Each matches to the corresponding constructor of Event.
An application should never have to use those directly
Instances
| Eq EventInternalParse Source # | |
Defined in Discord.Internal.Types.Events Methods (==) :: EventInternalParse -> EventInternalParse -> Bool # (/=) :: EventInternalParse -> EventInternalParse -> Bool # | |
| Read EventInternalParse Source # | |
Defined in Discord.Internal.Types.Events Methods readsPrec :: Int -> ReadS EventInternalParse # readList :: ReadS [EventInternalParse] # | |
| Show EventInternalParse Source # | |
Defined in Discord.Internal.Types.Events Methods showsPrec :: Int -> EventInternalParse -> ShowS # show :: EventInternalParse -> String # showList :: [EventInternalParse] -> ShowS # | |
data GatewayIntent Source #
Gateway intents to subrscribe to
Details of which intent englobs what data is avalilable at the official Discord documentation