wamaral / slack-api

Haskell bindings to the Slack RTM API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bindings to the Slack RTM API. 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 }
    runSlack config echoBot

echoBot :: Slack ()
echoBot = do
    event <- getNextEvent
    case event of
        (Message cid _ msg _ _ _) -> sendMessage cid msg
        _ -> return ()
    echoBot

Author

These bindings were developed by Matthew Pickering whilst he was interning at Borders.

About

Haskell bindings to the Slack RTM API

License:MIT License


Languages

Language:Haskell 98.0%Language:Nix 2.0%