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:
- the v3.0 branch, or
- 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:
- 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
- Package name was rename to
botbuilder-wechaty-adapter
from botbuilder-wechaty-connect
for following the v4 naming style.
v3.0 (Jan 11, 2018)
Release botbuilder-wechaty-adapter@3.0
for BotBuilder v3
- Work with Microsoft Bot Framework v3
- Skip messages from other than a individual account(like official account, and SYS message)
- Refactoring all the code from
ConsoleConnector
v0.0.1 (Apr 17, 2018)
- Working with Wechaty Individual Text Messages.
- An example run by
npm run example
TODO
AUTHOR
Huan LI <zixia@zixia.net>
COPYRIGHT & LICENSE
- Code & Docs © 2016-2019 Huan LI <zixia@zixia.net>
- Code released under the Apache-2.0 License
- Docs released under Creative Commons