/botbuilder-wechaty-adapter

Microsoft Bot Framework v4 Adapter for Wechat Individual Account

Primary LanguageTypeScriptApache License 2.0Apache-2.0

BOTBUILDER-WECHATY-ADAPTER

npm version npm (tag) Powered by Wechaty TypeScript

Build Status Build Status

BotBuilder Wechaty Adapter

Source: Time to do it differently, build chatbots with streams

Microsoft Bot Framework v4 adapter for Wechat Individual Account

If you are finding the Bot Framework v3 version of this adapter, please goto:

  1. the v3.0 branch, or
  2. NPM botbuilder-wechaty-connecter@3

FEATURES

  • Ready for Microsoft Bot Framework v4
  • no need a registered bot on dev.botframework.com, but require a wechat individual(NOT official!) account.
  • Powered by wechaty
  • Support receiving and sending almost any wechat message types(WIP)

INSTALLATION

npm install botbuilder-wechaty-adapter

Preparation

We assume that, you already have a wechat individual account.

Usage

Step 1, create your wechaty adapter:

import { WechatyAdapter } from "botbuilder-wechaty-adapter"

const adapter = new WechatyAdapter()

Step 2, start listening your wechaty adapter:

const closeFn = await adapter.listen(async (context: TurnContext) => {
  // ...
})

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

Attachment

To Be Supported.

EXAMPLE

An example is located at examples/ directory. Using following command to run it.

npm run example

THANKS

This package is greatly inspired by:

  1. BotBuilder v4 - BotBuilderCommunity/botbuilder-community-js/botbuilder-adapters

ISSUES

Please feel free to open issues, if you have any suggestion.

SEE ALSO

CHANGELOG

v4.0 master

Upgrade to Microsoft BotBuilder v4

  1. Package name was rename to botbuilder-wechaty-adapter from botbuilder-wechaty-connect for following the v4 naming style.

v3.0 Jan 11, 2019

Release botbuilder-wechaty-adapter@3.0 for BotBuilder v3

  1. Work with Microsoft Bot Framework v3
  2. Skip messages from other than a individual account(like official account, and SYS message)
  3. Refactoring all the code from ConsoleConnector

v0.0.1 Apr 17, 2018

  1. Working with Wechaty Individual Text Messages.
  2. An example run by npm run example

TODO

  • Add Room Message Support
  • Add Full Message Types Support(current we only support text messages)

AUTHOR

Huan LI <zixia@zixia.net>, who is recognized as both Microsoft Regional Director (RD) and Microsoft Most Valuable Professional (MVP) from Microsoft.

profile for zixia on Stack Exchange, a network of free, community-driven Q&A sites

COPYRIGHT & LICENSE

  • Code & Docs © 2016-2019 Huan LI <zixia@zixia.net>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons