{"action":"created","issue":{"url":"https://api.github.com/repos/qhduan/wechaty-doc/issues/20","repository_url":"https://api.github.com/repos/qhduan/wechaty-doc","labels_url":"https://api.github.com/repos/qhduan/wechaty-doc/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/qhduan/wechaty-doc/issues/20/comments","events_url":"https://api.github.com/repos/qhduan/wechaty-doc/issues/20/events","html_url":"https://github.com/qhduan/wechaty-doc/issues/20","id":340484768,"node_id":"MDU6SXNzdWUzNDA0ODQ3Njg=","number":20,"title":"wechaty类","user":{"login":"windmemory","id":6801292,"node_id":"MDQ6VXNlcjY4MDEyOTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6801292?v=4","gravatar_id":"","url":"https://api.github.com/users/windmemory","html_url":"https://github.com/windmemory","followers_url":"https://api.github.com/users/windmemory/followers","following_url":"https://api.github.com/users/windmemory/following{/other_user}","gists_url":"https://api.github.com/users/windmemory/gists{/gist_id}","starred_url":"https://api.github.com/users/windmemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windmemory/subscriptions","organizations_url":"https://api.github.com/users/windmemory/orgs","repos_url":"https://api.github.com/users/windmemory/repos","events_url":"https://api.github.com/users/windmemory/events{/privacy}","received_events_url":"https://api.github.com/users/windmemory/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"windmemory","id":6801292,"node_id":"MDQ6VXNlcjY4MDEyOTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6801292?v=4","gravatar_id":"","url":"https://api.github.com/users/windmemory","html_url":"https://github.com/windmemory","followers_url":"https://api.github.com/users/windmemory/followers","following_url":"https://api.github.com/users/windmemory/following{/other_user}","gists_url":"https://api.github.com/users/windmemory/gists{/gist_id}","starred_url":"https://api.github.com/users/windmemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windmemory/subscriptions","organizations_url":"https://api.github.com/users/windmemory/orgs","repos_url":"https://api.github.com/users/windmemory/repos","events_url":"https://api.github.com/users/windmemory/events{/privacy}","received_events_url":"https://api.github.com/users/windmemory/received_events","type":"User","site_admin":false},"assignees":[{"login":"windmemory","id":6801292,"node_id":"MDQ6VXNlcjY4MDEyOTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6801292?v=4","gravatar_id":"","url":"https://api.github.com/users/windmemory","html_url":"https://github.com/windmemory","followers_url":"https://api.github.com/users/windmemory/followers","following_url":"https://api.github.com/users/windmemory/following{/other_user}","gists_url":"https://api.github.com/users/windmemory/gists{/gist_id}","starred_url":"https://api.github.com/users/windmemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windmemory/subscriptions","organizations_url":"https://api.github.com/users/windmemory/orgs","repos_url":"https://api.github.com/users/windmemory/repos","events_url":"https://api.github.com/users/windmemory/events{/privacy}","received_events_url":"https://api.github.com/users/windmemory/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-12T04:25:21Z","updated_at":"2018-07-12T06:54:04Z","closed_at":null,"author_association":"COLLABORATOR","body":"- [x] If you want to know how to send message, see Message If you want to knwo how to get contact, see Contact\r\nshould be two lines\r\n\r\n- [x] `wechaty.on(event, listener)` section, Returns: Wechaty -- this is for chain.\r\nbetter to have an example to show how to chain.\r\n\r\n- [ ] Example code section's title should explains a little what this example does, or at least tell the user that is the example for. \r\n\r\n- [x] `wechaty.init()` is deprecated, we should tell user which one to replace this. Maybe add `use start instead`.\r\n\r\n- [x] `wechaty.start()` Maybe we could reminds the user that most of the bot operation needs to be triggered after `start()` is done\r\n\r\n- [x] instance example is still using `init()`, should be replaced by `start()`"},"comment":{"url":"https://api.github.com/repos/qhduan/wechaty-doc/issues/comments/404408822","html_url":"https://github.com/qhduan/wechaty-doc/issues/20#issuecomment-404408822","issue_url":"https://api.github.com/repos/qhduan/wechaty-doc/issues/20","id":404408822,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDQwODgyMg==","user":{"login":"windmemory","id":6801292,"node_id":"MDQ6VXNlcjY4MDEyOTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6801292?v=4","gravatar_id":"","url":"https://api.github.com/users/windmemory","html_url":"https://github.com/windmemory","followers_url":"https://api.github.com/users/windmemory/followers","following_url":"https://api.github.com/users/windmemory/following{/other_user}","gists_url":"https://api.github.com/users/windmemory/gists{/gist_id}","starred_url":"https://api.github.com/users/windmemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windmemory/subscriptions","organizations_url":"https://api.github.com/users/windmemory/orgs","repos_url":"https://api.github.com/users/windmemory/repos","events_url":"https://api.github.com/users/windmemory/events{/privacy}","received_events_url":"https://api.github.com/users/windmemory/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T06:54:04Z","updated_at":"2018-07-12T06:54:04Z","author_association":"COLLABORATOR","body":"```\r\nReturn the type of: Wechaty - this is for chaining, see advanced [chaining usage](link-to-chaining-page)\r\n```\r\n\r\n### Page in somewhere, maybe FAQ or Other\r\n```\r\nMethod chaining, also known as named parameter idiom, is a common syntax for invoking multiple method calls in object-oriented programming languages. Each method returns an object, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results. [More info](https://en.wikipedia.org/wiki/Method_chaining)\r\n\r\n`Wechaty` class support method chaining, you could write code like this:\r\n``\r\nconst { Wechaty } = require('wechaty')\r\nconst bot = new Wechaty()\r\n.on('scan', (qrcode, status) =>  {})\r\n.on('login', user => {})\r\n.on('message', message => {})\r\n.start()\r\n``\r\n```"}}
{"actor":{"display_login":"windmemory"}}