Created
June 11, 2016 05:48
-
-
Save alvareztech/61b37ea11a7a75d12ca44586973310d8 to your computer and use it in GitHub Desktop.
Codelab: Mi primer bot para Slack. Modificación 1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Botkit = require('botkit') | |
var controller = Botkit.slackbot({debug: false}) | |
controller | |
.spawn({ | |
token: 'your-slack-token' // Edit this line! | |
}) | |
.startRTM(function (err) { | |
if (err) { | |
throw new Error(err) | |
} | |
}) | |
controller.hears( | |
['hola'], ['direct_message', 'direct_mention', 'mention'], | |
function (bot, message) { bot.reply(message, 'Miauuu. :smile_cat:') }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment