Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Codelab: Mi primer bot para Slack. Modificación 1.
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