Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wechaty
wechaty
提交
3f3785c8
W
wechaty
项目概览
wechaty
/
wechaty
上一次同步 大约 3 年
通知
304
Star
10499
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
152
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wechaty
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
152
Issue
152
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3f3785c8
编写于
3月 13, 2018
作者:
Huan (李卓桓)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename Example to Examples and update docs (
#1127
)
上级
80d8f94f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
17 deletion
+17
-17
docs/index.md
docs/index.md
+11
-11
src/contact.ts
src/contact.ts
+1
-1
src/friend-request.ts
src/friend-request.ts
+1
-1
src/message.ts
src/message.ts
+2
-2
src/room.ts
src/room.ts
+1
-1
src/wechaty.ts
src/wechaty.ts
+1
-1
未找到文件。
docs/index.md
浏览文件 @
3f3785c8
# Wechaty v0.13.
79
Documentation
# Wechaty v0.13.
80
Documentation
*
https://blog.chatie.io
## Classes
...
...
@@ -7,7 +7,7 @@
<dt><a
href=
"#Contact"
>
Contact
</a></dt>
<dd><p>
All wechat contacts(friend) will be encapsulated as a Contact.
</p>
<p><code>
Contact
</code>
is
<code>
Sayable
</code>
,
<a
href=
"https://github.com/Chatie/wechaty/blob/master/example
/contact-bot.ts"
>
Example
/Contact-Bot
</a></p>
<a
href=
"https://github.com/Chatie/wechaty/blob/master/example
s/contact-bot.ts"
>
Examples
/Contact-Bot
</a></p>
</dd>
<dt><a
href=
"#FriendRequest"
>
FriendRequest
</a></dt>
<dd><p>
Send, receive friend request, and friend confirmation events.
</p>
...
...
@@ -16,12 +16,12 @@
<li>
receive request(in friend event)
</li>
<li>
confirmation friendship(friend event)
</li>
</ol>
<p><a
href=
"https://github.com/Chatie/wechaty/blob/master/example
/friend-bot.ts"
>
Example
/Friend-Bot
</a></p>
<p><a
href=
"https://github.com/Chatie/wechaty/blob/master/example
s/friend-bot.ts"
>
Examples
/Friend-Bot
</a></p>
</dd>
<dt><a
href=
"#Message"
>
Message
</a></dt>
<dd><p>
All wechat messages will be encapsulated as a Message.
</p>
<p><code>
Message
</code>
is
<code>
Sayable
</code>
,
<a
href=
"https://github.com/Chatie/wechaty/blob/master/example
/ding-dong-bot.ts"
>
Example
/Ding-Dong-Bot
</a></p>
<a
href=
"https://github.com/Chatie/wechaty/blob/master/example
s/ding-dong-bot.ts"
>
Examples
/Ding-Dong-Bot
</a></p>
</dd>
<dt><a
href=
"#MediaMessage"
>
MediaMessage
</a></dt>
<dd><p>
Meidia Type Message
</p>
...
...
@@ -29,7 +29,7 @@
<dt><a
href=
"#Room"
>
Room
</a></dt>
<dd><p>
All wechat rooms(groups) will be encapsulated as a Room.
</p>
<p><code>
Room
</code>
is
<code>
Sayable
</code>
,
<a
href=
"https://github.com/Chatie/wechaty/blob/master/example
/room-bot.ts"
>
Example
/Room-Bot
</a></p>
<a
href=
"https://github.com/Chatie/wechaty/blob/master/example
s/room-bot.ts"
>
Examples
/Room-Bot
</a></p>
</dd>
<dt><a
href=
"#Wechaty"
>
Wechaty
</a></dt>
<dd><p>
Main bot class.
</p>
...
...
@@ -69,7 +69,7 @@
All wechat contacts(friend) will be encapsulated as a Contact.
`Contact`
is
`Sayable`
,
[
Example
/Contact-Bot
](
https://github.com/Chatie/wechaty/blob/master/example
/contact-bot.ts
)
[
Example
s/Contact-Bot
](
https://github.com/Chatie/wechaty/blob/master/examples
/contact-bot.ts
)
**Kind**
: global class
...
...
@@ -347,7 +347,7 @@ Send, receive friend request, and friend confirmation events.
2.
receive request(in friend event)
3.
confirmation friendship(friend event)
[
Example
/Friend-Bot
](
https://github.com/Chatie/wechaty/blob/master/example
/friend-bot.ts
)
[
Example
s/Friend-Bot
](
https://github.com/Chatie/wechaty/blob/master/examples
/friend-bot.ts
)
**Kind**
: global class
...
...
@@ -387,7 +387,7 @@ Accept a friend request
All wechat messages will be encapsulated as a Message.
`Message`
is
`Sayable`
,
[
Example
/Ding-Dong-Bot
](
https://github.com/Chatie/wechaty/blob/master/example
/ding-dong-bot.ts
)
[
Example
s/Ding-Dong-Bot
](
https://github.com/Chatie/wechaty/blob/master/examples
/ding-dong-bot.ts
)
**Kind**
: global class
...
...
@@ -415,7 +415,7 @@ All wechat messages will be encapsulated as a Message.
Reply a Text or Media File message to the sender.
**Kind**
: instance method of
[
<code>Message</code>
](
#Message
)
**See**
:
[
Example
/ding-dong-bot
](
https://github.com/Chatie/wechaty/blob/master/example
/ding-dong-bot.ts
)
**See**
:
[
Example
s/ding-dong-bot
](
https://github.com/Chatie/wechaty/blob/master/examples
/ding-dong-bot.ts
)
| Param | Type |
| --- | --- |
...
...
@@ -675,7 +675,7 @@ You need to detect the following conditions in the message event, which can be f
All wechat rooms(groups) will be encapsulated as a Room.
`Room`
is
`Sayable`
,
[
Example
/Room-Bot
](
https://github.com/Chatie/wechaty/blob/master/example
/room-bot.ts
)
[
Example
s/Room-Bot
](
https://github.com/Chatie/wechaty/blob/master/examples
/room-bot.ts
)
**Kind**
: global class
...
...
@@ -1099,7 +1099,7 @@ await bot.start()
**Kind**
: instance method of
[
<code>Wechaty</code>
](
#Wechaty
)
**Returns**
:
[
<code>Wechaty</code>
](
#Wechaty
)
- - this for chain
More Example Gist:
[
Example
/Friend-Bot
](
https://github.com/wechaty/wechaty/blob/master/example
/friend-bot.ts
)
More Example Gist:
[
Example
s/Friend-Bot
](
https://github.com/wechaty/wechaty/blob/master/examples
/friend-bot.ts
)
| Param | Type | Description |
| --- | --- | --- |
...
...
src/contact.ts
浏览文件 @
3f3785c8
...
...
@@ -102,7 +102,7 @@ const specialContactList: string[] = [
* All wechat contacts(friend) will be encapsulated as a Contact.
*
* `Contact` is `Sayable`,
* [Example/Contact-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/contact-bot.ts}
* [Example
s
/Contact-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/contact-bot.ts}
*/
export
class
Contact
implements
Sayable
{
private
static
pool
=
new
Map
<
string
,
Contact
>
()
...
...
src/friend-request.ts
浏览文件 @
3f3785c8
...
...
@@ -31,7 +31,7 @@ import Contact from './contact'
* 2. receive request(in friend event)
* 3. confirmation friendship(friend event)
*
* [Example/Friend-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/friend-bot.ts}
* [Example
s
/Friend-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/friend-bot.ts}
*/
export
abstract
class
FriendRequest
{
...
...
src/message.ts
浏览文件 @
3f3785c8
...
...
@@ -53,7 +53,7 @@ export type TypeName = 'attachment'
* All wechat messages will be encapsulated as a Message.
*
* `Message` is `Sayable`,
* [Example/Ding-Dong-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/ding-dong-bot.ts}
* [Example
s
/Ding-Dong-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/ding-dong-bot.ts}
*/
export
class
Message
implements
Sayable
{
/**
...
...
@@ -186,7 +186,7 @@ export class Message implements Sayable {
/**
* Reply a Text or Media File message to the sender.
*
* @see {@link https://github.com/Chatie/wechaty/blob/master/examples/ding-dong-bot.ts|Example/ding-dong-bot}
* @see {@link https://github.com/Chatie/wechaty/blob/master/examples/ding-dong-bot.ts|Example
s
/ding-dong-bot}
* @param {(string | MediaMessage)} textOrMedia
* @param {(Contact|Contact[])} [replyTo]
* @returns {Promise<any>}
...
...
src/room.ts
浏览文件 @
3f3785c8
...
...
@@ -80,7 +80,7 @@ export interface MemberQueryFilter {
* All wechat rooms(groups) will be encapsulated as a Room.
*
* `Room` is `Sayable`,
* [Example/Room-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/room-bot.ts}
* [Example
s
/Room-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/room-bot.ts}
*/
export
class
Room
extends
EventEmitter
implements
Sayable
{
private
static
pool
=
new
Map
<
string
,
Room
>
()
...
...
src/wechaty.ts
浏览文件 @
3f3785c8
...
...
@@ -294,7 +294,7 @@ export class Wechaty extends EventEmitter implements Sayable {
* @param {WechatyEventFunction} listener - Depends on the WechatyEvent
* @return {Wechaty} - this for chain
*
* More Example Gist: [Example/Friend-Bot]{@link https://github.com/wechaty/wechaty/blob/master/examples/friend-bot.ts}
* More Example Gist: [Example
s
/Friend-Bot]{@link https://github.com/wechaty/wechaty/blob/master/examples/friend-bot.ts}
*
* @example <caption>Event:scan </caption>
* wechaty.on('scan', (url: string, code: number) => {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录