提交 f3068a7c 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

doc example

上级 de9036bb
......@@ -45,13 +45,13 @@ Notice that you need to wait a moment while bot trys to get the login QRCode fro
After that, bot will be on duty. (roger-bot source can be found at [here](https://github.com/zixia/wechaty/blob/master/example/roger-bot.js))
## 2. Advanced: 50 lines
There's another basic usage demo bot named [ding-dong-bot](https://github.com/zixia/wechaty/blob/master/example/ding-dong-bot.js), who can reply _dong_ when bot receives a message _ding_.
## 2. Advanced: dozens of lines
Here's an chatbot [ding-dong-bot](https://github.com/zixia/wechaty/blob/master/example/ding-dong-bot.js) who can reply _dong_ when receives a message _ding_.
## 3. Hardcore: 100 lines
To Be Written.
## 3. Hardcore: hundreds of lines
Here's a chatbot [api-ai-bot](https://github.com/zixia/wechaty/blob/master/example/api-ai-bot.js), who can slightly understand NLP.
Plan to glue with Machine Learning/Deep Learning/Neural Network/Natural Language Processing.
Natual Language Understanding enabled by [api.AI](https://api.ai), you can get your module on api.AI by it's free plan.
# Installation
......
......@@ -112,7 +112,7 @@ class Bridge {
)
).toString('base64')
// see: http://blog.sqrtthree.com/2015/08/29/utf8-to-b64/
const argsDecoded = `JSON.parse(decodeURIComponent(atob('${argsEncoded}')))`
const argsDecoded = `JSON.parse(decodeURIComponent(window.atob('${argsEncoded}')))`
const wechatyScript = `return (Wechaty && Wechaty.${wechatyFunc}.apply(undefined, ${argsDecoded}))`
log.silly('Bridge', 'proxyWechaty: ' + wechatyScript)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册