Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
.Veneno.
wechaty
提交
89f94e55
W
wechaty
项目概览
.Veneno.
/
wechaty
与 Fork 源项目一致
Fork自
wechaty / wechaty
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wechaty
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
89f94e55
编写于
4月 24, 2018
作者:
Huan (李卓桓)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
abstract room
上级
0a24b7a9
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
131 addition
and
268 deletion
+131
-268
src/puppet-web/web-room.ts
src/puppet-web/web-room.ts
+118
-255
src/puppet/room.ts
src/puppet/room.ts
+13
-13
未找到文件。
src/puppet-web/web-room.ts
浏览文件 @
89f94e55
此差异已折叠。
点击以展开。
src/puppet/room.ts
浏览文件 @
89f94e55
...
...
@@ -22,21 +22,21 @@ import {
Raven
,
Sayable
,
log
,
}
from
'
./config
'
}
from
'
../config
'
import
Contact
from
'
./contact
'
import
{
MediaMessage
,
}
from
'
./message
'
}
from
'
./message
-media
'
import
PuppetAccessory
from
'
./puppet-accessory
'
export
type
RoomEventName
=
'
join
'
|
'
leave
'
|
'
topic
'
|
never
export
type
MemberQueryNameTyp
e
=
'
name
'
|
'
roomAlias
'
|
'
contactAlias
'
export
type
RoomMemberQueryNam
e
=
'
name
'
|
'
roomAlias
'
|
'
contactAlias
'
export
interface
MemberQueryFilter
{
export
interface
Room
MemberQueryFilter
{
name
?:
string
,
roomAlias
?:
string
,
contactAlias
?:
string
,
...
...
@@ -53,7 +53,7 @@ export interface RoomQueryFilter {
* [Examples/Room-Bot]{@link https://github.com/Chatie/wechaty/blob/master/examples/room-bot.ts}
*/
export
abstract
class
Room
extends
PuppetAccessory
implements
Sayable
{
pr
ivate
static
pool
=
new
Map
<
string
,
Room
>
()
pr
otected
static
pool
=
new
Map
<
string
,
Room
>
()
/**
* @private
...
...
@@ -104,7 +104,7 @@ export abstract class Room extends PuppetAccessory implements Sayable {
public
on
(
event
:
'
leave
'
,
listener
:
(
this
:
Room
,
leaver
:
Contact
)
=>
void
):
this
public
on
(
event
:
'
join
'
,
listener
:
(
this
:
Room
,
inviteeList
:
Contact
[]
,
inviter
:
Contact
)
=>
void
):
this
public
on
(
event
:
'
topic
'
,
listener
:
(
this
:
Room
,
topic
:
string
,
oldTopic
:
string
,
changer
:
Contact
)
=>
void
):
this
public
on
(
event
:
never
,
listener
:
never
):
never
public
on
(
event
:
never
,
...
args
:
never
[]):
this
/**
* @desc Room Class Event Type
...
...
@@ -283,7 +283,7 @@ export abstract class Room extends PuppetAccessory implements Sayable {
*/
public
abstract
has
(
contact
:
Contact
):
boolean
public
abstract
memberAll
(
filter
:
MemberQueryFilter
):
Contact
[]
public
abstract
memberAll
(
filter
:
Room
MemberQueryFilter
):
Contact
[]
public
abstract
memberAll
(
name
:
string
):
Contact
[]
/**
...
...
@@ -303,19 +303,19 @@ export abstract class Room extends PuppetAccessory implements Sayable {
* - `name` the name-string set by user-self, should be called name, equal to `Contact.name()`
* - `roomAlias` the name-string set by user-self in the room, should be called roomAlias
* - `contactAlias` the name-string set by bot for others, should be called alias, equal to `Contact.alias()`
* @param {(MemberQueryFilter | string)} queryArg -When use memberAll(name:string), return all matched members, including name, roomAlias, contactAlias
* @param {(
Room
MemberQueryFilter | string)} queryArg -When use memberAll(name:string), return all matched members, including name, roomAlias, contactAlias
* @returns {Contact[]}
* @memberof Room
*/
public
abstract
memberAll
(
queryArg
:
MemberQueryFilter
|
string
):
Contact
[]
public
abstract
memberAll
(
queryArg
:
Room
MemberQueryFilter
|
string
):
Contact
[]
public
abstract
member
(
name
:
string
):
Contact
|
null
public
abstract
member
(
filter
:
MemberQueryFilter
):
Contact
|
null
public
abstract
member
(
filter
:
Room
MemberQueryFilter
):
Contact
|
null
/**
* Find all contacts in a room, if get many, return the first one.
*
* @param {(MemberQueryFilter | string)} queryArg -When use member(name:string), return all matched members, including name, roomAlias, contactAlias
* @param {(
Room
MemberQueryFilter | string)} queryArg -When use member(name:string), return all matched members, including name, roomAlias, contactAlias
* @returns {(Contact | null)}
*
* @example <caption>Find member by name</caption>
...
...
@@ -340,7 +340,7 @@ export abstract class Room extends PuppetAccessory implements Sayable {
* }
* }
*/
public
abstract
member
(
queryArg
:
MemberQueryFilter
|
string
):
Contact
|
null
public
abstract
member
(
queryArg
:
Room
MemberQueryFilter
|
string
):
Contact
|
null
/**
* Get all room member from the room
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录