Skip to content

qchat.server.QChatServerModule

Zvicii edited this page Feb 10, 2023 · 6 revisions

Class: QChatServerModule

qchat/server.QChatServerModule

Hierarchy

Table of contents

Methods

Properties

Constructors

Methods

eventNames

eventNames(): "unread"[]

Return an array listing the events for which the emitter has registered listeners.

Returns

"unread"[]

Inherited from

EventEmitter.eventNames

Defined in

node_modules/eventemitter3/index.d.ts:15


listeners

listeners<T>(event): (...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void[]

Inherited from

EventEmitter.listeners

Defined in

node_modules/eventemitter3/index.d.ts:20


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "unread"

Returns

number

Inherited from

EventEmitter.listenerCount

Defined in

node_modules/eventemitter3/index.d.ts:27


emit

emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T
...args ArgumentMap<QChatServerEvents>[Extract<T, "unread">]

Returns

boolean

Inherited from

EventEmitter.emit

Defined in

node_modules/eventemitter3/index.d.ts:32


on

on<T>(event, fn, context?): QChatServerModule

Add a listener for a given event.

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void
context? any

Returns

QChatServerModule

Inherited from

EventEmitter.on

Defined in

node_modules/eventemitter3/index.d.ts:40


addListener

addListener<T>(event, fn, context?): QChatServerModule

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void
context? any

Returns

QChatServerModule

Inherited from

EventEmitter.addListener

Defined in

node_modules/eventemitter3/index.d.ts:45


once

once<T>(event, fn, context?): QChatServerModule

Add a one-time listener for a given event.

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void
context? any

Returns

QChatServerModule

Inherited from

EventEmitter.once

Defined in

node_modules/eventemitter3/index.d.ts:54


removeListener

removeListener<T>(event, fn?, context?, once?): QChatServerModule

Remove the listeners of a given event.

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void
context? any
once? boolean

Returns

QChatServerModule

Inherited from

EventEmitter.removeListener

Defined in

node_modules/eventemitter3/index.d.ts:63


off

off<T>(event, fn?, context?, once?): QChatServerModule

Type parameters

Name Type
T extends "unread"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<QChatServerEvents>[Extract<T, "unread">]) => void
context? any
once? boolean

Returns

QChatServerModule

Inherited from

EventEmitter.off

Defined in

node_modules/eventemitter3/index.d.ts:69


removeAllListeners

removeAllListeners(event?): QChatServerModule

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? "unread"

Returns

QChatServerModule

Inherited from

EventEmitter.removeAllListeners

Defined in

node_modules/eventemitter3/index.d.ts:79


initEventHandlers

initEventHandlers(): void

注册全局回调

Returns

void

Defined in

ts/qchat/server.ts:81


createServer

createServer(param): Promise<QChatServerCreateResp>

Fn

createServer(param: QChatServerCreateParam) 创建服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerCreateParam

Returns

Promise<QChatServerCreateResp>

void

Defined in

ts/qchat/server.ts:89


deleteServer

deleteServer(param): Promise<QChatBaseResp>

Fn

deleteServer(param: QChatServerDeleteParam) 删除服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerDeleteParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:104


updateServer

updateServer(param): Promise<QChatServerCreateResp>

Fn

updateServer(param: QChatServerUpdateParam) 更新服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerUpdateParam

Returns

Promise<QChatServerCreateResp>

void

Defined in

ts/qchat/server.ts:119


enterAsVisitor

enterAsVisitor(param): Promise<QChatServerEnterAsVisitorResp>

Fn

enterAsVisitor(param: QChatServerEnterAsVisitorParam) 以游客身份进入服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerEnterAsVisitorParam

Returns

Promise<QChatServerEnterAsVisitorResp>

void

Defined in

ts/qchat/server.ts:134


leaveAsVisitor

leaveAsVisitor(param): Promise<QChatServerLeaveAsVisitorResp>

Fn

leaveAsVisitor(param: QChatServerLeaveAsVisitorParam) 以游客身份离开服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerLeaveAsVisitorParam

Returns

Promise<QChatServerLeaveAsVisitorResp>

void

Defined in

ts/qchat/server.ts:149


subscribe

subscribe(param): Promise<QChatServerSubscribeResp>

Fn

subscribe(param: QChatServerSubscribeParam) 订阅指定服务器下的系统通知消息 @param[in] param 接口参数

Parameters

Name Type
param QChatServerSubscribeParam

