botbuilder-slack-extension
Slack extension for Microsoft BotBuilder.
This extension will listen for missing (in BotBuilder slack connector) events.
The following events are allowed and need to be configured in slack:
Note: You need to manually add the events in this page: https://api.slack.com/apps/:APP_ID/event-subscriptions
conversationUpdate
- channel_archive
- channel_created
- channel_deleted
- channel_rename
- channel_unarchive
- group_archive
- group_rename
- group_unarchive
installationUpdate
- app_uninstalled
slackCommand
You can listen for slack commands. Commands will be sent as custom events with type slackCommand
. Event
information will be sent under sourceEvent => SlackMessage
.
Install
yarn add botbuilder-slack-extension
Usage
The extension will listen for the previously listed slack events and forward them as conversationUpdate
events.
This means you can use:
bot bot
To configure the extension you simply need to create a listener and hook it in your restify server.
var restify = var builder = var SlackEventListener = var connector = var bot = connector // SlackEventListener take two arguments, the chat connector and a lookup function for your bot.// The lookup function must return a promise with an object that conforms to IIdentityvar slackEventListener = connector { return { // This is you custom get function const bot = return id: botid name: botname }} // Start listenting for botbuilder eventsserver // Start listenting for direct slack eventsserver // Start listenting for slack commandsserver
Contact
- Martín Ferández martin@suttna.com
- Santiago Doldán santiago@suttna.com