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 Event
- 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 Events to the Chan
Authorization token for the Discord API
Represents possible events sent by discord. Detailed information can be found at https://discord.com/developers/docs/topics/gateway.
data GatewayIntent Source #
Instances
Eq GatewayIntent Source # | |
Defined in Discord.Internal.Types.Gateway (==) :: GatewayIntent -> GatewayIntent -> Bool # (/=) :: GatewayIntent -> GatewayIntent -> Bool # | |
Ord GatewayIntent Source # | |
Defined in Discord.Internal.Types.Gateway compare :: GatewayIntent -> GatewayIntent -> Ordering # (<) :: GatewayIntent -> GatewayIntent -> Bool # (<=) :: GatewayIntent -> GatewayIntent -> Bool # (>) :: GatewayIntent -> GatewayIntent -> Bool # (>=) :: GatewayIntent -> GatewayIntent -> Bool # max :: GatewayIntent -> GatewayIntent -> GatewayIntent # min :: GatewayIntent -> GatewayIntent -> GatewayIntent # | |
Show GatewayIntent Source # | |
Defined in Discord.Internal.Types.Gateway showsPrec :: Int -> GatewayIntent -> ShowS # show :: GatewayIntent -> String # showList :: [GatewayIntent] -> ShowS # | |
Default GatewayIntent Source # | |
Defined in Discord.Internal.Types.Gateway def :: GatewayIntent # |