【文件属性】:
文件名称:node-slackbot:slack.com 的 Slackbot 包装器
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-03 15:50:47
CoffeeScript
懒人机器人
Slackbot包装的
安装
% npm install slackbot
获取令牌
添加 slackbot 集成并获取token
用法
var Slackbot = require ( 'slackbot' )
var slackbot = new Slackbot ( 'YOUR-TEAM' , 'YOUR-TOKEN' ) ;
slackbot . send ( "#general" , "hello!!" , function ( err , res , body ) {
if ( err ) return ;
console . log ( body ) ;
} ) ;
样本
使用
% SLACK_TEAM=teamname SLACK_TOKEN=a1b2cdef345 node sample.js "hello world"
开发
% npm
【文件预览】:
node-slackbot-master
----sample.js(328B)
----package.json(918B)
----Gruntfile.coffee(1KB)
----src()
--------slackbot.coffee(311B)
----.gitignore(40B)
----lib()
--------slackbot.js(661B)
----README.md(1023B)
----History.txt(108B)
----LICENSE.txt(1KB)