Skip to content

Instantly share code, notes, and snippets.

@KimuraTakaumi
Created April 17, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KimuraTakaumi/a03a69e322d6b2574e8991341b87ca15 to your computer and use it in GitHub Desktop.
Save KimuraTakaumi/a03a69e322d6b2574e8991341b87ca15 to your computer and use it in GitHub Desktop.
Botkitを使ってSlackの応答を返す
var Botkit = require('botkit');
var controller = Botkit.slackbot({
debug: false
});
controller.spawn({
token: process.env.token
}).startRTM();
// say techium
controller.hears('techium',['direct_message','direct_mention','mention'],function(bot,message) {
console.log(message);
bot.reply(message,'Hello, techium.');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment