Skip to content

qchat.role.QChatRoleModule

Zvicii edited this page Feb 10, 2023 · 6 revisions

Class: QChatRoleModule

qchat/role.QChatRoleModule

Hierarchy

Table of contents

Methods

Properties

Constructors

Methods

eventNames

eventNames(): never[]

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

Returns

never[]

Inherited from

EventEmitter.eventNames

Defined in

node_modules/eventemitter3/index.d.ts:15


listeners

listeners<T>(event): (...args: ArgumentMap<QChatRoleEvents>[Extract<T, never>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends never

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<QChatRoleEvents>[Extract<T, never>]) => 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 never

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 never

Parameters

Name Type
event T
...args ArgumentMap<QChatRoleEvents>[Extract<T, never>]

Returns

boolean

Inherited from

EventEmitter.emit

Defined in

node_modules/eventemitter3/index.d.ts:32


on

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

Add a listener for a given event.

Type parameters

Name Type
T extends never

Parameters

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

Returns

QChatRoleModule

Inherited from

EventEmitter.on

Defined in

node_modules/eventemitter3/index.d.ts:40


addListener

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

Type parameters

Name Type
T extends never

Parameters

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

Returns

QChatRoleModule

Inherited from

EventEmitter.addListener

Defined in

node_modules/eventemitter3/index.d.ts:45


once

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

Add a one-time listener for a given event.

Type parameters

Name Type
T extends never

Parameters

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

Returns

QChatRoleModule

Inherited from

EventEmitter.once

Defined in

node_modules/eventemitter3/index.d.ts:54


removeListener

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

Remove the listeners of a given event.

Type parameters

Name Type
T extends never

Parameters

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

Returns

QChatRoleModule

Inherited from

EventEmitter.removeListener

Defined in

node_modules/eventemitter3/index.d.ts:63


off

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

Type parameters

Name Type
T extends never

Parameters

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

Returns

QChatRoleModule

Inherited from

EventEmitter.off

Defined in

node_modules/eventemitter3/index.d.ts:69


removeAllListeners

removeAllListeners(event?): QChatRoleModule

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? undefined

Returns

QChatRoleModule

Inherited from

EventEmitter.removeAllListeners

Defined in

node_modules/eventemitter3/index.d.ts:79


initEventHandlers

initEventHandlers(): void

注册全局回调

Returns

void

Defined in

ts/qchat/role.ts:77


createServerRole

createServerRole(param): Promise<QChatCreateServerRoleResp>

Fn

createServerRole(param: QChatCreateServerRoleParam)

Brief

在服务器中创建一个身份组

See

QChatCreateServerRoleParam

Parameters

Name Type Description
param QChatCreateServerRoleParam 参数见

Returns

Promise<QChatCreateServerRoleResp>

Defined in

ts/qchat/role.ts:84


updateServerRole

updateServerRole(param): Promise<QChatUpdateServerRoleResp>

Fn

updateServerRole(param: QChatUpdateServerRoleParam)

Brief

更新服务器中指定身份组

See

QChatUpdateServerRoleParam

Parameters

Name Type Description
param QChatUpdateServerRoleParam 参数见

Returns

Promise<QChatUpdateServerRoleResp>

Defined in

ts/qchat/role.ts:98


updateServerRolePriorities

updateServerRolePriorities(param): Promise<QChatGetServerRolesResp>

Fn

updateServerRolePriorities(param: QChatUpdateServerRolePrioritiesParam)

Brief

批量更新服务器身份组优先级,如果具备修改身份组优先级权限,则服务器会应用您传递的参数中身份组优先级列表所有的内容 如在 UI 展示中,允许拖拽对身份组优先级进行排序,则在排序完成后将最终的排序列表传递到参数中即可。

See

QChatUpdateServerRolePrioritiesParam

Parameters

Name Type Description
param QChatUpdateServerRolePrioritiesParam 参数见

Returns

Promise<QChatGetServerRolesResp>

Defined in

ts/qchat/role.ts:113


deleteServerRole

deleteServerRole(param): Promise<QChatBaseResp>

Fn

deleteServerRole(param: QChatDeleteServerRoleParam)

Brief

从服务器中删除指定身份组

See

QChatDeleteServerRoleParam

Parameters

Name Type Description
param QChatDeleteServerRoleParam 参数见

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/role.ts:127


getServerRoles

getServerRoles(param): Promise<QChatGetServerRolesResp>

Fn

getServerRoles(param: QChatGetServerRolesParam)

Brief

获取指定服务器下已创建的身份组列表

See

QChatGetServerRolesParam

Parameters

Name Type Description
param QChatGetServerRolesParam 参数见

Returns

Promise<QChatGetServerRolesResp>

Defined in

ts/qchat/role.ts:141


addMembersToServerRole

addMembersToServerRole(param): Promise<QChatAddMembersToServerRoleResp>

Fn

addMembersToServerRole(param: QChatAddMembersToServerRoleParam)

Brief

添加部分成员到服务器指定的身份组中

See

QChatAddMembersToServerRoleParam

Parameters

Name Type Description
param QChatAddMembersToServerRoleParam 参数见

Returns

Promise<QChatAddMembersToServerRoleResp>

Defined in

ts/qchat/role.ts:155


removeMembersFromServerRole

removeMembersFromServerRole(param): Promise<QChatAddMembersToServerRoleResp>

Fn

removeMembersFromServerRole(param: QChatRemoveMembersFromServerRoleParam)

Brief

从服务器指定身份组移除部分成员

See

QChatRemoveMembersFromServerRoleParam

Parameters

Name Type Description
param QChatRemoveMembersFromServerRoleParam 参数见

Returns

Promise<QChatAddMembersToServerRoleResp>

Defined in

ts/qchat/role.ts:169


getMembersFromServerRole

getMembersFromServerRole(param): Promise<QChatGetMembersFromServerRoleResp>

Fn

getMembersFromServerRole(param: QChatGetMembersFromServerRoleParam)

Brief

分页从服务器指定身份组中查询成员列表

See

QChatGetMembersFromServerRoleParam

Parameters

Name Type Description
param QChatGetMembersFromServerRoleParam 参数见

Returns

Promise<QChatGetMembersFromServerRoleResp>

Defined in

ts/qchat/role.ts:183


addChannelRole

addChannelRole(param): Promise<QChatAddChannelRoleResp>

Fn

addChannelRole(param: QChatAddChannelRoleParam)

Brief

添加一个身份组到频道

See

QChatAddChannelRoleParam

Parameters

Name Type Description
param QChatAddChannelRoleParam 参数见

Returns

Promise<QChatAddChannelRoleResp>

Defined in

ts/qchat/role.ts:197


updateChannelRole

updateChannelRole(param): Promise<QChatAddChannelRoleResp>

Fn

updateChannelRole(param: QChatUpdateChannelRoleParam)

Brief

更新频道中指定身份组的信息

See

QChatUpdateChannelRoleParam

Parameters

Name Type Description
param QChatUpdateChannelRoleParam 参数见

Returns

Promise<QChatAddChannelRoleResp>

Defined in

ts/qchat/role.ts:211


removeChannelRole

removeChannelRole(param): Promise<QChatBaseResp>

Fn

removeChannelRole(param: QChatRemoveChannelRoleParam)

Brief

从频道中移除指定身份组

See

QChatRemoveChannelRoleParam

Parameters

Name Type Description
param QChatRemoveChannelRoleParam 参数见

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/role.ts:225


getChannelRoles

getChannelRoles(param): Promise<QChatGetChannelRolesResp>

Fn

getChannelRoles(param: QChatGetChannelRolesParam)

Brief

获取频道下所有已分配的身份组信息

See

QChatGetChannelRolesParam

Parameters

Name Type Description
param QChatGetChannelRolesParam 参数见

Returns

Promise<QChatGetChannelRolesResp>

Defined in

ts/qchat/role.ts:239


addMemberRole

addMemberRole(param): Promise<QChatAddMemberRoleResp>

Fn

addMemberRole(param: QChatAddMemberRoleParam)

Brief

在频道中添加针对指定人的特殊权限配置

See

QChatAddMemberRoleParam

Parameters

Name Type Description
param QChatAddMemberRoleParam 参数见

Returns

Promise<QChatAddMemberRoleResp>

Defined in

ts/qchat/role.ts:253


updateMemberRole

updateMemberRole(param): Promise<QChatAddMemberRoleResp>

Fn

updateMemberRole(param: QChatUpdateMemberRoleParam)

Brief

更新频道中指定人的特殊权限配置

See

QChatUpdateMemberRoleParam

Parameters

Name Type Description
param QChatUpdateMemberRoleParam 参数见

Returns

Promise<QChatAddMemberRoleResp>

Defined in

ts/qchat/role.ts:267


removeMemberRole

removeMemberRole(param): Promise<QChatBaseResp>

Fn

removeMemberRole(param: QChatRemoveMemberRoleParam)

Brief

从频道中移除指定人的特殊权限配置

See

QChatRemoveMemberRoleParam

Parameters

Name Type Description
param QChatRemoveMemberRoleParam 参数见

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/role.ts:281


getMemberRoles

getMemberRoles(param): Promise<QChatGetMemberRolesResp>

Fn

getMemberRoles(param: QChatGetMemberRolesParam)

Brief

分页获取频道下所有针对人的特殊权限配置列表

See

QChatGetMemberRolesParam

Parameters

Name Type Description
param QChatGetMemberRolesParam 参数见

Returns

Promise<QChatGetMemberRolesResp>

Defined in

ts/qchat/role.ts:295


getRolesByAccid

getRolesByAccid(param): Promise<QChatGetServerRolesResp>

Fn

getRolesByAccid(param: QChatGetRolesByAccidParam)

Brief

根据用户 ID 获取其已经分配的身份组列表

See

QChatGetRolesByAccidParam

Parameters

Name Type Description
param QChatGetRolesByAccidParam 参数见

Returns

Promise<QChatGetServerRolesResp>

Defined in

ts/qchat/role.ts:309


getExistingServerRolesByAccids

getExistingServerRolesByAccids(param): Promise<QChatGetExistingServerRolesByAccidsResp>

Fn

getExistingServerRolesByAccids(param: QChatGetExistingServerRolesByAccidsParam)

Brief

根据一组用户列表查询该列表下所有用户的身份组列表信息

See

QChatGetExistingServerRolesByAccidsParam

Parameters

Name Type Description
param QChatGetExistingServerRolesByAccidsParam 参数见

Returns

Promise<QChatGetExistingServerRolesByAccidsResp>

Defined in

ts/qchat/role.ts:323


getExistingChannelRolesByServerRoleIds

getExistingChannelRolesByServerRoleIds(param): Promise<QChatGetChannelRolesResp>

Fn

getExistingChannelRolesByServerRoleIds(param: QChatGetExistingChannelRolesByServerRoleIdsParam)

Brief

根据一组身份组列表查询频道中已经存在的身份组

See

QChatGetExistingChannelRolesByServerRoleIdsParam

Parameters

Name Type Description
param QChatGetExistingChannelRolesByServerRoleIdsParam 参数见

Returns

Promise<QChatGetChannelRolesResp>

Defined in

ts/qchat/role.ts:337


getExistingAccidsOfMemberRoles

getExistingAccidsOfMemberRoles(param): Promise<QChatGetExistingAccidsOfMemberRolesResp>

Fn

getExistingAccidsOfMemberRoles(param: QChatGetExistingAccidsOfMemberRolesParam)

Brief

根据一组用户 ID 查询指定频道下的定制权限信息

See

QChatGetExistingAccidsOfMemberRolesParam

Parameters

Name Type Description
param QChatGetExistingAccidsOfMemberRolesParam 参数见

Returns

Promise<QChatGetExistingAccidsOfMemberRolesResp>

Defined in

ts/qchat/role.ts:351


getExistingAccidsInServerRole

getExistingAccidsInServerRole(param): Promise<QChatGetExistingAccidsOfMemberRolesResp>

void GetExistingAccidsInServerRole(const QChatGetExistingAccidsInServerRoleParam& param)

Brief

查询服务器某身份组是否包含指定成员

See

QChatGetExistingAccidsInServerRoleParam

Parameters

Name Type Description
param QChatGetExistingAccidsInServerRoleParam 参数见

Returns

Promise<QChatGetExistingAccidsOfMemberRolesResp>

Defined in

ts/qchat/role.ts:365


checkPermission

checkPermission(param): Promise<QChatCheckPermissionResp>

Fn

checkPermission(param: QChatCheckPermissionParam)

Brief

查询当前登录用户是否拥有特定权限

See

QChatGetRolesByAccidParam

Parameters

Name Type Description
param QChatCheckPermissionParam 参数见

Returns

Promise<QChatCheckPermissionResp>

Defined in

ts/qchat/role.ts:379


checkPermissions

checkPermissions(param): Promise<QChatCheckPermissionsResp>

Fn

checkPermissions(param: QChatCheckPermissionsParam)

Brief

查询当前登录用户是否拥有特定权限

See

QChatGetRolesByAccidParam

Parameters

Name Type Description
param QChatCheckPermissionsParam 参数见

Returns

Promise<QChatCheckPermissionsResp>

Defined in

ts/qchat/role.ts:393


addChannelCategoryRole

addChannelCategoryRole(param): Promise<QChatAddChannelCategoryRoleResp>

Fn

addChannelCategoryRole(param: QChatAddChannelCategoryRoleParam)

Brief

添加一个身份组到频道分组

See

QChatAddChannelCategoryRoleParam

Parameters

Name Type Description
param QChatAddChannelCategoryRoleParam 参数见

Returns

Promise<QChatAddChannelCategoryRoleResp>

Defined in

ts/qchat/role.ts:407


removeChannelCategoryRole

removeChannelCategoryRole(param): Promise<QChatBaseResp>

Fn

removeChannelCategoryRole(param: QChatRemoveChannelCategoryRoleParam)

Brief

从频道分组中移除身份组

See

QChatRemoveChannelCategoryRoleParam

Parameters

Name Type Description
param QChatRemoveChannelCategoryRoleParam 参数见

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/role.ts:421


updateChannelCategoryRole

updateChannelCategoryRole(param): Promise<QChatAddChannelCategoryRoleResp>

Fn

updateChannelCategoryRole(param: QChatUpdateChannelCategoryRoleParam)

Brief

更新频道分组中的身份组

See

QChatUpdateChannelCategoryRoleParam

Parameters

Name Type Description
param QChatUpdateChannelCategoryRoleParam 参数见

Returns

Promise<QChatAddChannelCategoryRoleResp>

Defined in

ts/qchat/role.ts:435


getChannelCategoryRolesPage

getChannelCategoryRolesPage(param): Promise<QChatGetChannelCategoryRolesPageResp>

Fn

getChannelCategoryRolesPage(param: QChatGetChannelCategoryRolesPageParam)

Brief

分页获取频道分组下的身份组列表

See

QChatGetChannelCategoryRolesPageParam

Parameters

Name Type Description
param QChatGetChannelCategoryRolesPageParam 参数见

Returns

Promise<QChatGetChannelCategoryRolesPageResp>

Defined in

ts/qchat/role.ts:449


addChannelCategoryMemberRole

addChannelCategoryMemberRole(param): Promise<QChatAddChannelCategoryMemberRoleResp>

Fn

addChannelCategoryMemberRole(param: QChatAddChannelCategoryMemberRoleParam)

Brief

定制指定成员在频道分组中的权限

See

QChatAddChannelCategoryMemberRoleParam

Parameters

Name Type Description
param QChatAddChannelCategoryMemberRoleParam 参数见

Returns

Promise<QChatAddChannelCategoryMemberRoleResp>

Defined in

ts/qchat/role.ts:463


removeChannelCategoryMemberRole

removeChannelCategoryMemberRole(param): Promise<QChatBaseResp>

Fn

removeChannelCategoryMemberRole(param: QChatRemoveChannelCategoryMemberRoleParam)

Brief

取消指定成员在频道分组中的权限

See

QChatRemoveChannelCategoryMemberRoleParam

Parameters

Name Type Description
param QChatRemoveChannelCategoryMemberRoleParam 参数见

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/role.ts:477


updateChannelCategoryMemberRole

updateChannelCategoryMemberRole(param): Promise<QChatAddChannelCategoryMemberRoleResp>

Fn

updateChannelCategoryMemberRole(param: QChatUpdateChannelCategoryMemberRoleParam)

Brief

更新指定成员在频道分组中的权限

See

QChatUpdateChannelCategoryMemberRoleParam

Parameters

Name Type Description
param QChatUpdateChannelCategoryMemberRoleParam 参数见

Returns

Promise<QChatAddChannelCategoryMemberRoleResp>

Defined in

ts/qchat/role.ts:491


getChannelCategoryMemberRolesPage

getChannelCategoryMemberRolesPage(param): Promise<QChatGetChannelCategoryMemberRolesPageResp>

Fn

getChannelCategoryMemberRolesPage(param: QChatGetChannelCategoryMemberRolesPageParam)

Brief

分页获取频道分组下的成员权限列表

See

QChatGetChannelCategoryMemberRolesPageParam

Parameters

Name Type Description
param QChatGetChannelCategoryMemberRolesPageParam 参数见

Returns

Promise<QChatGetChannelCategoryMemberRolesPageResp>

Defined in

ts/qchat/role.ts:505

Properties

instance

instance: any

Defined in

ts/qchat/role.ts:71

Constructors

constructor

new QChatRoleModule()

Overrides

EventEmitter<QChatRoleEvents&gt;.constructor

Defined in

ts/qchat/role.ts:72

Clone this wiki locally