danibot-0.2.0.0: Basic Slack bot framework.

Safe HaskellNone
LanguageHaskell2010

Network.Danibot

Synopsis

Documentation

type Command = Text Source

type Description = Text Source

dumbHandler :: (Text -> IO Text, Description) Source

Waits half a second, does nothing.

lookupHandler :: Map Text Text -> (Text -> IO Text, Description) Source

Performs lookups against an in-memory map.

isUpHandler :: (Text -> IO Text, Description) Source

Is the given port listening on the given host?

helpHandler :: [(Command, (Text -> IO Text, Description))] -> (Text -> IO Text, Description) Source

Builds the help message.

dispatch :: [(Command, (Text -> IO Text, x))] -> Text -> IO Text Source

Builds a handler from a list of command names and sub-handlers.