Skip to content

Convert markdown to channel specific format. Pluggable middleware.

Notifications You must be signed in to change notification settings

suttna/botbuilder-markdown

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e9bc20d · Dec 26, 2024

History

44 Commits
Nov 22, 2017
Nov 22, 2017
Oct 10, 2017
Oct 10, 2017
Dec 2, 2017
Oct 10, 2017
Oct 10, 2017
Oct 10, 2017
Oct 10, 2017
Dec 26, 2024
Dec 28, 2017
Oct 10, 2017
Oct 10, 2017
Dec 26, 2024

Repository files navigation

Logo

botbuilder-markdown npm version CircleCI codecov Join the chat at https://gitter.im/suttna/botbuilder-markdown

⚠️ This is under development. If you want to help 🚀, please contact the Suttna team at opensource@suttna.om

Slack middleware for Microsoft BotBuilder.

This middleware was created at Suttna to tackle some of the limitations of BotFramework's current text parser.

Install

yarn add botbuilder-markdown

Usage

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())

Help

If you want to help on improving this package, please contact us at opensource@suttna.com.

Contact