discord-haskell-0.7.0: Write bots for Discord in Haskell

Safe HaskellNone
LanguageHaskell2010

Discord.Gateway

Description

Provides a rather raw interface to the websocket events through a real-time Chan

Synopsis

Documentation

data Gateway Source #

Concurrency primitives that make up the gateway. Build a higher level interface over these

startGatewayThread :: Auth -> Chan String -> IO (Gateway, ThreadId) Source #

Create a Chan for websockets. This creates a thread that writes all the received Events to the Chan

data Auth Source #

Authorization token for the Discord API

Instances
Eq Auth Source # 
Instance details

Defined in Discord.Types.Prelude

Methods

(==) :: Auth -> Auth -> Bool #

(/=) :: Auth -> Auth -> Bool #

Ord Auth Source # 
Instance details

Defined in Discord.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 #

Show Auth Source # 
Instance details

Defined in Discord.Types.Prelude

Methods

showsPrec :: Int -> Auth -> ShowS #

show :: Auth -> String #

showList :: [Auth] -> ShowS #

data Event Source #

Represents possible events sent by discord. Detailed information can be found at https://discordapp.com/developers/docs/topics/gateway.

Instances
Show Event Source # 
Instance details

Defined in Discord.Types.Events

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #