Created
December 3, 2016 09:24
-
-
Save yrezgui/065cb0bb3624f3c3689c862de09aaf97 to your computer and use it in GitHub Desktop.
Botmaster starting script
This file contains hidden or 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
| // 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