slack-api-0.6: Bindings to the Slack RTM API.

Safe HaskellNone
LanguageHaskell98

Web.Slack.State

Documentation

newtype Slack s a Source

Constructors

Slack 

Fields

runSlack :: StateT (SlackState s) IO a
 

Instances

type SlackBot s = Event -> Slack s () Source

data Metainfo Source

Constructors

Meta 

Fields

_metaConnection :: Connection

Websockets connection

_msgCounter :: Int

Unique message counter

Instances

data SlackState s Source

Constructors

SlackState 

Fields

_meta :: Metainfo

Information about the connection

_session :: SlackSession

Information about the session at the start of the connection

_userState :: s

User defined state

_config :: SlackConfig

A copy of the initial configuration

Instances

Show s => Show (SlackState s) Source 
MonadState (SlackState s) (Slack s) Source 

userState :: forall s s. Lens (SlackState s) (SlackState s) s s Source

session :: forall s. Lens' (SlackState s) SlackSession Source

meta :: forall s. Lens' (SlackState s) Metainfo Source

config :: forall s. Lens' (SlackState s) SlackConfig Source

metaConnection :: Lens' Metainfo Connection Source

slackLog :: Show a => a -> MonadIO m => m () Source

connection :: Lens' (SlackState s) Connection Source