Skip to content
/ slack-api Public
forked from rickeyski/slack-api

Haskell bindings to the Slack RTM API

License

Notifications You must be signed in to change notification settings

folq/slack-api

 
 

Repository files navigation

Travis Build Status

Bindings to the Slack RTM API.

These bindings were developed whilst I was interning at Borders.

More information can be found here

Example

module EchoBot where

import System.Environment (lookupEnv)
import Web.Slack

main :: IO ()
main = do
    Just token <- lookupEnv "SLACK_API_TOKEN"
    let config = SlackConfig { _slackApiToken = token }
    withSlackHandle config echoBot

echoBot :: SlackHandle -> IO ()
echoBot h = forever $ do
    event <- getNextEvent h
    case event of
        (Message cid _ msg _ _ _) -> sendMessage h cid msg
        _ -> return ()

About

Haskell bindings to the Slack RTM API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 99.0%
  • Nix 1.0%