-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from BotBuilderCommunity/v1
Merge v1
- Loading branch information
Showing
16 changed files
with
1,726 additions
and
262 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/lib | ||
/node_modules | ||
/.vscode |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.0.0] - 2019-??-?? | ||
### Added | ||
- First release of Console adapter |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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. | ||
|
||
## Installation | ||
To install: | ||
|
||
npm install @botbuildercommunity/adapter-console --save | ||
|
||
## Usage | ||
Include it in your bot: | ||
|
||
```typescript | ||
import { ConsoleAdapter } from "@botbuildercommunity/adapter-console"; | ||
``` | ||
Create the adapter: | ||
```typescript | ||
const adapter: ConsoleAdapter = new ConsoleAdapter(); | ||
``` | ||
|
||
Listen for activities: | ||
```typescript | ||
adapter.processActivity(async (context: TurnContext) => { | ||
... | ||
}); | ||
``` | ||
|
||
From there you can pass the `context` to your bot logic's `onTurn()` method. |
Oops, something went wrong.