discord-haskell-1.14.0: Write bots for Discord in Haskell
Safe HaskellNone
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 GatewayException Source #

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

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

data Auth Source #

Authorization token for the Discord API

Instances

Instances details
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 #

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 #

data EventInternalParse Source #

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

An application should never have to use those directly