Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 #
data GatewayException Source #
GatewayExceptionCouldNotConnect Text | |
GatewayExceptionEventParseError Text Text | |
GatewayExceptionUnexpected GatewayReceivable Text | |
GatewayExceptionConnection ConnectionException Text |
Instances
Show GatewayException Source # | |
Defined in Discord.Internal.Gateway.EventLoop showsPrec :: Int -> GatewayException -> ShowS # show :: GatewayException -> String # showList :: [GatewayException] -> ShowS # |
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 (==) :: EventInternalParse -> EventInternalParse -> Bool # (/=) :: EventInternalParse -> EventInternalParse -> Bool # | |
Read EventInternalParse Source # | |
Defined in Discord.Internal.Types.Events | |
Show EventInternalParse Source # | |
Defined in Discord.Internal.Types.Events showsPrec :: Int -> EventInternalParse -> ShowS # show :: EventInternalParse -> String # showList :: [EventInternalParse] -> ShowS # |
data GatewayIntent Source #