在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):rickeyski/slack-api开源软件地址(OpenSource Url):https://github.com/rickeyski/slack-api开源编程语言(OpenSource Language):Haskell 99.0%开源软件介绍(OpenSource Introduction):Bindings to the Slack RTM API. These bindings were developed whilst I was interning at Borders. More information can be found here Examplemodule 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 () |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论