Slack middleware for Microsoft BotBuilder.
This middleware was created at Suttna to tackle some of the limitations of BotFramework's current text parser.
yarn add botbuilder-markdown
import * as restify from 'restify'
import { UniversalBot, IEvent, IIdentity } from "botbuilder"
import { ChatConnector } from "botbuilder"
import { markdownMiddleware } from "botbuilder-markdown"
const connector = new ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
})
const bot = new UniversalBot(connector)
const server = restify.createServer()
server.listen(3000, () => {
console.log("Bot is listening...")
})
// You just need to add the middleware and then you will be able to send/receive messages with markdown
bot.use(markdownMiddleware)
bot.dialog('/', (session) => {
session.endDialog('pong')
})
server.post('/api/messages', connector.listen())
If you want to help on improving this package, please contact us at [email protected].
- Martín Ferández [email protected]
- Santiago Doldán [email protected]