danibot-0.2.0.0: Basic Slack bot framework.

Safe HaskellNone
LanguageHaskell2010

Network.Danibot.Slack

Synopsis

Documentation

worker Source

Arguments

:: (Text -> IO Text)

A request handler function.

-> IO (TChan (Text, Text -> IO ()), IO ())

Action that creates the request channel and worker action.

Takes a request handling function, returns a channel that takes (requests,post-processing actions) along with a worker action that drains the channel and forks a thread for each request.

makeChatState :: Chat -> IO (ChatState, Stream (Of OutboundMessage) IO ()) Source

eventFold :: TChan (Text, Text -> IO ()) -> ChatState -> FoldM IO Event () Source

Builds a Fold that consumes messages coming from the Slack RTM connection.