This package has been deprecated

Author message:

Package broken out into @botbuildercommunity/adapter-console

@botbuildercommunity/adapters
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

Adapters

This library contains additional adapters to use with the Microsoft Bot Framework.

Installation

To install:

npm install @botbuildercommunity/adapters --save

Usage

Each adapter can be used in much the same way, as its structure is inherited from the base adapter in the Bot Framework.

Console Adapter

The console adapter lets you create a chatbot that works from the command line. This was built-in functionality in SDK v3, but was absent from the SDK v4 library. The console bot is limited in which functionality it can implement from the base adapter.

Include it in your bot:

import { ConsoleAdapter } from "@botbuildercommunity/adapters";

Create the adapter:

const adapter: ConsoleAdapter = new ConsoleAdapter();

Listen for activities:

adapter.processActivity(async (context: TurnContext) => {
    ...
});

From there you can pass the context to your bot logic's onTurn() method.

Package Sidebar

Install

npm i @botbuildercommunity/adapters

Weekly Downloads

2

Version

0.2.5

License

MIT

Unpacked Size

17.7 kB

Total Files

13

Last publish

Collaborators

  • jamesemann
  • cloudguy_pro
  • imick