initial commit
This commit is contained in:
commit
20ddf9fe43
13
jonbot.js
Normal file
13
jonbot.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
var Botkit = require('botkit');
|
||||||
|
var controller = Botkit.slackbot();
|
||||||
|
var bot = controller.spawn({
|
||||||
|
token: process.argv[2]
|
||||||
|
})
|
||||||
|
bot.startRTM(function(err,bot,payload) {
|
||||||
|
if (err) {
|
||||||
|
throw new Error('Could not connect to Slack');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
controller.hears(["jonbot?","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) {
|
||||||
|
bot.reply(message,':clap: JOOOOON! :clap:');
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user