Returns

Promise<QChatServerSubscribeResp>

void

Defined in

ts/qchat/server.ts:164


subscribeAsVisitor

subscribeAsVisitor(param): Promise<QChatServerSubscribeAsVisitorResp>

Fn

subscribeAsVisitor(param: QChatServerSubscribeAsVisitorParam) 以游客模式订阅服务器下的系统通知消息 @param[in] param 接口参数

Parameters

Name Type
param QChatServerSubscribeAsVisitorParam

Returns

Promise<QChatServerSubscribeAsVisitorResp>

void

Defined in

ts/qchat/server.ts:179


subscribeAllChannel

subscribeAllChannel(param): Promise<QChatServerSubscribeAllChannelResp>

Fn

subscribeAllChannel(param: QChatServerSubscribeAllChannelParam) 订阅服务器下所有频道的消息 @param[in] param 接口参数

Parameters

Name Type
param QChatServerSubscribeAllChannelParam

Returns

Promise<QChatServerSubscribeAllChannelResp>

void

Defined in

ts/qchat/server.ts:194


markRead

markRead(param): Promise<QChatServerMarkReadResp>

Fn

void MarkRead(const QChatServerMarkReadParam& param) 标记服务器下所有频道的消息为已读 @param[in] param 接口参数

Parameters

Name Type
param QChatServerMarkReadParam

Returns

Promise<QChatServerMarkReadResp>

void

Defined in

ts/qchat/server.ts:209


getServers

getServers(param): Promise<QChatServerGetServersResp>

Fn

getServers(param: QChatServerGetServersParam) 查询服务器列表 @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetServersParam

Returns

Promise<QChatServerGetServersResp>

void

Defined in

ts/qchat/server.ts:224


getServersByPage

getServersByPage(param): Promise<QChatServerGetServersPageResp>

Fn

getServersByPage(param: QChatServerGetServersPageParam) 查询服务器列表(分页) @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetServersPageParam

Returns

Promise<QChatServerGetServersPageResp>

void

Defined in

ts/qchat/server.ts:239


invite

invite(param): Promise<QChatServerInviteResp>

Fn

invite(param: QChatServerInviteParam) 邀请用户加入服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerInviteParam

Returns

Promise<QChatServerInviteResp>

void

Defined in

ts/qchat/server.ts:254


acceptInvite

acceptInvite(param): Promise<QChatBaseResp>

Fn

acceptInvite(param: QChatServerAcceptInviteParam) 接受加入服务器邀请 @param[in] param 接口参数

Parameters

Name Type
param QChatServerAcceptInviteParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:269


rejectInvite

rejectInvite(param): Promise<QChatBaseResp>

Fn

rejectInvite(param: QChatServerRejectInviteParam) 拒绝加入服务器邀请 @param[in] param 接口参数

Parameters

Name Type
param QChatServerRejectInviteParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:284


apply

apply(param): Promise<QChatServerApplyResp>

Fn

apply(param: QChatServerApplyParam) 申请加入服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerApplyParam

Returns

Promise<QChatServerApplyResp>

void

Defined in

ts/qchat/server.ts:299


acceptApply

acceptApply(param): Promise<QChatBaseResp>

Fn

acceptApply(param: QChatServerAcceptApplyParam) 同意加入服务器申请 @param[in] param 接口参数

Parameters

Name Type
param QChatServerAcceptApplyParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:314


rejectApply

rejectApply(param): Promise<QChatBaseResp>

Fn

rejectApply(param: QChatServerRejectApplyParam) 拒绝加入服务器申请 @param[in] param 接口参数

Parameters

Name Type
param QChatServerRejectApplyParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:329


kick

kick(param): Promise<QChatBaseResp>

Fn

kick(param: QChatServerKickParam) 将指定用户踢出服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerKickParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:344


leave

leave(param): Promise<QChatBaseResp>

Fn

leave(param: QChatServerLeaveParam) 离开指定服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerLeaveParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:359


updateMemberInfo

updateMemberInfo(param): Promise<QChatBaseResp>

Fn

updateMemberInfo(param: QChatServerUpdateMemberInfoParam) 更新服务器成员信息 @param[in] param 接口参数

Parameters

Name Type
param QChatServerUpdateMemberInfoParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:374


getServerMembers

getServerMembers(param): Promise<QChatServerGetMembersResp>

Fn

