README.md 17.4 KB
Newer Older
1
[![Wechaty](https://raw.githubusercontent.com/chatie/wechaty/master/image/wechaty-logo-en.png)](https://github.com/chatie/wechaty)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
2

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
3
# Wechaty 
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
4

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
5
## Connecting ChatBots.
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
6

7
Wechaty is a Bot Framework for Wechat **Personal** Account which can help you create a bot in 6 lines of javascript by easy to use API, with cross-platform support include [Linux](https://travis-ci.org/chatie/wechaty), [Windows](https://ci.appveyor.com/project/chatie/wechaty), [Darwin(OSX/Mac)](https://travis-ci.org/chatie/wechaty) and [Docker](https://circleci.com/gh/chatie/wechaty).
8

9
[![Join the chat at https://gitter.im/zixia/wechaty](https://badges.gitter.im/zixia/wechaty.svg)](https://gitter.im/zixia/wechaty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![node](https://img.shields.io/node/v/wechaty.svg?maxAge=604800)](https://nodejs.org/) [![Repo Size](https://reposs.herokuapp.com/?path=Chatie/wechaty)](https://github.com/chatie/wechaty) [![Issue Stats](http://issuestats.com/github/chatie/wechaty/badge/pr)](http://issuestats.com/github/chatie/wechaty) [![Issue Stats](http://issuestats.com/github/chatie/wechaty/badge/issue)](http://issuestats.com/github/chatie/wechaty)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
10

11 12 13
:octocat: <https://github.com/chatie/wechaty>  
:beetle: <https://github.com/chatie/wechaty/issues>  
:book: <https://github.com/chatie/wechaty/wiki>  
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
14
:whale: <https://hub.docker.com/r/zixia/wechaty>  
15 16

## Voice of the Developer
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
17

18
> "Wechaty is a great solution, I believe there would be much more users recognize it." [link](https://github.com/chatie/wechaty/pull/310#issuecomment-285574472)  
19 20
> -- @Gcaufy, Tencent 

21
> "The best wechat SDK I have seen in Github!" [link](https://github.com/chatie/wechaty/issues/8#issuecomment-228971491)  
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
22
> -- @JasLin, BotWave CTO
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
23

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
24 25
> "Wechaty简单的接口...和Docker化的封装...绝对是一个不错的选择" [link](http://mp.weixin.qq.com/s/o-4VMcAMz0K8yJVdNaUXow)  
> -- @shevyan, Ghost Cloud CEO
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
26

27
> "Wechaty is great." [link](https://github.com/chatie/wechaty/issues/36#issuecomment-251708382)  
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
28
> -- @Samurais, SnapLingo Director of Engineering
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
29

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
30
> "最好的微信开发库" [link](http://weibo.com/3296245513/Ec4iNp9Ld?type=comment)  
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
31
> -- @Jarvis, Baidu Developer
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
32

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
33
> "Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" [link](http://mp.weixin.qq.com/s/dWHAj8XtiKG-1fIS5Og79g)  
34
> -- @lijiarui, Orange Interactive CEO.
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
35

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
36 37
> "太好用,好用的想哭" -- @xinbenlv, Google Engineer, HaoShiYou.org Founder

38
> "Wechaty library fantastic!" [link](https://github.com/chatie/wechaty/issues/9) - @ccaapton 
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
39

40
> "it's quite cool!" [link](https://github.com/chatie/wechaty/issues/4) - @ak5
41

42
> "Thanks for great SDK" [link](https://github.com/chatie/wechaty/issues/57) - @naishstar
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
43

44
> "Your docker solution is awesome!" [link](https://github.com/chatie/wechaty/issues/164#issuecomment-278633203) - @ax4 
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
45

46 47
> "If you know js ... try Chatie/wechaty, it's easy to use." @[Urinx](https://github.com/Urinx) Uri Lee, Author of [WeixinBot](https://github.com/Urinx/WeixinBot)

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
48
# The World's Shortest ChatBot Code: 6 lines of JavaScript
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
49

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
50
```javascript
51
const { Wechaty } = require('wechaty') // import Wechaty from 'wechaty'
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
52

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
53
Wechaty.instance() // Singleton
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
54
.on('scan', (url, code) => console.log(`Scan QR Code to login: ${code}\n${url}`))
55 56
.on('login',       user => console.log(`User ${user} logined`))
.on('message',  message => console.log(`Message: ${message}`))
57
.init()
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
58
```
59
> **Notice: Wechaty requires Node.js version >= 6.9.0**
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
60

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
61
This bot can log all message to console.
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
62

63
You can find more example from [Wiki](https://github.com/chatie/wechaty/wiki/Example) and [Example Directory](https://github.com/chatie/wechaty/blob/master/example/).
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
64

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
65 66
# Getting Started

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
67
## A Great Live Coding Tutorial
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
68 69

<div align="center">
70
<a target="_blank" href="https://blog.chatie.io/guide/2017/01/01/getting-started-wechaty.html"><img src="https://cloud.githubusercontent.com/assets/1361891/21722581/3ec957d0-d468-11e6-8888-a91c236e0ba2.jpg" border=0 width="60%"></a>
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
71 72
</div>

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
73
The above 10 minutes video tutorial is a good start point if you are new to Wechaty.
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
74

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
75 76
> Source code in the video can be found at here: [Wechaty Starter Repository](https://github.com/lijiarui/wechaty-getting-started)

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
77
## Run
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
78

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
79 80 81 82 83 84
Let's say, you have saved the above six lines javascript example to `mybot.js`.

We have two options to run wechaty:

1. Docker
1. NPM
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
85

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
86
### Docker
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
87 88

[![Docker Pulls](https://img.shields.io/docker/pulls/zixia/wechaty.svg?maxAge=2592000)](https://hub.docker.com/r/zixia/wechaty/) [![Docker Stars](https://img.shields.io/docker/stars/zixia/wechaty.svg?maxAge=2592000)](https://hub.docker.com/r/zixia/wechaty/) [![Docker Layers](https://images.microbadger.com/badges/image/zixia/wechaty.svg)](https://microbadger.com/#/images/zixia/wechaty)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
89

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
90 91
The **best practice** to use Wechaty is run by docker, becasue it's not only the most easy way to get start, but also protect you out of the troubles of dependencies problems. 

92
```shell
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
93
$ docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty mybot.js
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
94 95
```

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
96
> Wechaty Docker support to run TypeScript directly as well: just write in TypeScript and save to `mybot.ts`.
97

98
Get to know more about Wechaty Docker at [Wiki:Docker](https://github.com/chatie/wechaty/wiki/Docker).
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
99

Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
100
### NPM
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
101

102
[![NPM Version](https://badge.fury.io/js/wechaty.svg)](https://badge.fury.io/js/wechaty) [![Downloads][downloads-image]][downloads-url] [![Greenkeeper badge](https://badges.greenkeeper.io/Chatie/wechaty.svg)](https://greenkeeper.io/)
Huan (李卓桓)'s avatar
doc  
Huan (李卓桓) 已提交
103

104 105 106 107 108 109 110 111 112 113 114 115
```shell
$ npm install wechaty

$ cat > mybot.js <<'_EOF_'
const { Wechaty } = require('wechaty')
const bot = Wechaty.instance()
console.log(bot.version())
_EOF_

$ node mybot.js
```

116
Get to know more about NPM at [Wiki:NPM](https://github.com/chatie/wechaty/wiki/NPM)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
117

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
118
# Test
119

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
120
[![Linux/Mac Build Status](https://img.shields.io/travis/Chatie/wechaty.svg?label=Linux/Mac)](https://travis-ci.org/Chatie/wechaty) [![Windows Build status](https://img.shields.io/appveyor/ci/chatie/wechaty/master.svg?label=Windows)](https://ci.appveyor.com/project/chatie/wechaty) [![Docker CircleCI](https://img.shields.io/circleci/project/github/Chatie/wechaty/master.svg?label=Docker)](https://circleci.com/gh/Chatie/wechaty) [![Coverage Status](https://coveralls.io/repos/github/Chatie/wechaty/badge.svg?branch=master)](https://coveralls.io/github/Chatie/wechaty?branch=master) [![Known Vulnerabilities](https://snyk.io/test/github/chatie/wechaty/badge.svg)](https://snyk.io/test/github/chatie/wechaty)
121

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
122
Wechaty use [AVA](https://github.com/avajs/ava) for unit testing
123

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
124 125 126 127
To test Wechaty, run:
```shell
npm test
```
128

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
129
Get to know more about test from [Wiki:Test](https://github.com/chatie/wechaty/wiki/Test)
130

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
131
# API Reference
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
132

133
## [Wechaty Events](https://github.com/chatie/wechaty/wiki/API#event)
134

135 136 137 138 139 140 141 142 143
1. [scan](https://github.com/chatie/wechaty/wiki/API#1-event-scan) Emit when the bot needs to show you a QR Code for scanning
2. [login](https://github.com/chatie/wechaty/wiki/API#2-event-login) Emit when bot login full successful.
3. [logout](https://github.com/chatie/wechaty/wiki/API#3-event-logout) Emit when bot detected log out.
4. [message](https://github.com/chatie/wechaty/wiki/API#4-event-message) Emit when there's a new message.
5. [error](https://github.com/chatie/wechaty/wiki/API#5-event-error) Emit when there's an error occurred.
6. [friend](https://github.com/chatie/wechaty/wiki/API#6-event-friend) Emit when got a new friend request, or friendship is confirmed.
7. [room-join](https://github.com/chatie/wechaty/wiki/API#7-event-room-join) Emit when someone join the room
8. [room-leave](https://github.com/chatie/wechaty/wiki/API#8-event-room-leave) Emit when someone leave the room
9. [room-topic](https://github.com/chatie/wechaty/wiki/API#9-event-room-topic) Emit when someone change the room's topic
ruiruibupt's avatar
ruiruibupt 已提交
144

145
## [Wechaty](https://github.com/chatie/wechaty/wiki/API#wechaty-class)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
146

147 148 149
1. [instance(setting: PuppetSetting): Promise&lt;Wechaty&gt;](https://github.com/chatie/wechaty/wiki/API#wechatyinstanceprofilestring-wechaty) get the bot instance
2. [init(): Promise&lt;void&gt;](https://github.com/chatie/wechaty/wiki/API#wechatyinit-wechaty) Initialize the bot
4. [say(content: string): Promise&lt;void&gt;](https://github.com/chatie/wechaty/wiki/API#wechatysaycontent-string) send message to filehelper, just for logging/reporting usage for your convenience
ruiruibupt's avatar
ruiruibupt 已提交
150

151
## [Message](https://github.com/chatie/wechaty/wiki/API#message-class)
152

153 154 155 156 157 158 159 160 161 162 163
1. [from():Contact](https://github.com/chatie/wechaty/wiki/API#1-messagefrom-contact) get the sender from a message
2. [from(contact:Contact):void](https://github.com/chatie/wechaty/wiki/API#2-messagefromcontact-contact-void) set a sender to the message
4. [to():Contact](https://github.com/chatie/wechaty/wiki/API#1-messageto-contact) get the destination of the message
5. [to(contact:Contact):void](https://github.com/chatie/wechaty/wiki/API#2-messagetocontact-contact-void) set the destination as contact for the message
7. [content():string](https://github.com/chatie/wechaty/wiki/API#1-messagecontent-string) get the content of the message
8. [content(content:string):string](https://github.com/chatie/wechaty/wiki/API#2-messagecontentcontent-string-string) set the content for the message
9. [room():Room|null](https://github.com/chatie/wechaty/wiki/API#1-messageroom-room--null) get the room from a message.
10. [room(room:Room):void](https://github.com/chatie/wechaty/wiki/API#2-messageroomroom-room-void) set the room for a message.
12. [type():MsgType](https://github.com/chatie/wechaty/wiki/API#messagetype-number) get the type of a Message.
13. [say(content:string):Promise](https://github.com/chatie/wechaty/wiki/API#messagesaycontent-string-promise) reply a message to the sender.
15. [self():boolean](https://github.com/chatie/wechaty/wiki/API#messageselfmessage-message-boolean) check if a message is sent by self 
ruiruibupt's avatar
ruiruibupt 已提交
164

165
## [Contact](https://github.com/chatie/wechaty/wiki/API#contact-class)
ruiruibupt's avatar
ruiruibupt 已提交
166

167 168 169 170 171 172
2. [name():string](https://github.com/chatie/wechaty/wiki/API#contactname-string) get name from a contact
3. [remark():string](https://github.com/chatie/wechaty/wiki/API#contactremark-string) get remark name from a contact
4. [remark(remark:string):Promise](https://github.com/chatie/wechaty/wiki/API#contactremarkremark-string-promise) set remark name to a contact
5. [weixin():string](https://github.com/chatie/wechaty/wiki/API#contactweixin-string) get weixin id from a contact
6. [star():boolean](https://github.com/chatie/wechaty/wiki/API#contactstar-boolean) true for star friend, false for no star friend
8. [say(content:string):Promise](https://github.com/chatie/wechaty/wiki/API#contactsaycontent-string-promise) say content to a contact
ruiruibupt's avatar
ruiruibupt 已提交
173

174
## [Room](https://github.com/chatie/wechaty/wiki/API#class-room)
Huan (李卓桓)'s avatar
doc #44  
Huan (李卓桓) 已提交
175

176 177
1. [say(content:string,replyTo:Contact|ContactArray):Promise](https://github.com/chatie/wechaty/wiki/API#roomsaycontent-string-replyto-contactcontact-promise) say content inside Room.
3. [refresh():Promise](https://github.com/chatie/wechaty/wiki/API#roomrefresh-promise) reload data for Room
ruiruibupt's avatar
ruiruibupt 已提交
178

179
### [Room Event](https://github.com/chatie/wechaty/wiki/API#room-events)
180

181 182 183
1. [join](https://github.com/chatie/wechaty/wiki/API#event-join) Emit when someone join the room
2. [leave](https://github.com/chatie/wechaty/wiki/API#event-leave) Emit when someone leave the room
3. [topic](https://github.com/chatie/wechaty/wiki/API#event-topic) Emit when someone change the room topic
ruiruibupt's avatar
ruiruibupt 已提交
184

185
## [FriendRequest](https://github.com/chatie/wechaty/wiki/API#class-friendrequest)
ruiruibupt's avatar
ruiruibupt 已提交
186

187 188 189
1. [hello:string](https://github.com/chatie/wechaty/wiki/API#friendrequesthello-string) get content from friendrequest
2. [accept():Promise](https://github.com/chatie/wechaty/wiki/API#friendrequestaccept-void) accept the friendrequest
3. [send(contact:Contact,hello:string):Promise](https://github.com/chatie/wechaty/wiki/API#friendrequestsendcontact-contact-hello-string-void) send a new friend request
ruiruibupt's avatar
ruiruibupt 已提交
190

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
191
# Release Notes
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
192

193 194
* [Latest Release](https://github.com/chatie/wechaty/releases/latest)(All releases [here](https://github.com/chatie/wechaty/releases))
* [Changelog](https://github.com/chatie/wechaty/blob/master/CHANGELOG.md)
Huan (李卓桓)'s avatar
readme  
Huan (李卓桓) 已提交
195

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
196
# Powered By Wechaty
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
197

198
[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-green.svg)](https://github.com/chatie/wechaty)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
199

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
200
## Wechaty Badge
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
201

202
Get embed html/markdown code from [Wiki:PoweredByWechaty](https://github.com/chatie/wechaty/wiki/PoweredByWechaty)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
203

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
204 205 206 207 208 209 210 211 212 213 214 215
## Find a Good Server

The best practice for runing Wechaty Docker/NPM is using a VPS(Virtual Private Server) outside of China, which can save you hours of time because `npm install` and `docker pull` will run smoothly without any problem. 

The following VPS providers is used by ourselves, they worked perfectly in production. You can use the following link to get one in minutes, and also do this can support Wechaty because you are refered by us.

| Location  | Price | Ram     | Payment           | Provider |
| ---       | ---   | ---     | ---               | ---      |
| Singapore | $5    | 512MB   | Paypal            | [DigitalOcean](https://m.do.co/c/01a54778df5c) |
| Japan     | $5    | 1GB     | Paypal            | [Linode](https://www.linode.com/?r=5fd2b713d711746bb5451111df0f2b6d863e9f63) |
| Korea     | $10   | 1GB     | Alipay, Paypal    | [Netdedi](https://www.netdedi.com/?affid=35) |

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
216
## Projects Use Wechaty
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
217

218 219 220 221
1. [Relay between Telegram and WeChat](https://github.com/Firaenix/TeleChatRelay)
1. [A chat bot managing the HaoShiYou wechat groups run by volunteers of haoshiyou.org](https://github.com/xinbenlv/haoshiyou-bot)
1. [A chat interactive bot to manage TODO list](https://github.com/coderbunker/candobot)
1. [Forward WeChat messages to telegram](https://github.com/luosheng/Wegram)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
222

223
Know more about Projects Use Wechaty at [Wiki:PoweredByWechaty](https://github.com/chatie/wechaty/wiki/PoweredByWechaty)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
224

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
225
# Contributing
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
226

227
Howto [contribute](https://github.com/chatie/wechaty/blob/master/CONTRIBUTING.md)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
228

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
Contributions in any form are highly encouraged and welcome! Be it new or improved presets, optimized streaming code or just some cleanup. So start forking!

## Code Contributions

If you want to add new features or change the API, please submit an issue first to make sure no one else is already working on the same thing and discuss the implementation and API details with maintainers and users by creating an issue. When everything is settled down, you can submit a pull request.

When fixing bugs, you can directly submit a pull request.

Make sure to add tests for your features and bugfixes and update the documentation (see below) before submitting your code!

## Documentation Contributions

You can directly submit pull requests for documentation changes.

## Main Contributors

* [JasLin](https://github.com/JasLin)
* [cherry-geqi](https://github.com/cherry-geqi)
* [lijiarui](https://github.com/lijiarui)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
248
* [xinbenlv](https://github.com/xinbenlv)
249
* [Gcaufy](https://github.com/Gcaufy)
L
lijiarui 已提交
250
* [mukaiu](https://github.com/mukaiu)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
251

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
252
## Join Wechaty Developers' Community
ruiruibupt's avatar
ruiruibupt 已提交
253

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
254
Wechaty is used in many ChatBot projects by hundreds of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code _wechaty_, you can join our **Wechaty Developers' Home** at once.
ruiruibupt's avatar
ruiruibupt 已提交
255

256
![Wechaty Developers' Home](https://raw.githubusercontent.com/chatie/wechaty/master/image/BotQrcode.png)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
257

258
Scan now, because other Wechaty developers want to talk with you too! (secret code: _wechaty_)
ruiruibupt's avatar
ruiruibupt 已提交
259

260
# See Also
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
261

262
* [RelatedProject](https://github.com/chatie/wechaty/wiki/RelatedProject)
263

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
264 265 266
# Todo

* [ ] Use Dependency Injection for FriendRequest(etc)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
267
  - [Typescript dependency injection container for Humans!](https://github.com/asvetliakov/Huject)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
268 269 270
  - https://github.com/young-steveo/bottlejs
  - http://jonnyreeves.co.uk/2015/basic-typescript-dependency-injection-with-decorators/
  - https://github.com/connorwyatt/Fluency-Injection
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
271 272
* [ ] Use Observable for Throttle API Call Rate with Server
  - http://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
273
* [ ] [Generating Documentation for TypeScript Projects](https://blog.cloudflare.com/generating-documentation-for-typescript-projects/)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
274

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
275 276 277
Documentation
-------------

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
278
In order to sync the doc with the lastest code for best, Wechaty use [jsdoc](http://usejsdoc.org/) to descript API, and use [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown/wiki) to generate markdown format document to [docs](docs/index.md) directory.
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
279

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
280
My Story
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
281
--------
282
My daily life/work depends on too much chat on wechat.
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
283
* I almost have 14,000 wechat friends in May 2014, before wechat restricts a total number of friends to 5,000.
284 285 286 287
* I almost have 400 wechat rooms that most of them have more than 400 members.

Can you image that? I'm dying...

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
288
So a tireless bot working for me 24x7 on wechat, monitoring/filtering the most important message is badly needed. For example highlights discussion which contains the KEYWORDS which I want to follow up(especially in a noisy room). ;-)
289 290 291

At last, It's built for my personal study purpose of Automatically Testing.

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
292
Author
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
293
------
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
294
Huan LI <zixia@zixia.net> (http://linkedin.com/in/zixia)
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
295 296

<a href="http://stackoverflow.com/users/1123955/zixia">
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
297
  <img src="http://stackoverflow.com/users/flair/1123955.png" width="208" height="58" alt="profile for zixia at Stack Overflow, Q&amp;A for professional and enthusiast programmers" title="profile for zixia at Stack Overflow, Q&amp;A for professional and enthusiast programmers">
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
298 299 300 301
</a>

Copyright & License
-------------------
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
302
* Code & Docs 2016-2017© zixia
Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
303 304
* Code released under the ISC license
* Docs released under Creative Commons
305

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
306
[downloads-image]: http://img.shields.io/npm/dm/wechaty.svg?style=flat-square
307
[downloads-url]: https://npmjs.org/package/wechaty