Skip to content

Instantly share code, notes, and snippets.

@yrezgui
Created December 3, 2016 09:24
Show Gist options
  • Save yrezgui/065cb0bb3624f3c3689c862de09aaf97 to your computer and use it in GitHub Desktop.
Save yrezgui/065cb0bb3624f3c3689c862de09aaf97 to your computer and use it in GitHub Desktop.
Botmaster starting script
// See documentation here: https://botmasterai.github.io/home
const Botmaster = require('botmaster');
const SlackBot = Botmaster.botTypes.SlackBot;
const SLACK_SETTINGS = {
credentials: {
clientId: process.env.SLACK_CLIENT_ID,
clientSecret: process.env.SLACK_CLIENT_SECRET,
verificationToken: process.env.SLACK_VERIFICATION_TOKEN
},
webhookEndpoint: process.env.SLACK_WEBHOOK_ENDPOINT
};
const botmaster = new Botmaster();
const slackBot = new SlackBot(SLACK_SETTINGS);
botmaster.addBot(slackBot);
botmaster.on('update', (bot, update) => {
bot.reply(update, 'Hello world');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment