| 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
- 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 #
data CacheHandle Source #
Constructors
| CacheHandle | |
Fields | |
data GatewayException Source #
Constructors
| GatewayExceptionCouldNotConnect Text | |
| GatewayExceptionEventParseError Text Text | |
| GatewayExceptionUnexpected GatewayReceivable Text | |
| GatewayExceptionConnection ConnectionException 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 #
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 #
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 #