@zhin.js/adapter-icqq 6.0.3 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +23 -5
- package/adapters/icqq.ts +79 -3
- package/commands/endpoint/add/[name:string=].ts +3 -0
- package/commands/endpoint/list.ts +3 -0
- package/commands/endpoint/remove/[name:string].ts +3 -0
- package/lib/endpoint.d.ts +52 -2
- package/lib/endpoint.js +317 -9
- package/lib/icqq-endpoint-commands.d.ts +1 -0
- package/lib/icqq-endpoint-commands.js +35 -0
- package/lib/icqq-guild.d.ts +8 -2
- package/lib/icqq-inbox.d.ts +33 -0
- package/lib/icqq-inbox.js +129 -0
- package/lib/icqq-runtime-state.d.ts +1 -0
- package/lib/icqq-runtime-state.js +6 -0
- package/lib/index.d.ts +1 -1
- package/lib/ipc-client.js +2 -2
- package/lib/outbound-media.d.ts +3 -2
- package/lib/outbound-media.js +17 -5
- package/lib/protocol.d.ts +6 -0
- package/lib/protocol.js +20 -3
- package/lib/types.d.ts +15 -0
- package/package.json +17 -11
- package/plugin.ts +5 -1
- package/schema.json +86 -17
- package/src/endpoint.ts +391 -10
- package/src/icqq-endpoint-commands.ts +37 -0
- package/src/icqq-guild.ts +9 -2
- package/src/icqq-inbox.ts +155 -0
- package/src/icqq-runtime-state.ts +7 -0
- package/src/index.ts +1 -0
- package/src/ipc-client.ts +2 -2
- package/src/outbound-media.ts +23 -5
- package/src/protocol.ts +25 -3
- package/src/types.ts +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @zhin.js/adapter-icqq
|
|
2
2
|
|
|
3
|
+
## 7.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 74b035c: endpoint 管理命令扩展至 18/20 适配器:kook / discord / github(private_key 支持内联文件路径)/ icqq(bindFlow 登记式 add + `icqq login` 引导)/ dingtalk / lark / line / satori / wechat-mp / wecom / weixin-ilink 接入 `endpoint list/add/remove`(字段对齐各自 schema,凭据写 `.env`)。email(smtp/imap 嵌套对象)与 sandbox(无凭据)暂不接。
|
|
8
|
+
- 6cb6152: 统一消息元素通道(UNI-Channel)落地:
|
|
9
|
+
|
|
10
|
+
- **入站契约**:`IncomingMessage.segments`(canonical Segment[],与 content 纯文本视图同源双轨),Message 透传;AI 兜底链路经 `collectSegmentMedia` 把图片/语音/视频/文件 MediaRef 写入会话 extra——多模态输入不再丢失。
|
|
11
|
+
- **出站协商**:`normalizeOutboundPayload` 升级全量 canonical 归一(复用 generic-segment-mapper),html→image 按端点 `segments.outboundMedia` 声明降级(base64 直发 / url-or-text / passthrough 自行物化);`MediaRef.kind` 新增 `'file'` 承载平台不透明引用(file_id/resource_id)。
|
|
12
|
+
- **能力声明**:`defineAdapter.segments` policy(outboundMedia / interactive),三道段门禁复活(探测点改 adapters/\*.ts,豁免名单渐进收敛)。
|
|
13
|
+
- **首批迁移**:icqq 全保真出入站(CQ ↔ canonical,quote→reply 段);milky/telegram/discord 入站媒体段恢复(附件/贴纸/callback action);napcat/onebot11/onebot12 出站 canonical→OneBot 数组段;wechat-mp/wecom `/cgi-bin/media/upload` 与 lark `/im/v1/images` 上传通路(base64/URL 图片不再静默丢图,失败降级文本)。
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [cdf64e7]
|
|
16
|
+
- Updated dependencies [2d0a159]
|
|
17
|
+
- Updated dependencies [5691aba]
|
|
18
|
+
- Updated dependencies [078e3f7]
|
|
19
|
+
- Updated dependencies [50497a5]
|
|
20
|
+
- Updated dependencies [9c997b2]
|
|
21
|
+
- Updated dependencies [09d4f25]
|
|
22
|
+
- Updated dependencies [43485a9]
|
|
23
|
+
- Updated dependencies [f0ec5ab]
|
|
24
|
+
- Updated dependencies [3e925d0]
|
|
25
|
+
- Updated dependencies [fa66c4c]
|
|
26
|
+
- Updated dependencies [fa66c4c]
|
|
27
|
+
- Updated dependencies [6cb6152]
|
|
28
|
+
- @zhin.js/command@1.0.3
|
|
29
|
+
- @zhin.js/agent@1.0.6
|
|
30
|
+
- @zhin.js/plugin-runtime@1.1.1
|
|
31
|
+
- zhin.js@5.0.1
|
|
32
|
+
- @zhin.js/adapter@1.1.1
|
|
33
|
+
- @zhin.js/core@1.4.1
|
|
34
|
+
|
|
35
|
+
## 7.0.0
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- 7db69c1: 命令前缀改为适配器配置项:`MessageDispatcher` 不再硬编码 `/`,默认按消息所属适配器实例 config 的 `commandPrefix` 解析(默认 `''` 无前缀,任意文本按命令匹配),`endpoints[i].commandPrefix` 逐项覆盖;`ImRuntime({ commandPrefix })` 仍可设全局静态前缀。全部 20 个平台适配器 schema 新增 `commandPrefix` 属性。
|
|
40
|
+
|
|
41
|
+
BREAKING(行为变化):未配置时命令不再需要 `/` 前缀——原 `/zt` 写法不再命中,直接发 `zt` 即可;需要斜杠风格的适配器请在配置里显式设 `commandPrefix: '/'`。
|
|
42
|
+
|
|
43
|
+
- e5c84ed: Adapter 多账号:插件实例 config 支持 `endpoints: [{name, ...覆盖}]` 数组,`expandEndpointConfigs` 将一个实例展开为多个 endpoint record(id 为 `<slotId>~<name>`,顶层字段共享、逐项覆盖),替代多 `instanceKey` 方案;Console `/api/plugins` 收敛为一个插件卡片 + 多 endpoint。icqq / qq schema 与 README 补 `endpoints` 配置。
|
|
44
|
+
|
|
45
|
+
Plugin Runtime Console Host:补 `/esm/*` React/router ESM 代理路由(legacy `consoleApiRouter` 对齐),TypeScriptClientBuilder 裸导入改写为 `/esm/<enc>.mjs`。
|
|
46
|
+
|
|
47
|
+
- 713445c: 适配器配置格式定稿(不兼容旧格式):`plugins.<adapter>` 顶层仅共享字段 + `commandPrefix`,`endpoints[i]` 携带 endpoint 级字段(`name` + 凭据,各 schema 已类型化),`endpoints` 为必填(icqq 另需顶层 `master`);icqq 新增 `trusted` 列表(顶层/逐项均可)。scaffold-wizard 全部字段式与自定义 configure() 产出改为新格式,examples(full-bot / qq-games-bot)与 20 个适配器 README 同步迁移。
|
|
48
|
+
- f32c424: 适配器配置统一为 endpoints 数组格式:`plugins.<adapter>` 为该 adapter 所有 endpoint 的通用配置,`plugins.<adapter>.endpoints[i]` 为单个 endpoint 的特殊配置(逐项覆盖,`name` 必填)。slack / github schema 新增 `endpoints` 属性;icqq / qq / slack 顶层必填改为 `anyOf`(单 endpoint 字段或 `endpoints` 数组二选一,兼容 Ajv strictRequired)。
|
|
49
|
+
- Updated dependencies [7db69c1]
|
|
50
|
+
- Updated dependencies [e5c84ed]
|
|
51
|
+
- Updated dependencies [3ea84a0]
|
|
52
|
+
- Updated dependencies [1ddcd70]
|
|
53
|
+
- Updated dependencies [ac9da66]
|
|
54
|
+
- @zhin.js/core@1.4.0
|
|
55
|
+
- @zhin.js/adapter@1.1.0
|
|
56
|
+
- @zhin.js/plugin-runtime@1.1.0
|
|
57
|
+
- @zhin.js/agent@1.0.5
|
|
58
|
+
- zhin.js@5.0.0
|
|
59
|
+
|
|
3
60
|
## 6.0.3
|
|
4
61
|
|
|
5
62
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ ICQQ Plugin Runtime 适配器 — 通过 [@icqqjs/cli](https://github.com/icqqjs
|
|
|
8
8
|
- 入站:`messageGatewayToken`(IPC 事件订阅)
|
|
9
9
|
- 出站:`send({ target, payload })` → `send_group_msg` / `send_private_msg` / …
|
|
10
10
|
- Agent 工具:`agent/tools/`(戳一戳、群管、好友列表等)保留
|
|
11
|
+
- Console Endpoint 管理:`src/endpoint.ts` 显式实现 `EndpointManagement`(好友/群/群成员列表、请求审批、删好友、踢人、禁言、设管理),Console 使用 `endpoint.friends` / `endpoint.groups` / `endpoint.group_members` 等规范 RPC
|
|
11
12
|
|
|
12
13
|
## 安装
|
|
13
14
|
|
|
@@ -21,12 +22,28 @@ pnpm add -g @icqqjs/cli # 或 npx icqq login
|
|
|
21
22
|
```yaml
|
|
22
23
|
plugins:
|
|
23
24
|
icqq:
|
|
24
|
-
|
|
25
|
+
master: "1659488338" # 必填,顶层共享(/approve 与 master 角色)
|
|
25
26
|
autoReconnect: true
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
endpoints:
|
|
28
|
+
- name: "${ICQQ_ACCOUNT}" # QQ 号,须与 icqq login 一致
|
|
29
|
+
# rpc 为 endpoint 级字段:
|
|
30
|
+
# - name: "${ICQQ_ACCOUNT_2}"
|
|
31
|
+
# rpc:
|
|
32
|
+
# host: 10.0.0.2
|
|
33
|
+
# port: 9527
|
|
34
|
+
# token: ${ICQQ_RPC_TOKEN}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
多账号:一个插件实例挂多个 endpoint(`endpoints` 数组逐项覆盖顶层字段,`name` 必填):
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
plugins:
|
|
41
|
+
icqq:
|
|
42
|
+
master: "1659488338" # 顶层字段所有 endpoint 共享
|
|
43
|
+
endpoints:
|
|
44
|
+
- name: "${ICQQ_ACCOUNT}"
|
|
45
|
+
- name: "${ICQQ_ACCOUNT_2}"
|
|
46
|
+
- name: "${ICQQ_ACCOUNT_3}" # 各账号须分别 icqq login
|
|
30
47
|
```
|
|
31
48
|
|
|
32
49
|
先执行 `icqq login`,再启动 Zhin。
|
|
@@ -52,6 +69,7 @@ plugins:
|
|
|
52
69
|
|
|
53
70
|
- `autoReconnect` 已恢复实现:IPC/RPC 意外断开后按指数退避自动重连(`stop()` 为主动断开,不触发重连)。
|
|
54
71
|
- `outboundMedia: file | base64` 已恢复实现:`file` 模式把 segment base64 落盘为临时文件后发 `[image:path]`;`base64` 模式(配置 `rpc` 时默认)发 `[image:base64://...]` 由守护进程解码。
|
|
72
|
+
- **Console 社交/群管 RPC 已接线**:endpoint 在 Adapter 内把 ICQQ 的 `get_friend_list` / `get_group_list` / `get_group_member_list`、请求审批和群管操作归一化为冻结的 `EndpointManagement` 对象。Host 只消费该语义端口,不再探测方法别名或读取 `friends` / `groups` SDK 缓存。
|
|
55
73
|
- **notice / request 入站事件已移除**:Plugin Runtime 的 `MessageGateway` 仅有 message 通道,没有 `notice.receive` / `request.receive` 事件机制,旧 `icqq-side-events.ts` / `get-msg.ts` / `login-ipc-contract.ts` / `agent-prompt.ts` 随之删除。需要好友/入群请求处理能力时请等待 runtime 提供事件通道后再恢复。
|
|
56
74
|
|
|
57
75
|
## License
|
package/adapters/icqq.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Convention entry: discover `adapters/icqq.ts` → defineAdapter.
|
|
3
3
|
*/
|
|
4
|
-
import { defineAdapter } from '@zhin.js/adapter';
|
|
4
|
+
import { defineAdapter, type AdapterContext } from '@zhin.js/adapter';
|
|
5
5
|
import { messageGatewayToken } from '@zhin.js/core/runtime';
|
|
6
|
-
import {
|
|
6
|
+
import { formatCompact, getLogger } from '@zhin.js/logger';
|
|
7
|
+
import {
|
|
8
|
+
databaseHostToken,
|
|
9
|
+
INBOX_TABLE_NOTICE,
|
|
10
|
+
INBOX_TABLE_REQUEST,
|
|
11
|
+
runtimeEventPublisherToken,
|
|
12
|
+
type Token,
|
|
13
|
+
} from '@zhin.js/plugin-runtime';
|
|
14
|
+
import { IcqqIpcEndpoint, type IcqqInboxHooks } from '../src/endpoint.js';
|
|
15
|
+
import { icqqRuntimeStateToken } from '../src/icqq-runtime-state.js';
|
|
7
16
|
import {
|
|
8
17
|
resolveIcqqConfig,
|
|
9
18
|
type IcqqAdapterConfig,
|
|
@@ -16,15 +25,82 @@ export type {
|
|
|
16
25
|
IcqqIpcTransport,
|
|
17
26
|
} from '../src/endpoint.js';
|
|
18
27
|
|
|
28
|
+
const logger = getLogger('icqq');
|
|
29
|
+
|
|
19
30
|
export default defineAdapter<IcqqAdapterConfig>({
|
|
20
31
|
capabilities: ['inbound', 'outbound'],
|
|
32
|
+
// 统一消息元素通道(UNI-Channel):端点可消费 base64 / url / upload 媒体
|
|
33
|
+
// (path 由出站物化按 file/base64 模式转换,非声明消费形态);
|
|
34
|
+
// 卡片/按钮等富交互段无原生承载,降级纯文本。
|
|
35
|
+
segments: {
|
|
36
|
+
outboundMedia: ['base64', 'url', 'upload'],
|
|
37
|
+
interactive: 'text',
|
|
38
|
+
},
|
|
21
39
|
create(context) {
|
|
22
40
|
// Client-library / IPC daemon path — no httpHostToken.
|
|
23
41
|
// Console loginAssist + host-router routes deferred.
|
|
42
|
+
const config = resolveIcqqConfig(context.config);
|
|
43
|
+
// 注册到插件运行时状态(icqq endpoint list 的"运行中"数据源)
|
|
44
|
+
context.use(icqqRuntimeStateToken).endpoints.set(config.name, {
|
|
45
|
+
name: config.name,
|
|
46
|
+
mode: config.rpc ? 'rpc' : 'ipc',
|
|
47
|
+
});
|
|
48
|
+
const inbox = resolveInboxHooks(context);
|
|
24
49
|
return new IcqqIpcEndpoint({
|
|
25
50
|
id: context.id,
|
|
26
51
|
gateway: context.use(messageGatewayToken),
|
|
27
|
-
config
|
|
52
|
+
config,
|
|
53
|
+
...(inbox ? { inbox } : {}),
|
|
28
54
|
});
|
|
29
55
|
},
|
|
30
56
|
});
|
|
57
|
+
|
|
58
|
+
/** 资源可选(轻量 Root 无 DatabaseHost / console hub):缺失时降级为不写收件箱。 */
|
|
59
|
+
function tryUse<T>(context: AdapterContext<IcqqAdapterConfig>, token: Token<T>): T | undefined {
|
|
60
|
+
try {
|
|
61
|
+
return context.use(token);
|
|
62
|
+
} catch {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 收件箱钩子:写 unified_inbox_request/notice(按 platform_*_id 去重,
|
|
69
|
+
* 推送事件与 GET_SYSTEM_MSG 首拉可能重复同一请求),并经 console hub 广播。
|
|
70
|
+
*/
|
|
71
|
+
function resolveInboxHooks(context: AdapterContext<IcqqAdapterConfig>): IcqqInboxHooks | undefined {
|
|
72
|
+
const host = tryUse(context, databaseHostToken);
|
|
73
|
+
const publisher = tryUse(context, runtimeEventPublisherToken);
|
|
74
|
+
if (!host && !publisher) return undefined;
|
|
75
|
+
const insertDeduped = async (
|
|
76
|
+
table: string,
|
|
77
|
+
idField: 'platform_request_id' | 'platform_notice_id',
|
|
78
|
+
row: Record<string, unknown>,
|
|
79
|
+
): Promise<void> => {
|
|
80
|
+
const model = host?.models.get(table);
|
|
81
|
+
if (!model) return;
|
|
82
|
+
try {
|
|
83
|
+
const existing = await model.select().where({
|
|
84
|
+
adapter: row.adapter,
|
|
85
|
+
endpoint_id: row.endpoint_id,
|
|
86
|
+
[idField]: row[idField],
|
|
87
|
+
});
|
|
88
|
+
if (Array.isArray(existing) && existing.length > 0) return;
|
|
89
|
+
await model.insert(row);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
logger.warn(formatCompact({
|
|
92
|
+
op: 'inbox_insert',
|
|
93
|
+
table,
|
|
94
|
+
error: error instanceof Error ? error.message : String(error),
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const publish = publisher;
|
|
99
|
+
return {
|
|
100
|
+
recordRequest: (row) => insertDeduped(INBOX_TABLE_REQUEST, 'platform_request_id', row),
|
|
101
|
+
recordNotice: (row) => insertDeduped(INBOX_TABLE_NOTICE, 'platform_notice_id', row),
|
|
102
|
+
...(publish
|
|
103
|
+
? { publish: (type: string, data: unknown): void => publish.publish(type, data) }
|
|
104
|
+
: {}),
|
|
105
|
+
};
|
|
106
|
+
}
|
package/lib/endpoint.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IcqqIpcEndpoint — lifecycle, outbound, IPC subscribe/admit for ICQQ daemon.
|
|
3
3
|
*/
|
|
4
|
-
import type { EndpointInstance } from '@zhin.js/adapter';
|
|
4
|
+
import type { EndpointInstance, EndpointManagement } from '@zhin.js/adapter';
|
|
5
5
|
import type { MessageGateway } from '@zhin.js/core/runtime';
|
|
6
6
|
import type { CapabilityId } from '@zhin.js/plugin-runtime';
|
|
7
7
|
import { type IcqqInboundMessage, type IpcEvent, type IpcResponse, type ResolvedIcqqConfig } from './protocol.js';
|
|
8
|
-
import type { IpcFriendInfo, IpcGroupInfo } from './types.js';
|
|
8
|
+
import type { IpcFriendInfo, IpcGroupInfo, IpcMemberInfo } from './types.js';
|
|
9
9
|
/** Minimal IPC surface used by the endpoint (real IpcClient or test mock). */
|
|
10
10
|
export interface IcqqIpcTransport {
|
|
11
11
|
request(action: string, params?: Record<string, unknown>): Promise<IpcResponse>;
|
|
@@ -16,11 +16,22 @@ export interface IcqqIpcTransport {
|
|
|
16
16
|
close(): void;
|
|
17
17
|
}
|
|
18
18
|
export type CreateIcqqIpc = (config: ResolvedIcqqConfig) => Promise<IcqqIpcTransport>;
|
|
19
|
+
/**
|
|
20
|
+
* 收件箱写/推钩子(由装配层注入,见 adapters/icqq.ts)。
|
|
21
|
+
* record* 写 unified_inbox_request/notice;publish 向 console hub 推送实时事件。
|
|
22
|
+
*/
|
|
23
|
+
export interface IcqqInboxHooks {
|
|
24
|
+
recordRequest(row: Record<string, unknown>): void | Promise<void>;
|
|
25
|
+
recordNotice(row: Record<string, unknown>): void | Promise<void>;
|
|
26
|
+
publish?(type: string, data: unknown): void;
|
|
27
|
+
}
|
|
19
28
|
export interface IcqqEndpointOptions {
|
|
20
29
|
readonly id: CapabilityId;
|
|
21
30
|
readonly gateway: MessageGateway;
|
|
22
31
|
readonly config: ResolvedIcqqConfig;
|
|
23
32
|
readonly createIpc?: CreateIcqqIpc;
|
|
33
|
+
/** 未注入时 request/notice 事件仅按非消息载荷忽略(不报错)。 */
|
|
34
|
+
readonly inbox?: IcqqInboxHooks;
|
|
24
35
|
}
|
|
25
36
|
export declare class IcqqIpcEndpoint implements EndpointInstance {
|
|
26
37
|
#private;
|
|
@@ -29,6 +40,7 @@ export declare class IcqqIpcEndpoint implements EndpointInstance {
|
|
|
29
40
|
ipc: IcqqIpcTransport;
|
|
30
41
|
readonly friends: Map<number, IpcFriendInfo>;
|
|
31
42
|
readonly groups: Map<number, IpcGroupInfo>;
|
|
43
|
+
readonly management: EndpointManagement;
|
|
32
44
|
constructor(options: IcqqEndpointOptions);
|
|
33
45
|
request(action: string, params?: Record<string, unknown>): Promise<IpcResponse>;
|
|
34
46
|
start(): Promise<void>;
|
|
@@ -46,6 +58,44 @@ export declare class IcqqIpcEndpoint implements EndpointInstance {
|
|
|
46
58
|
removeReaction(messageId: string, reactionId: string): Promise<void>;
|
|
47
59
|
/** Activity-feedback autoRemove / Console recall. */
|
|
48
60
|
recallMessage(messageId: string): Promise<void>;
|
|
61
|
+
/** EndpointManagement.listFriends —— 好友列表(LIST_FRIENDS,归一为 {user_id, nickname, remark})。 */
|
|
62
|
+
getFriendList(): Promise<Array<{
|
|
63
|
+
user_id: number;
|
|
64
|
+
nickname: string;
|
|
65
|
+
remark: string;
|
|
66
|
+
}>>;
|
|
67
|
+
/** EndpointManagement.listGroups —— 群列表(LIST_GROUPS,归一为 {group_id, name})。 */
|
|
68
|
+
getGroupList(): Promise<Array<{
|
|
69
|
+
group_id: number;
|
|
70
|
+
name: string;
|
|
71
|
+
}>>;
|
|
72
|
+
/** EndpointManagement.listGroupMembers —— 群成员列表(字段对齐 daemon 返回)。 */
|
|
73
|
+
getGroupMemberList(groupId: number | string): Promise<IpcMemberInfo[]>;
|
|
74
|
+
/** getGroupMemberList 别名(console 探测 listMembers / getMemberList)。 */
|
|
75
|
+
listMembers(groupId: number | string): Promise<IpcMemberInfo[]>;
|
|
76
|
+
getMemberList(groupId: number | string): Promise<IpcMemberInfo[]>;
|
|
77
|
+
/**
|
|
78
|
+
* EndpointManagement.resolveRequest —— id 为 inbox 行的 platform_request_id。
|
|
79
|
+
* 先 GET_SYSTEM_MSG 按 flag(回退 seq)定位请求,再按类型路由 handle_friend/group_request。
|
|
80
|
+
*/
|
|
81
|
+
approveRequest(id: string, remark?: string): Promise<void>;
|
|
82
|
+
rejectRequest(id: string, reason?: string): Promise<void>;
|
|
83
|
+
/** EndpointManagement.deleteFriend —— FRIEND_DELETE。 */
|
|
84
|
+
deleteFriend(userId: number | string): Promise<void>;
|
|
85
|
+
/** deleteFriend 别名(console 探测 delete_friend)。 */
|
|
86
|
+
delete_friend(userId: number | string): Promise<void>;
|
|
87
|
+
/** EndpointManagement.kickGroupMember —— GROUP_KICK。 */
|
|
88
|
+
removeMember(groupId: number | string, userId: number | string): Promise<void>;
|
|
89
|
+
kickMember(groupId: number | string, userId: number | string): Promise<void>;
|
|
90
|
+
setGroupKick(groupId: number | string, userId: number | string): Promise<void>;
|
|
91
|
+
/** EndpointManagement.muteGroupMember —— GROUP_MUTE(duration 秒,默认 600)。 */
|
|
92
|
+
muteMember(groupId: number | string, userId: number | string, duration?: number): Promise<void>;
|
|
93
|
+
banMember(groupId: number | string, userId: number | string, duration?: number): Promise<void>;
|
|
94
|
+
setGroupMute(groupId: number | string, userId: number | string, duration?: number): Promise<void>;
|
|
95
|
+
/** EndpointManagement.setGroupAdmin —— SET_GROUP_ADMIN(enable 默认 true)。 */
|
|
96
|
+
setModerator(groupId: number | string, userId: number | string, enable?: boolean): Promise<void>;
|
|
97
|
+
setAdmin(groupId: number | string, userId: number | string, enable?: boolean): Promise<void>;
|
|
98
|
+
setGroupAdmin(groupId: number | string, userId: number | string, enable?: boolean): Promise<void>;
|
|
49
99
|
/** Test / internal: admit when open. */
|
|
50
100
|
admit(msg: IcqqInboundMessage): void;
|
|
51
101
|
}
|