Skip to content

Instantly share code, notes, and snippets.

@yrezgui
Created December 1, 2016 14:33
Show Gist options
  • Save yrezgui/6fcb09ec648c0718d2033ffb0f0bde30 to your computer and use it in GitHub Desktop.
Save yrezgui/6fcb09ec648c0718d2033ffb0f0bde30 to your computer and use it in GitHub Desktop.
const Botmaster = require('botmaster');
const MessengerBot = Botmaster.botTypes.MessengerBot;
const botmaster = new Botmaster();
const slackBot = new SlackBot({
credentials: {
clientId: process.env.SLACK_CLIENT_ID,
clientSecret: process.env.SLACK_CLIENT_SECRENT,
verificationToken: process.env.SLACK_VERIFICATION_TOKEN
},
webhookEndpoint: '/webhook'
});
botmaster.addBot(slackBot);
botmaster.on('update', (bot, update) => {
bot.reply(update, 'Right back at you');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment