[Try] Bulid a chat-bot with Hubot on Slack
npm install -g hubot coffee-script yo generator-hubot
mkdir test-bot && cd test-bot
yo hubot
run with bin/hubot
npm install hubot-slack --save
HUBOT_SLACK_TOKEN=YOUR_SLACK_API_TOKEN_HERE ./bin/hubot --adapter slack
https://api.slack.com/docs/oauth-test-tokens
add some script in your /script/script.js
module.exports = function(robot){
robot.respond(/hello/, function(res){
res.send('world');
});
}
mkdir test-bot && cd test-bot
yo hubot
run with bin/hubot
npm install hubot-slack --save
HUBOT_SLACK_TOKEN=YOUR_SLACK_API_TOKEN_HERE ./bin/hubot --adapter slack
https://api.slack.com/docs/oauth-test-tokens
add some script in your /script/script.js
module.exports = function(robot){
robot.respond(/hello/, function(res){
res.send('world');
});
}
留言
張貼留言