getServerMembers(param: QChatServerGetMembersParam) 查询服务器成员列表 @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetMembersParam

Returns

Promise<QChatServerGetMembersResp>

void

Defined in

ts/qchat/server.ts:389


getServerMembersByPage

getServerMembersByPage(param): Promise<QChatServerGetMembersPageResp>

Fn

getServerMembersByPage(param: QChatServerGetMembersPageParam) 查询服务器成员列表(分页) @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetMembersPageParam

Returns

Promise<QChatServerGetMembersPageResp>

void

Defined in

ts/qchat/server.ts:404


banMember

banMember(param): Promise<QChatBaseResp>

Fn

banMember(param: QChatServerBanMemberParam) 封禁服务器成员 @param[in] param 接口参数

Parameters

Name Type
param QChatServerBanMemberParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:419


unbanMember

unbanMember(param): Promise<QChatBaseResp>

Fn

unbanMember(param: QChatServerUnbanMemberParam) 解封服务器成员 @param[in] param 接口参数

Parameters

Name Type
param QChatServerUnbanMemberParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:434


getBannedMembersByPage

getBannedMembersByPage(param): Promise<QChatServerGetBannedMembersPageResp>

Fn

getBannedMembersByPage(param: QChatServerGetBannedMembersPageParam) 查询服务器封禁成员列表(分页) @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetBannedMembersPageParam

Returns

Promise<QChatServerGetBannedMembersPageResp>

void

Defined in

ts/qchat/server.ts:449


serverSearchByPage

serverSearchByPage(param): Promise<QChatServerGetServersPageResp>

Fn

serverSearchByPage(param: QChatServerSearchPageParam) 根据关键字搜索服务器(分页) @param[in] param 接口参数

Parameters

Name Type
param QChatServerSearchPageParam

Returns

Promise<QChatServerGetServersPageResp>

void

Defined in

ts/qchat/server.ts:464


serverMemberSearch

serverMemberSearch(param): Promise<QChatServerGetMembersResp>

Fn

serverMemberSearch(param: QChatServerMemberSearchParam) 根据关键字搜索服务器成员 @param[in] param 接口参数

Parameters

Name Type
param QChatServerMemberSearchParam

Returns

Promise<QChatServerGetMembersResp>

void

Defined in

ts/qchat/server.ts:479


generateInviteCode

generateInviteCode(param): Promise<QChatServerGenerateInviteCodeResp>

Fn

generateInviteCode(param: QChatServerGenerateInviteCodeParam) 生成服务器邀请码 @param[in] param 接口参数

Parameters

Name Type
param QChatServerGenerateInviteCodeParam

Returns

Promise<QChatServerGenerateInviteCodeResp>

void

Defined in

ts/qchat/server.ts:494


joinByInviteCode

joinByInviteCode(param): Promise<QChatBaseResp>

Fn

joinByInviteCode(param: QChatServerJoinByInviteCodeParam) 通过邀请码加入服务器 @param[in] param 接口参数

Parameters

Name Type
param QChatServerJoinByInviteCodeParam

Returns

Promise<QChatBaseResp>

void

Defined in

ts/qchat/server.ts:509


getInviteApplyRecordOfServer

getInviteApplyRecordOfServer(param): Promise<QChatServerGetInviteApplyRecordOfServerResp>

Fn

getInviteApplyRecordOfServer(param: QChatServerGetInviteApplyRecordOfServerParam) 查询服务器下邀请申请历史 @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetInviteApplyRecordOfServerParam

Returns

Promise<QChatServerGetInviteApplyRecordOfServerResp>

void

Defined in

ts/qchat/server.ts:524


getInviteApplyRecordOfSelf

getInviteApplyRecordOfSelf(param): Promise<QChatServerGetInviteApplyRecordOfServerResp>

Fn

getInviteApplyRecordOfSelf(param: QChatServerGetInviteApplyRecordOfSelfParam) 查询自己邀请申请历史 @param[in] param 接口参数

Parameters

Name Type
param QChatServerGetInviteApplyRecordOfSelfParam

Returns

Promise<QChatServerGetInviteApplyRecordOfServerResp>

void

Defined in

ts/qchat/server.ts:539

Properties

instance

instance: any

Defined in

ts/qchat/server.ts:75

Constructors

constructor

new QChatServerModule()

Overrides

EventEmitter<QChatServerEvents&gt;.constructor

Defined in

ts/qchat/server.ts:76

Clone this wiki locally