node-karin 1.3.14 → 1.3.17
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 +34 -0
- package/dist/index.d.ts +2026 -1892
- package/dist/index.js +1043 -563
- package/dist/web/assets/index-BAH_YkG3.js +1 -0
- package/dist/web/assets/index-C-B8C59Q.js +1 -0
- package/dist/web/assets/index-C_Dj3lRc.js +445 -0
- package/dist/web/assets/index-Qf-xPnsA.css +7 -0
- package/dist/web/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 +0 -0
- package/dist/web/icon.css +25 -0
- package/dist/web/index.html +20 -19
- package/package.json +2 -2
- package/dist/web/assets/index-BEt021xL.css +0 -7
- package/dist/web/assets/index-C26nyH7M.js +0 -1
- package/dist/web/assets/index-CyLelSAM.js +0 -458
- package/dist/web/assets/index-RLVRpi3L.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -154,79 +154,6 @@ type Client = RedisClientType & {
|
|
|
154
154
|
id: 'redis' | 'mock';
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
/**
|
|
158
|
-
* 适配器所属平台
|
|
159
|
-
* - `qq`: QQ
|
|
160
|
-
* - `wechat`: 微信
|
|
161
|
-
* - `telegram`: Telegram
|
|
162
|
-
* - `discord`: Discord
|
|
163
|
-
* - `koko`: 开黑吧
|
|
164
|
-
* - `other`: 其他
|
|
165
|
-
*/
|
|
166
|
-
type AdapterPlatform = 'qq' | 'wechat' | 'telegram' | 'discord' | 'koko' | 'other';
|
|
167
|
-
/**
|
|
168
|
-
* 适配器所使用的标准接口协议
|
|
169
|
-
* - `onebot11`: OneBot v11 标准
|
|
170
|
-
* - `onebot12`: OneBot v12 标准
|
|
171
|
-
* - `oicq`: OICQ 标准
|
|
172
|
-
* - `icqq`: OICQ fork 标准
|
|
173
|
-
* - `other`: 其他标准
|
|
174
|
-
*/
|
|
175
|
-
type AdapterStandard = 'onebot11' | 'onebot12' | 'oicq' | 'icqq' | 'other';
|
|
176
|
-
/**
|
|
177
|
-
* 适配器协议实现名称
|
|
178
|
-
* - `console`: 控制台
|
|
179
|
-
* - `qqbot`: https://bot.q.qq.com/wiki
|
|
180
|
-
* - `icqq`: https://github.com/icqqjs/icqq
|
|
181
|
-
* - `gocq-http`: https://docs.go-cqhttp.org/
|
|
182
|
-
* - `napcat`: https://napneko.github.io/zh-CN/
|
|
183
|
-
* - `oicq`: https://github.com/takayama-lily/oicq
|
|
184
|
-
* - `llonebot`: https://llonebot.github.io/zh-CN/
|
|
185
|
-
* - `conwechat`: https://justundertaker.github.io/ComWeChatBotClient/
|
|
186
|
-
* - `lagrange`: https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/
|
|
187
|
-
*/
|
|
188
|
-
type AdapterProtocol = 'qqbot' | 'icqq' | 'gocq-http' | 'napcat' | 'oicq' | 'llonebot' | 'conwechat' | 'lagrange' | 'console' | 'other';
|
|
189
|
-
/**
|
|
190
|
-
* 适配器通信方式
|
|
191
|
-
* - `http`: HTTP 通信
|
|
192
|
-
* - `webSocketServer`: WebSocket 服务端
|
|
193
|
-
* - `webSocketClient`: WebSocket 客户端
|
|
194
|
-
* - `grpc`: gRPC 通信
|
|
195
|
-
* - `other`: 其他通信方式
|
|
196
|
-
*/
|
|
197
|
-
type AdapterCommunication = 'http' | 'webSocketServer' | 'webSocketClient' | 'grpc' | 'other';
|
|
198
|
-
/**
|
|
199
|
-
* 适配器基本信息
|
|
200
|
-
*/
|
|
201
|
-
interface AdapterInfo {
|
|
202
|
-
/** 适配器索引 默认为-1 在注册适配器时会自动更改为对应的索引 */
|
|
203
|
-
index: number;
|
|
204
|
-
/** 适配器名称 如lagrange-onebot */
|
|
205
|
-
name: string;
|
|
206
|
-
/** 适配器版本 */
|
|
207
|
-
version: string;
|
|
208
|
-
/** 适配器平台 */
|
|
209
|
-
platform: AdapterPlatform;
|
|
210
|
-
/** 适配器使用的协议标准 如onebot11 */
|
|
211
|
-
standard: AdapterStandard;
|
|
212
|
-
/** 适配器协议实现 如gocq、napcat */
|
|
213
|
-
protocol: AdapterProtocol;
|
|
214
|
-
/** 适配器通信方式 */
|
|
215
|
-
communication: AdapterCommunication;
|
|
216
|
-
/**
|
|
217
|
-
* 适配器通信地址
|
|
218
|
-
* @example `http://127.0.0.1:7000`
|
|
219
|
-
* @example `ws://127.0.0.1:7000/ws`
|
|
220
|
-
* @example `grpc://127.0.0.1:7001`
|
|
221
|
-
* @example `internal://127.0.0.1`
|
|
222
|
-
*/
|
|
223
|
-
address: string;
|
|
224
|
-
/** 连接时间 */
|
|
225
|
-
connectTime: number;
|
|
226
|
-
/** 鉴权秘钥 */
|
|
227
|
-
secret: string | null;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
157
|
/**
|
|
231
158
|
* 事件来源
|
|
232
159
|
* - group: 群聊
|
|
@@ -321,6 +248,183 @@ interface GroupTempContact extends BaseContact {
|
|
|
321
248
|
*/
|
|
322
249
|
type Contact<T extends Scene = Scene> = T extends 'group' ? GroupContact : T extends 'friend' ? FriendContact : T extends 'guild' ? GuildContact : T extends 'direct' ? DirectContact : T extends 'groupTemp' ? GroupTempContact : never;
|
|
323
250
|
|
|
251
|
+
/**
|
|
252
|
+
* 事件发送者性别
|
|
253
|
+
* - `male` 男
|
|
254
|
+
* - `female` 女
|
|
255
|
+
* - `unknown` 未知
|
|
256
|
+
*/
|
|
257
|
+
type Sex = 'male' | 'female' | 'unknown';
|
|
258
|
+
/**
|
|
259
|
+
* 事件发送者身份 仅在群聊、频道中存在
|
|
260
|
+
* - `owner` 群主、频道主
|
|
261
|
+
* - `admin` 管理员、超管
|
|
262
|
+
* - `member` 群成员、频道成员
|
|
263
|
+
* - `unknown` 未知身份
|
|
264
|
+
*/
|
|
265
|
+
type Role = 'owner' | 'admin' | 'member' | 'unknown';
|
|
266
|
+
/**
|
|
267
|
+
* 事件发送者信息父类
|
|
268
|
+
*/
|
|
269
|
+
interface SenderBase {
|
|
270
|
+
/** 发送者ID */
|
|
271
|
+
userId: string;
|
|
272
|
+
/** 发送者昵称 与`name`一致 */
|
|
273
|
+
nick: string;
|
|
274
|
+
/** 发送者昵称 与`nick`一致 */
|
|
275
|
+
name: string;
|
|
276
|
+
/** 发送者性别 */
|
|
277
|
+
sex?: Sex;
|
|
278
|
+
/** 发送者年龄 */
|
|
279
|
+
age?: number;
|
|
280
|
+
/** 发送者uid QQ场景专属 */
|
|
281
|
+
uid?: string;
|
|
282
|
+
/** 发送者uin QQ场景专属 */
|
|
283
|
+
uin?: number;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* - 好友事件发送者信息
|
|
287
|
+
* - tips: 如果名称不存在则是空字符串
|
|
288
|
+
*/
|
|
289
|
+
type FriendSender = SenderBase;
|
|
290
|
+
/**
|
|
291
|
+
* - 群聊事件发送者信息
|
|
292
|
+
* - tips: 如果名称不存在则是空字符串
|
|
293
|
+
*/
|
|
294
|
+
interface GroupSender extends SenderBase {
|
|
295
|
+
/** 群成员身份 */
|
|
296
|
+
role: Role;
|
|
297
|
+
/** 群名片/备注 */
|
|
298
|
+
card?: string;
|
|
299
|
+
/** 地区 */
|
|
300
|
+
area?: string;
|
|
301
|
+
/** 成员等级 */
|
|
302
|
+
level?: number;
|
|
303
|
+
/** 专属头衔 */
|
|
304
|
+
title?: string;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* - 群聊临时会话事件发送者信息
|
|
308
|
+
* - tips: 如果名称不存在则是空字符串
|
|
309
|
+
*/
|
|
310
|
+
type GroupTempSender = SenderBase;
|
|
311
|
+
/**
|
|
312
|
+
* - 频道事件发送者信息
|
|
313
|
+
* - tips: 如果名称不存在则是空字符串
|
|
314
|
+
*/
|
|
315
|
+
interface GuildSender extends SenderBase {
|
|
316
|
+
/** 频道成员身份 */
|
|
317
|
+
role: Role;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* - 频道私信事件发送者信息
|
|
321
|
+
* - tips: 如果名称不存在则是空字符串
|
|
322
|
+
*/
|
|
323
|
+
type DirectSender = SenderBase;
|
|
324
|
+
/**
|
|
325
|
+
* 事件发送者信息
|
|
326
|
+
* - `friend`: 好友
|
|
327
|
+
* - `group`: 群聊
|
|
328
|
+
* - `guild`: 频道
|
|
329
|
+
* - `direct`: 频道私信
|
|
330
|
+
* - `groupTemp`: 临时群会话
|
|
331
|
+
* - `notice`: 通知
|
|
332
|
+
* - `request`: 请求
|
|
333
|
+
*/
|
|
334
|
+
type Sender<T extends Scene = Scene> = T extends 'friend' ? FriendSender : T extends 'group' ? GroupSender : T extends 'guild' ? GuildSender : T extends 'direct' ? DirectSender : T extends 'groupTemp' ? GroupTempSender : never;
|
|
335
|
+
/** 构建群聊场景的`sender`函数重载类型 */
|
|
336
|
+
interface SenderGroup {
|
|
337
|
+
/**
|
|
338
|
+
* 构建群聊场景的`sender`
|
|
339
|
+
* @param userId 用户ID
|
|
340
|
+
* @param role 群成员身份
|
|
341
|
+
* @param name 用户名
|
|
342
|
+
* @param sex 性别
|
|
343
|
+
* @param age 年龄
|
|
344
|
+
* @param card 群名片/备注
|
|
345
|
+
* @param area 地区
|
|
346
|
+
* @param level 成员等级
|
|
347
|
+
* @param title 专属头衔
|
|
348
|
+
* @param uid QQ场景专属
|
|
349
|
+
* @param uin QQ场景专属
|
|
350
|
+
*/
|
|
351
|
+
(userId: Sender<'group'>['userId'], role?: Sender<'group'>['role'], name?: Sender<'group'>['name'], sex?: Sender<'friend'>['sex'], age?: Sender<'friend'>['age'], card?: Sender<'group'>['card'], area?: Sender<'group'>['area'], level?: Sender<'group'>['level'], title?: Sender<'group'>['title'], uid?: Sender<'friend'>['uid'], uin?: Sender<'friend'>['uin']): Sender<'group'>;
|
|
352
|
+
(options: Sender<'group'>): Sender<'group'>;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* 适配器所属平台
|
|
357
|
+
* - `qq`: QQ
|
|
358
|
+
* - `wechat`: 微信
|
|
359
|
+
* - `telegram`: Telegram
|
|
360
|
+
* - `discord`: Discord
|
|
361
|
+
* - `koko`: 开黑吧
|
|
362
|
+
* - `other`: 其他
|
|
363
|
+
*/
|
|
364
|
+
type AdapterPlatform = 'qq' | 'wechat' | 'telegram' | 'discord' | 'koko' | 'other';
|
|
365
|
+
/**
|
|
366
|
+
* 适配器所使用的标准接口协议
|
|
367
|
+
* - `onebot11`: OneBot v11 标准
|
|
368
|
+
* - `onebot12`: OneBot v12 标准
|
|
369
|
+
* - `oicq`: OICQ 标准
|
|
370
|
+
* - `icqq`: OICQ fork 标准
|
|
371
|
+
* - `other`: 其他标准
|
|
372
|
+
*/
|
|
373
|
+
type AdapterStandard = 'onebot11' | 'onebot12' | 'oicq' | 'icqq' | 'other';
|
|
374
|
+
/**
|
|
375
|
+
* 适配器协议实现名称
|
|
376
|
+
* - `console`: 控制台
|
|
377
|
+
* - `qqbot`: https://bot.q.qq.com/wiki
|
|
378
|
+
* - `icqq`: https://github.com/icqqjs/icqq
|
|
379
|
+
* - `gocq-http`: https://docs.go-cqhttp.org/
|
|
380
|
+
* - `napcat`: https://napneko.github.io/zh-CN/
|
|
381
|
+
* - `oicq`: https://github.com/takayama-lily/oicq
|
|
382
|
+
* - `llonebot`: https://llonebot.github.io/zh-CN/
|
|
383
|
+
* - `conwechat`: https://justundertaker.github.io/ComWeChatBotClient/
|
|
384
|
+
* - `lagrange`: https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/
|
|
385
|
+
*/
|
|
386
|
+
type AdapterProtocol = 'qqbot' | 'icqq' | 'gocq-http' | 'napcat' | 'oicq' | 'llonebot' | 'conwechat' | 'lagrange' | 'console' | 'other';
|
|
387
|
+
/**
|
|
388
|
+
* 适配器通信方式
|
|
389
|
+
* - `http`: HTTP 通信
|
|
390
|
+
* - `webSocketServer`: WebSocket 服务端
|
|
391
|
+
* - `webSocketClient`: WebSocket 客户端
|
|
392
|
+
* - `grpc`: gRPC 通信
|
|
393
|
+
* - `other`: 其他通信方式
|
|
394
|
+
*/
|
|
395
|
+
type AdapterCommunication = 'http' | 'webSocketServer' | 'webSocketClient' | 'grpc' | 'other';
|
|
396
|
+
/**
|
|
397
|
+
* 适配器基本信息
|
|
398
|
+
*/
|
|
399
|
+
interface AdapterInfo {
|
|
400
|
+
/** 适配器索引 默认为-1 在注册适配器时会自动更改为对应的索引 */
|
|
401
|
+
index: number;
|
|
402
|
+
/** 适配器名称 如lagrange-onebot */
|
|
403
|
+
name: string;
|
|
404
|
+
/** 适配器版本 */
|
|
405
|
+
version: string;
|
|
406
|
+
/** 适配器平台 */
|
|
407
|
+
platform: AdapterPlatform;
|
|
408
|
+
/** 适配器使用的协议标准 如onebot11 */
|
|
409
|
+
standard: AdapterStandard;
|
|
410
|
+
/** 适配器协议实现 如gocq、napcat */
|
|
411
|
+
protocol: AdapterProtocol;
|
|
412
|
+
/** 适配器通信方式 */
|
|
413
|
+
communication: AdapterCommunication;
|
|
414
|
+
/**
|
|
415
|
+
* 适配器通信地址
|
|
416
|
+
* @example `http://127.0.0.1:7000`
|
|
417
|
+
* @example `ws://127.0.0.1:7000/ws`
|
|
418
|
+
* @example `grpc://127.0.0.1:7001`
|
|
419
|
+
* @example `internal://127.0.0.1`
|
|
420
|
+
*/
|
|
421
|
+
address: string;
|
|
422
|
+
/** 连接时间 */
|
|
423
|
+
connectTime: number;
|
|
424
|
+
/** 鉴权秘钥 */
|
|
425
|
+
secret: string | null;
|
|
426
|
+
}
|
|
427
|
+
|
|
324
428
|
/**
|
|
325
429
|
* 适配器账号信息
|
|
326
430
|
*/
|
|
@@ -831,110 +935,6 @@ type NodeElement = DirectNodeElement | CustomNodeElement;
|
|
|
831
935
|
/** 合并转发节点消息段 */
|
|
832
936
|
type SendElement = NodeElement | Elements;
|
|
833
937
|
|
|
834
|
-
/**
|
|
835
|
-
* 事件发送者性别
|
|
836
|
-
* - `male` 男
|
|
837
|
-
* - `female` 女
|
|
838
|
-
* - `unknown` 未知
|
|
839
|
-
*/
|
|
840
|
-
type Sex = 'male' | 'female' | 'unknown';
|
|
841
|
-
/**
|
|
842
|
-
* 事件发送者身份 仅在群聊、频道中存在
|
|
843
|
-
* - `owner` 群主、频道主
|
|
844
|
-
* - `admin` 管理员、超管
|
|
845
|
-
* - `member` 群成员、频道成员
|
|
846
|
-
* - `unknown` 未知身份
|
|
847
|
-
*/
|
|
848
|
-
type Role = 'owner' | 'admin' | 'member' | 'unknown';
|
|
849
|
-
/**
|
|
850
|
-
* 事件发送者信息父类
|
|
851
|
-
*/
|
|
852
|
-
interface SenderBase {
|
|
853
|
-
/** 发送者ID */
|
|
854
|
-
userId: string;
|
|
855
|
-
/** 发送者昵称 与`name`一致 */
|
|
856
|
-
nick: string;
|
|
857
|
-
/** 发送者昵称 与`nick`一致 */
|
|
858
|
-
name: string;
|
|
859
|
-
/** 发送者性别 */
|
|
860
|
-
sex?: Sex;
|
|
861
|
-
/** 发送者年龄 */
|
|
862
|
-
age?: number;
|
|
863
|
-
/** 发送者uid QQ场景专属 */
|
|
864
|
-
uid?: string;
|
|
865
|
-
/** 发送者uin QQ场景专属 */
|
|
866
|
-
uin?: number;
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* - 好友事件发送者信息
|
|
870
|
-
* - tips: 如果名称不存在则是空字符串
|
|
871
|
-
*/
|
|
872
|
-
type FriendSender = SenderBase;
|
|
873
|
-
/**
|
|
874
|
-
* - 群聊事件发送者信息
|
|
875
|
-
* - tips: 如果名称不存在则是空字符串
|
|
876
|
-
*/
|
|
877
|
-
interface GroupSender extends SenderBase {
|
|
878
|
-
/** 群成员身份 */
|
|
879
|
-
role: Role;
|
|
880
|
-
/** 群名片/备注 */
|
|
881
|
-
card?: string;
|
|
882
|
-
/** 地区 */
|
|
883
|
-
area?: string;
|
|
884
|
-
/** 成员等级 */
|
|
885
|
-
level?: number;
|
|
886
|
-
/** 专属头衔 */
|
|
887
|
-
title?: string;
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* - 群聊临时会话事件发送者信息
|
|
891
|
-
* - tips: 如果名称不存在则是空字符串
|
|
892
|
-
*/
|
|
893
|
-
type GroupTempSender = SenderBase;
|
|
894
|
-
/**
|
|
895
|
-
* - 频道事件发送者信息
|
|
896
|
-
* - tips: 如果名称不存在则是空字符串
|
|
897
|
-
*/
|
|
898
|
-
interface GuildSender extends SenderBase {
|
|
899
|
-
/** 频道成员身份 */
|
|
900
|
-
role: Role;
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* - 频道私信事件发送者信息
|
|
904
|
-
* - tips: 如果名称不存在则是空字符串
|
|
905
|
-
*/
|
|
906
|
-
type DirectSender = SenderBase;
|
|
907
|
-
/**
|
|
908
|
-
* 事件发送者信息
|
|
909
|
-
* - `friend`: 好友
|
|
910
|
-
* - `group`: 群聊
|
|
911
|
-
* - `guild`: 频道
|
|
912
|
-
* - `direct`: 频道私信
|
|
913
|
-
* - `groupTemp`: 临时群会话
|
|
914
|
-
* - `notice`: 通知
|
|
915
|
-
* - `request`: 请求
|
|
916
|
-
*/
|
|
917
|
-
type Sender<T extends Scene = Scene> = T extends 'friend' ? FriendSender : T extends 'group' ? GroupSender : T extends 'guild' ? GuildSender : T extends 'direct' ? DirectSender : T extends 'groupTemp' ? GroupTempSender : never;
|
|
918
|
-
/** 构建群聊场景的`sender`函数重载类型 */
|
|
919
|
-
interface SenderGroup {
|
|
920
|
-
/**
|
|
921
|
-
* 构建群聊场景的`sender`
|
|
922
|
-
* @param userId 用户ID
|
|
923
|
-
* @param role 群成员身份
|
|
924
|
-
* @param name 用户名
|
|
925
|
-
* @param sex 性别
|
|
926
|
-
* @param age 年龄
|
|
927
|
-
* @param card 群名片/备注
|
|
928
|
-
* @param area 地区
|
|
929
|
-
* @param level 成员等级
|
|
930
|
-
* @param title 专属头衔
|
|
931
|
-
* @param uid QQ场景专属
|
|
932
|
-
* @param uin QQ场景专属
|
|
933
|
-
*/
|
|
934
|
-
(userId: Sender<'group'>['userId'], role?: Sender<'group'>['role'], name?: Sender<'group'>['name'], sex?: Sender<'friend'>['sex'], age?: Sender<'friend'>['age'], card?: Sender<'group'>['card'], area?: Sender<'group'>['area'], level?: Sender<'group'>['level'], title?: Sender<'group'>['title'], uid?: Sender<'friend'>['uid'], uin?: Sender<'friend'>['uin']): Sender<'group'>;
|
|
935
|
-
(options: Sender<'group'>): Sender<'group'>;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
938
|
/** 发送消息后的通用返回值 */
|
|
939
939
|
interface SendMsgResults {
|
|
940
940
|
/** 消息ID */
|
|
@@ -2823,1489 +2823,34 @@ type ExecOptions<T extends boolean> = Parameters<typeof exec$1>[1] & {
|
|
|
2823
2823
|
booleanResult?: T;
|
|
2824
2824
|
};
|
|
2825
2825
|
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
/** 快速回复函数 */
|
|
2831
|
-
type Reply = (
|
|
2832
|
-
/** 发送的消息 */
|
|
2833
|
-
elements: SendMessage,
|
|
2834
|
-
/** 发送消息选项 */
|
|
2835
|
-
options?: {
|
|
2836
|
-
/** 是否@发送者 */
|
|
2837
|
-
at?: boolean;
|
|
2838
|
-
/** 是否引用回复发送者 */
|
|
2839
|
-
reply?: boolean;
|
|
2840
|
-
/** 撤回消息时间 默认为0不撤回 */
|
|
2841
|
-
recallMsg?: number;
|
|
2842
|
-
/** 重试次数 默认为0 */
|
|
2843
|
-
retryCount?: number;
|
|
2844
|
-
}) => Promise<SendMsgResults> | SendMsgResults;
|
|
2845
|
-
|
|
2846
|
-
/** 通知事件: 收到点赞 */
|
|
2847
|
-
interface ReceiveLikeType {
|
|
2848
|
-
/** 点赞者id */
|
|
2849
|
-
operatorId: string;
|
|
2850
|
-
/** 点赞者数量 */
|
|
2851
|
-
count: number;
|
|
2852
|
-
}
|
|
2853
|
-
/** 通知事件: 新增好友 */
|
|
2854
|
-
interface FriendIncreaseType {
|
|
2855
|
-
/** 新好友id */
|
|
2856
|
-
targetId: string;
|
|
2857
|
-
}
|
|
2858
|
-
/** 通知事件: 好友减少 */
|
|
2859
|
-
interface FriendDecreaseType {
|
|
2860
|
-
/** 减少的好友id */
|
|
2861
|
-
targetId: string;
|
|
2862
|
-
}
|
|
2863
|
-
/** 通知事件: 私聊戳一戳 */
|
|
2864
|
-
interface PrivatePokeType {
|
|
2865
|
-
/** 操作者id */
|
|
2866
|
-
operatorId: string;
|
|
2867
|
-
/** 被戳者id */
|
|
2868
|
-
targetId: string;
|
|
2869
|
-
/** 操作名称,如“戳了戳” */
|
|
2870
|
-
action: string;
|
|
2871
|
-
/** 后缀,未设置则未空字符串 */
|
|
2872
|
-
suffix: string;
|
|
2873
|
-
/** 操作图标url */
|
|
2874
|
-
actionImage: string;
|
|
2875
|
-
}
|
|
2876
|
-
/** 通知事件: 私聊撤回消息 */
|
|
2877
|
-
interface PrivateRecallType {
|
|
2878
|
-
/** 操作者id */
|
|
2879
|
-
operatorId: string;
|
|
2880
|
-
/** 撤回的消息id */
|
|
2881
|
-
messageId: string;
|
|
2882
|
-
/** 操作提示,如“撤回了一条消息” 一般此项为空字符串 */
|
|
2883
|
-
tips: string;
|
|
2884
|
-
}
|
|
2885
|
-
/**
|
|
2886
|
-
* 通知事件: 私聊文件上传
|
|
2887
|
-
* 文件信息最少需要提供一个url
|
|
2888
|
-
*/
|
|
2889
|
-
interface PrivateFileUploadedType {
|
|
2890
|
-
/** 操作者id */
|
|
2891
|
-
operatorId: string;
|
|
2892
|
-
/** 文件ID 此项没有则为空字符串 */
|
|
2893
|
-
fid: string;
|
|
2894
|
-
/** 文件子ID 此项没有则为空字符串 */
|
|
2895
|
-
subId: number;
|
|
2896
|
-
/** 文件名 此项没有则为空字符串 */
|
|
2897
|
-
name: string;
|
|
2898
|
-
/** 文件大小 此项没有则为0 */
|
|
2899
|
-
size: number;
|
|
2900
|
-
/** 过期时间 此项没有则为0 */
|
|
2901
|
-
expireTime: number;
|
|
2902
|
-
/** 文件URL */
|
|
2826
|
+
type Args = {
|
|
2827
|
+
e?: Event;
|
|
2828
|
+
} & Record<string, any>;
|
|
2829
|
+
type FileToUrlResult<T> = T extends 'image' ? {
|
|
2903
2830
|
url: string;
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
/** 操作名称,如“戳了戳” */
|
|
2910
|
-
action: string;
|
|
2911
|
-
/** 后缀,未设置则未空字符串 */
|
|
2912
|
-
suffix: string;
|
|
2913
|
-
/** 操作图标url */
|
|
2914
|
-
actionImage: string;
|
|
2915
|
-
/** 被戳目标id */
|
|
2916
|
-
targetId: string;
|
|
2917
|
-
}
|
|
2831
|
+
width: number;
|
|
2832
|
+
height: number;
|
|
2833
|
+
} : {
|
|
2834
|
+
url: string;
|
|
2835
|
+
};
|
|
2918
2836
|
/**
|
|
2919
|
-
*
|
|
2920
|
-
* 撤回自己消息时,operator和target为自己
|
|
2921
|
-
* 撤回别人消息时,operator为操作者,target为被撤回者
|
|
2837
|
+
* 文件转换为url类型
|
|
2922
2838
|
*/
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2839
|
+
type FileToUrlHandler = {
|
|
2840
|
+
<T extends 'image' | 'video' | 'record' | 'file'>(
|
|
2841
|
+
/** 文件类型 */
|
|
2842
|
+
type: T,
|
|
2843
|
+
/** 文件数据 */
|
|
2844
|
+
file: string | Buffer | Uint8Array,
|
|
2845
|
+
/** 文件名名称: `image.jpg` */
|
|
2846
|
+
filename: string,
|
|
2847
|
+
/** 自定义参数 如果传e记得符合规范 */
|
|
2848
|
+
args?: Args): Promise<FileToUrlResult<T>>;
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2933
2851
|
/**
|
|
2934
|
-
*
|
|
2935
|
-
*
|
|
2936
|
-
*/
|
|
2937
|
-
interface GroupFileUploadedType {
|
|
2938
|
-
/** 文件ID */
|
|
2939
|
-
fid: string;
|
|
2940
|
-
/** 文件子ID */
|
|
2941
|
-
subId: number;
|
|
2942
|
-
/** 文件名 */
|
|
2943
|
-
name: string;
|
|
2944
|
-
/** 文件大小 */
|
|
2945
|
-
size: number;
|
|
2946
|
-
/** 过期时间 */
|
|
2947
|
-
expireTime?: number;
|
|
2948
|
-
/** 文件URL */
|
|
2949
|
-
url?: string;
|
|
2950
|
-
}
|
|
2951
|
-
/** 通知事件: 群名片变动 */
|
|
2952
|
-
interface GroupCardChangedType {
|
|
2953
|
-
/** 操作者id */
|
|
2954
|
-
operatorId: string;
|
|
2955
|
-
/** 目标id */
|
|
2956
|
-
targetId: string;
|
|
2957
|
-
/** 新名片 */
|
|
2958
|
-
newCard: string;
|
|
2959
|
-
}
|
|
2960
|
-
/** 通知事件: 群成员头衔变动 */
|
|
2961
|
-
interface GroupMemberUniqueTitleChangedType {
|
|
2962
|
-
/** 目标id */
|
|
2963
|
-
targetId: string;
|
|
2964
|
-
/** 新头衔 */
|
|
2965
|
-
title: string;
|
|
2966
|
-
}
|
|
2967
|
-
/** 通知事件: 群精华消息变动 */
|
|
2968
|
-
interface GroupHlightsChangedType {
|
|
2969
|
-
/** 操作者id */
|
|
2970
|
-
operatorId: string;
|
|
2971
|
-
/** 发送者id */
|
|
2972
|
-
senderId: string;
|
|
2973
|
-
/** 被操作的消息id */
|
|
2974
|
-
messageId: string;
|
|
2975
|
-
/** 设置、取消精华 */
|
|
2976
|
-
isSet: boolean;
|
|
2977
|
-
}
|
|
2978
|
-
/** 通知事件: 群成员增加 */
|
|
2979
|
-
interface GroupMemberIncreaseType {
|
|
2980
|
-
/** 操作者id */
|
|
2981
|
-
operatorId: string;
|
|
2982
|
-
/** 加入者id */
|
|
2983
|
-
targetId: string;
|
|
2984
|
-
/** 加入方式 APPROVE:管理员批准 INVITE:管理员邀请 */
|
|
2985
|
-
type: 'invite' | 'approve';
|
|
2986
|
-
}
|
|
2987
|
-
/** 通知事件: 群成员减少 */
|
|
2988
|
-
interface GroupMemberDecreaseType {
|
|
2989
|
-
/** 操作者id */
|
|
2990
|
-
operatorId: string;
|
|
2991
|
-
/** 目标id */
|
|
2992
|
-
targetId: string;
|
|
2993
|
-
/** 减少方式 leave:主动退群 kick:成员被踢 kickBot:机器人自身被踢 */
|
|
2994
|
-
type: 'leave' | 'kick' | 'kickBot';
|
|
2995
|
-
}
|
|
2996
|
-
/** 通知事件: 群管理员变动 */
|
|
2997
|
-
interface GroupAdminChangedType {
|
|
2998
|
-
/** 目标id */
|
|
2999
|
-
targetId: string;
|
|
3000
|
-
/** 设置、取消管理员 */
|
|
3001
|
-
isAdmin: boolean;
|
|
3002
|
-
}
|
|
3003
|
-
/** 通知事件: 群打卡 */
|
|
3004
|
-
interface GroupSignInType {
|
|
3005
|
-
/** 目标id */
|
|
3006
|
-
targetId: string;
|
|
3007
|
-
/** 操作名称,如“打卡了” */
|
|
3008
|
-
action: string;
|
|
3009
|
-
/** 打卡图标url */
|
|
3010
|
-
rankImage: string;
|
|
3011
|
-
}
|
|
3012
|
-
/** 通知事件: 群成员被禁言 */
|
|
3013
|
-
interface GroupMemberBanType {
|
|
3014
|
-
/** 操作者id */
|
|
3015
|
-
operatorId: string;
|
|
3016
|
-
/** 目标id */
|
|
3017
|
-
targetId: string;
|
|
3018
|
-
/** 禁言时长,单位秒 */
|
|
3019
|
-
duration: number;
|
|
3020
|
-
/** 是否为禁言 */
|
|
3021
|
-
isBan: boolean;
|
|
3022
|
-
}
|
|
3023
|
-
/** 通知事件: 群全员禁言 */
|
|
3024
|
-
interface GroupWholeBanType {
|
|
3025
|
-
/** 操作者id */
|
|
3026
|
-
operatorId: string;
|
|
3027
|
-
/** 是否开启全体禁言 */
|
|
3028
|
-
isBan: boolean;
|
|
3029
|
-
}
|
|
3030
|
-
/** 通知事件: 群表情动态 */
|
|
3031
|
-
interface GroupMessageReactionType {
|
|
3032
|
-
/** 消息ID */
|
|
3033
|
-
messageId: string;
|
|
3034
|
-
/** 表情ID 参考: https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#EmojiType */
|
|
3035
|
-
faceId: number;
|
|
3036
|
-
/** 数量 */
|
|
3037
|
-
count: number;
|
|
3038
|
-
/** 添加、取消回应 */
|
|
3039
|
-
isSet: boolean;
|
|
3040
|
-
}
|
|
3041
|
-
/** 通知事件: 群聊运气王 */
|
|
3042
|
-
interface GroupLuckKingType {
|
|
3043
|
-
/** 红包发送者id */
|
|
3044
|
-
userId: string;
|
|
3045
|
-
/** 运气王id */
|
|
3046
|
-
targetId: string;
|
|
3047
|
-
}
|
|
3048
|
-
/** 通知事件: 群聊荣誉变更事件 */
|
|
3049
|
-
interface GroupHonorChangedType {
|
|
3050
|
-
/** 荣誉类型,分别表示龙王、群聊之火、快乐源泉 */
|
|
3051
|
-
honorType: 'talkative' | 'performer' | 'emotion';
|
|
3052
|
-
}
|
|
3053
|
-
/** 请求事件: 好友申请 */
|
|
3054
|
-
interface PrivateApplyType {
|
|
3055
|
-
/** 申请者id */
|
|
3056
|
-
applierId: string;
|
|
3057
|
-
/** 验证信息 */
|
|
3058
|
-
message: string;
|
|
3059
|
-
/** 请求 flag,在调用处理请求的 API 时需要传入 */
|
|
3060
|
-
flag: string;
|
|
3061
|
-
}
|
|
3062
|
-
/** 请求事件: 新成员申请加入群聊申请 */
|
|
3063
|
-
interface GroupApply {
|
|
3064
|
-
/** 申请者id */
|
|
3065
|
-
applierId: string;
|
|
3066
|
-
/** 邀请者id */
|
|
3067
|
-
inviterId: string;
|
|
3068
|
-
/** 申请理由 */
|
|
3069
|
-
reason: string;
|
|
3070
|
-
/** 请求 flag,在调用处理请求的 API 时需要传入 */
|
|
3071
|
-
flag: string;
|
|
3072
|
-
/** 群id */
|
|
3073
|
-
groupId: string;
|
|
3074
|
-
}
|
|
3075
|
-
/** 请求事件: 邀请Bot加入群聊 */
|
|
3076
|
-
interface GroupInvite {
|
|
3077
|
-
/** 邀请者id */
|
|
3078
|
-
inviterId: string;
|
|
3079
|
-
/** 请求 flag,在调用处理请求的 API 时需要传入 */
|
|
3080
|
-
flag: string;
|
|
3081
|
-
}
|
|
3082
|
-
|
|
3083
|
-
/**
|
|
3084
|
-
* 事件父类型
|
|
3085
|
-
* - `message`: 消息事件
|
|
3086
|
-
* - `notice`: 通知事件
|
|
3087
|
-
* - `request`: 请求事件
|
|
3088
|
-
*/
|
|
3089
|
-
type EventParent = 'message' | 'notice' | 'request';
|
|
3090
|
-
/**
|
|
3091
|
-
* `消息`事件子类型
|
|
3092
|
-
* - `group`: 群消息
|
|
3093
|
-
* - `friend`: 好友消息
|
|
3094
|
-
* - `guild`: 频道消息
|
|
3095
|
-
* - `direct`: 频道私信
|
|
3096
|
-
* - `groupTemp`: 群临时会话
|
|
3097
|
-
*/
|
|
3098
|
-
type MessageEventSub = 'group' | 'friend' | 'guild' | 'direct' | 'groupTemp';
|
|
3099
|
-
/**
|
|
3100
|
-
* `通知`事件子类型
|
|
3101
|
-
* - `receiveLike`: 收到点赞
|
|
3102
|
-
* - `friendPoke`: 好友戳一戳
|
|
3103
|
-
* - `friendRecall`: 好友撤回消息
|
|
3104
|
-
* - `friendFileUploaded`: 好友发送文件
|
|
3105
|
-
* - `friendIncrease`: 好友增加
|
|
3106
|
-
* - `friendDecrease`: 好友减少
|
|
3107
|
-
*
|
|
3108
|
-
* - `groupPoke`: 群聊戳一戳
|
|
3109
|
-
* - `groupCardChanged`: 群聊名片变动
|
|
3110
|
-
* - `groupMemberTitleUpdate`: 群聊成员头衔变动
|
|
3111
|
-
* - `groupHighlightsChange`: 群聊精华消息变动
|
|
3112
|
-
* - `groupRecall`: 群聊撤回消息
|
|
3113
|
-
* - `groupMemberAdd`: 群聊成员增加
|
|
3114
|
-
* - `groupMemberRemove`: 群聊成员减少
|
|
3115
|
-
* - `groupAdminChanged`: 群聊管理员变动
|
|
3116
|
-
* - `groupMemberBan`: 群聊成员禁言
|
|
3117
|
-
* - `groupSignIn`: 群聊签到
|
|
3118
|
-
* - `groupWholeBan`: 群聊全员禁言
|
|
3119
|
-
* - `groupFileUploaded`: 群聊发送文件
|
|
3120
|
-
* - `groupMessageReaction`: 群聊消息表情动态回应
|
|
3121
|
-
* - `groupLuckyKing`: 群聊运气王事件
|
|
3122
|
-
* - `groupHonorChange`: 群聊荣誉变更事件
|
|
3123
|
-
*/
|
|
3124
|
-
type NoticeEventSub =
|
|
3125
|
-
/** 收到点赞 */
|
|
3126
|
-
'receiveLike'
|
|
3127
|
-
/** 好友戳一戳 */
|
|
3128
|
-
| 'friendPoke'
|
|
3129
|
-
/** 好友撤回消息 */
|
|
3130
|
-
| 'friendRecall'
|
|
3131
|
-
/** 好友发送文件 */
|
|
3132
|
-
| 'friendFileUploaded'
|
|
3133
|
-
/** 好友增加 */
|
|
3134
|
-
| 'friendIncrease'
|
|
3135
|
-
/** 好友减少 */
|
|
3136
|
-
| 'friendDecrease'
|
|
3137
|
-
/** 群聊戳一戳 */
|
|
3138
|
-
| 'groupPoke'
|
|
3139
|
-
/** 群聊名片变动 */
|
|
3140
|
-
| 'groupCardChanged'
|
|
3141
|
-
/** 群聊成员头衔变动 */
|
|
3142
|
-
| 'groupMemberTitleUpdate'
|
|
3143
|
-
/** 群聊精华消息变动 */
|
|
3144
|
-
| 'groupHighlightsChange'
|
|
3145
|
-
/** 群聊撤回消息 */
|
|
3146
|
-
| 'groupRecall'
|
|
3147
|
-
/** 群聊成员增加 */
|
|
3148
|
-
| 'groupMemberAdd'
|
|
3149
|
-
/** 群聊成员减少 */
|
|
3150
|
-
| 'groupMemberRemove'
|
|
3151
|
-
/** 群聊管理员变动 */
|
|
3152
|
-
| 'groupAdminChanged'
|
|
3153
|
-
/** 群聊成员禁言 */
|
|
3154
|
-
| 'groupMemberBan'
|
|
3155
|
-
/** 群聊签到 */
|
|
3156
|
-
| 'groupSignIn'
|
|
3157
|
-
/** 群聊全员禁言 */
|
|
3158
|
-
| 'groupWholeBan'
|
|
3159
|
-
/** 群聊发送文件 */
|
|
3160
|
-
| 'groupFileUploaded'
|
|
3161
|
-
/** 群聊消息表情动态回应 */
|
|
3162
|
-
| 'groupMessageReaction'
|
|
3163
|
-
/** 群聊运气王事件 */
|
|
3164
|
-
| 'groupLuckyKing'
|
|
3165
|
-
/** 群聊荣誉变更事件 */
|
|
3166
|
-
| 'groupHonorChange';
|
|
3167
|
-
/**
|
|
3168
|
-
* `请求`事件子类型
|
|
3169
|
-
* - `friendApply`: 收到添加Bot为好友请求
|
|
3170
|
-
* - `groupApply`: 收到用户申请加入群聊请求
|
|
3171
|
-
* - `groupInvite`: 收到邀请Bot加入群聊请求
|
|
3172
|
-
*/
|
|
3173
|
-
type RequestEventSub = 'friendApply' | 'groupApply' | 'groupInvite';
|
|
3174
|
-
/**
|
|
3175
|
-
* 事件父类型与子类型的映射
|
|
3176
|
-
*/
|
|
3177
|
-
interface EventToSubEvent {
|
|
3178
|
-
message: MessageEventSub;
|
|
3179
|
-
notice: NoticeEventSub;
|
|
3180
|
-
request: RequestEventSub;
|
|
3181
|
-
}
|
|
3182
|
-
/**
|
|
3183
|
-
* 事件基类定义
|
|
3184
|
-
* @description 所有的事件都拥有这些基本属性
|
|
3185
|
-
*/
|
|
3186
|
-
interface BaseEventType<T extends EventParent> {
|
|
3187
|
-
/** 机器人ID */
|
|
3188
|
-
selfId: string;
|
|
3189
|
-
/** 用户ID */
|
|
3190
|
-
userId: string;
|
|
3191
|
-
/** 事件类型 */
|
|
3192
|
-
event: T;
|
|
3193
|
-
/** 事件子类型 */
|
|
3194
|
-
subEvent: EventToSubEvent[T];
|
|
3195
|
-
/** 事件ID */
|
|
3196
|
-
eventId: string;
|
|
3197
|
-
/** 原始事件 */
|
|
3198
|
-
rawEvent: any;
|
|
3199
|
-
/** 事件触发时间戳 */
|
|
3200
|
-
time: number;
|
|
3201
|
-
/** 事件联系人信息 */
|
|
3202
|
-
contact: Contact;
|
|
3203
|
-
/** 事件发送者信息 */
|
|
3204
|
-
sender: Sender;
|
|
3205
|
-
/** 快速回复源函数 适配器实现 */
|
|
3206
|
-
srcReply: SrcReply;
|
|
3207
|
-
/** bot自身实例 所有标准Api都通过这里调用 */
|
|
3208
|
-
bot: AdapterType;
|
|
3209
|
-
}
|
|
3210
|
-
/** 事件基类参数 */
|
|
3211
|
-
type BaseEventOptions<T extends EventParent> = Omit<BaseEventType<T>, 'userId' | 'selfId'>;
|
|
3212
|
-
/** 创建消息事件类所需参数类型 */
|
|
3213
|
-
type MessageOptions = Omit<BaseEventOptions<'message'>, 'event'> & {
|
|
3214
|
-
/** 消息ID */
|
|
3215
|
-
messageId: string;
|
|
3216
|
-
/** 消息序列号 */
|
|
3217
|
-
messageSeq: number;
|
|
3218
|
-
/** 消息体元素 */
|
|
3219
|
-
elements: Elements[];
|
|
3220
|
-
};
|
|
3221
|
-
/** 创建好友消息事件所需参数类型 */
|
|
3222
|
-
type FriendMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
3223
|
-
/** 事件来源好友信息 */
|
|
3224
|
-
contact: Contact<'friend'>;
|
|
3225
|
-
/** 好友发送者信息 */
|
|
3226
|
-
sender: Sender<'friend'>;
|
|
3227
|
-
};
|
|
3228
|
-
/** 创建群消息事件所需参数类型 */
|
|
3229
|
-
type GroupMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
3230
|
-
/** 事件来源群信息 */
|
|
3231
|
-
contact: Contact<'group'>;
|
|
3232
|
-
/** 群发送者信息 */
|
|
3233
|
-
sender: Sender<'group'>;
|
|
3234
|
-
};
|
|
3235
|
-
/** 创建频道消息事件所需参数类型 */
|
|
3236
|
-
type GuildMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
3237
|
-
/** 事件来源频道信息 */
|
|
3238
|
-
contact: Contact<'guild'>;
|
|
3239
|
-
/** 频道发送者信息 */
|
|
3240
|
-
sender: Sender<'guild'>;
|
|
3241
|
-
};
|
|
3242
|
-
/** 创建频道私信消息事件所需参数类型 */
|
|
3243
|
-
type DirectMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
3244
|
-
/** 事件来源频道私信信息 */
|
|
3245
|
-
contact: Contact<'direct'>;
|
|
3246
|
-
/** 频道私信发送者信息 */
|
|
3247
|
-
sender: Sender<'direct'>;
|
|
3248
|
-
/** 来源频道ID */
|
|
3249
|
-
srcGuildId: string;
|
|
3250
|
-
};
|
|
3251
|
-
/** 创建群临时会话消息事件所需参数类型 */
|
|
3252
|
-
type GroupTempMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
3253
|
-
/** 事件来源群临时会话信息 */
|
|
3254
|
-
contact: Contact<'groupTemp'>;
|
|
3255
|
-
/** 群临时会话发送者信息 */
|
|
3256
|
-
sender: Sender<'groupTemp'>;
|
|
3257
|
-
};
|
|
3258
|
-
/** 通知事件: 创建通知事件类所需参数类型 */
|
|
3259
|
-
type NoticeOptions = Omit<BaseEventOptions<'notice'>, 'event' | 'sender'> & {
|
|
3260
|
-
sender: Sender;
|
|
3261
|
-
};
|
|
3262
|
-
/** 创建收到点赞通知事件 */
|
|
3263
|
-
type ReceiveLikeOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3264
|
-
/** 事件来源信息 */
|
|
3265
|
-
contact: Contact<'friend'>;
|
|
3266
|
-
/** 事件创建者信息 */
|
|
3267
|
-
sender: Sender<'friend'>;
|
|
3268
|
-
/** 请求内容 */
|
|
3269
|
-
content: ReceiveLikeType;
|
|
3270
|
-
};
|
|
3271
|
-
/** 创建好友增加通知事件 */
|
|
3272
|
-
type FriendIncreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3273
|
-
/** 事件来源信息 */
|
|
3274
|
-
contact: Contact<'friend'>;
|
|
3275
|
-
/** 事件创建者信息 */
|
|
3276
|
-
sender: Sender<'friend'>;
|
|
3277
|
-
/** 请求内容 */
|
|
3278
|
-
content: FriendIncreaseType;
|
|
3279
|
-
};
|
|
3280
|
-
/** 创建好友减少通知事件 */
|
|
3281
|
-
type FriendDecreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3282
|
-
/** 事件来源信息 */
|
|
3283
|
-
contact: Contact<'friend'>;
|
|
3284
|
-
/** 事件创建者信息 */
|
|
3285
|
-
sender: Sender<'friend'>;
|
|
3286
|
-
/** 请求内容 */
|
|
3287
|
-
content: FriendDecreaseType;
|
|
3288
|
-
};
|
|
3289
|
-
/** 创建私聊戳一戳通知事件 */
|
|
3290
|
-
type PrivatePokeOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3291
|
-
/** 事件来源信息 */
|
|
3292
|
-
contact: Contact<'friend'>;
|
|
3293
|
-
/** 事件创建者信息 */
|
|
3294
|
-
sender: Sender<'friend'>;
|
|
3295
|
-
/** 请求内容 */
|
|
3296
|
-
content: PrivatePokeType;
|
|
3297
|
-
};
|
|
3298
|
-
/** 创建私聊撤回消息通知事件 */
|
|
3299
|
-
type PrivateRecallOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3300
|
-
/** 事件来源信息 */
|
|
3301
|
-
contact: Contact<'friend'>;
|
|
3302
|
-
/** 事件创建者信息 */
|
|
3303
|
-
sender: Sender<'friend'>;
|
|
3304
|
-
/** 请求内容 */
|
|
3305
|
-
content: PrivateRecallType;
|
|
3306
|
-
};
|
|
3307
|
-
/** 创建私聊文件上传通知事件 */
|
|
3308
|
-
type PrivateFileUploadedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3309
|
-
/** 事件来源信息 */
|
|
3310
|
-
contact: Contact<'friend'>;
|
|
3311
|
-
/** 事件创建者信息 */
|
|
3312
|
-
sender: Sender<'friend'>;
|
|
3313
|
-
/** 请求内容 */
|
|
3314
|
-
content: PrivateFileUploadedType;
|
|
3315
|
-
};
|
|
3316
|
-
/** 创建群聊戳一戳通知事件 */
|
|
3317
|
-
type GroupPokeOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3318
|
-
/** 事件来源信息 */
|
|
3319
|
-
contact: Contact<'group'>;
|
|
3320
|
-
/** 事件创建者信息 */
|
|
3321
|
-
sender: Sender<'group'>;
|
|
3322
|
-
/** 请求内容 */
|
|
3323
|
-
content: GroupPokeType;
|
|
3324
|
-
};
|
|
3325
|
-
/** 创建群聊撤回通知事件 */
|
|
3326
|
-
type GroupRecallOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3327
|
-
/** 事件来源信息 */
|
|
3328
|
-
contact: Contact<'group'>;
|
|
3329
|
-
/** 事件创建者信息 */
|
|
3330
|
-
sender: Sender<'group'>;
|
|
3331
|
-
/** 请求内容 */
|
|
3332
|
-
content: GroupRecallType;
|
|
3333
|
-
};
|
|
3334
|
-
/** 创建群聊文件上传通知事件 */
|
|
3335
|
-
type GroupFileUploadedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3336
|
-
/** 事件来源信息 */
|
|
3337
|
-
contact: Contact<'group'>;
|
|
3338
|
-
/** 事件创建者信息 */
|
|
3339
|
-
sender: Sender<'group'>;
|
|
3340
|
-
/** 请求内容 */
|
|
3341
|
-
content: GroupFileUploadedType;
|
|
3342
|
-
};
|
|
3343
|
-
/** 创建群名片变动通知事件 */
|
|
3344
|
-
type GroupCardChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3345
|
-
/** 事件来源信息 */
|
|
3346
|
-
contact: Contact<'group'>;
|
|
3347
|
-
/** 事件创建者信息 */
|
|
3348
|
-
sender: Sender<'group'>;
|
|
3349
|
-
/** 请求内容 */
|
|
3350
|
-
content: GroupCardChangedType;
|
|
3351
|
-
};
|
|
3352
|
-
/** 创建群成员头衔变动通知事件 */
|
|
3353
|
-
type GroupMemberUniqueTitleChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3354
|
-
/** 事件来源信息 */
|
|
3355
|
-
contact: Contact<'group'>;
|
|
3356
|
-
/** 事件创建者信息 */
|
|
3357
|
-
sender: Sender<'group'>;
|
|
3358
|
-
/** 请求内容 */
|
|
3359
|
-
content: GroupMemberUniqueTitleChangedType;
|
|
3360
|
-
};
|
|
3361
|
-
/** 创建群精华消息变动通知事件 */
|
|
3362
|
-
type GroupHlightsChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3363
|
-
/** 事件来源信息 */
|
|
3364
|
-
contact: Contact<'group'>;
|
|
3365
|
-
/** 事件创建者信息 */
|
|
3366
|
-
sender: Sender<'group'>;
|
|
3367
|
-
/** 请求内容 */
|
|
3368
|
-
content: GroupHlightsChangedType;
|
|
3369
|
-
};
|
|
3370
|
-
/** 创建群成员增加通知事件 */
|
|
3371
|
-
type GroupMemberIncreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3372
|
-
/** 事件来源信息 */
|
|
3373
|
-
contact: Contact<'group'>;
|
|
3374
|
-
/** 事件创建者信息 */
|
|
3375
|
-
sender: Sender<'group'>;
|
|
3376
|
-
/** 请求内容 */
|
|
3377
|
-
content: GroupMemberIncreaseType;
|
|
3378
|
-
};
|
|
3379
|
-
/** 创建群成员减少通知事件 */
|
|
3380
|
-
type GroupMemberDecreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3381
|
-
/** 事件来源信息 */
|
|
3382
|
-
contact: Contact<'group'>;
|
|
3383
|
-
/** 事件创建者信息 */
|
|
3384
|
-
sender: Sender<'group'>;
|
|
3385
|
-
/** 请求内容 */
|
|
3386
|
-
content: GroupMemberDecreaseType;
|
|
3387
|
-
};
|
|
3388
|
-
/** 创建群管理员变动通知事件 */
|
|
3389
|
-
type GroupAdminChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3390
|
-
/** 事件来源信息 */
|
|
3391
|
-
contact: Contact<'group'>;
|
|
3392
|
-
/** 事件创建者信息 */
|
|
3393
|
-
sender: Sender<'group'>;
|
|
3394
|
-
/** 请求内容 */
|
|
3395
|
-
content: GroupAdminChangedType;
|
|
3396
|
-
};
|
|
3397
|
-
/** 创建群打卡通知事件 */
|
|
3398
|
-
type GroupSignInOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3399
|
-
/** 事件来源信息 */
|
|
3400
|
-
contact: Contact<'group'>;
|
|
3401
|
-
/** 事件创建者信息 */
|
|
3402
|
-
sender: Sender<'group'>;
|
|
3403
|
-
/** 请求内容 */
|
|
3404
|
-
content: GroupSignInType;
|
|
3405
|
-
};
|
|
3406
|
-
/** 创建群成员被禁言通知事件 */
|
|
3407
|
-
type GroupMemberBanOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3408
|
-
/** 事件来源信息 */
|
|
3409
|
-
contact: Contact<'group'>;
|
|
3410
|
-
/** 事件创建者信息 */
|
|
3411
|
-
sender: Sender<'group'>;
|
|
3412
|
-
/** 请求内容 */
|
|
3413
|
-
content: GroupMemberBanType;
|
|
3414
|
-
};
|
|
3415
|
-
/** 创建群全员禁言通知事件 */
|
|
3416
|
-
type GroupWholeBanOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3417
|
-
/** 事件来源信息 */
|
|
3418
|
-
contact: Contact<'group'>;
|
|
3419
|
-
/** 事件创建者信息 */
|
|
3420
|
-
sender: Sender<'group'>;
|
|
3421
|
-
/** 请求内容 */
|
|
3422
|
-
content: GroupWholeBanType;
|
|
3423
|
-
};
|
|
3424
|
-
/** 创建群表情动态通知事件 */
|
|
3425
|
-
type GroupMessageReactionOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3426
|
-
/** 事件来源信息 */
|
|
3427
|
-
contact: Contact<'group'>;
|
|
3428
|
-
/** 事件创建者信息 */
|
|
3429
|
-
sender: Sender<'group'>;
|
|
3430
|
-
/** 请求内容 */
|
|
3431
|
-
content: GroupMessageReactionType;
|
|
3432
|
-
};
|
|
3433
|
-
/** 创建群聊运气王通知事件 */
|
|
3434
|
-
type GroupLuckKingOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3435
|
-
/** 事件来源信息 */
|
|
3436
|
-
contact: Contact<'group'>;
|
|
3437
|
-
/** 事件创建者信息 */
|
|
3438
|
-
sender: Sender<'group'>;
|
|
3439
|
-
/** 请求内容 */
|
|
3440
|
-
content: GroupLuckKingType;
|
|
3441
|
-
};
|
|
3442
|
-
/** 创建群聊荣誉变更通知事件 */
|
|
3443
|
-
type GroupHonorChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
3444
|
-
/** 事件来源信息 */
|
|
3445
|
-
contact: Contact<'group'>;
|
|
3446
|
-
/** 事件创建者信息 */
|
|
3447
|
-
sender: Sender<'group'>;
|
|
3448
|
-
/** 请求内容 */
|
|
3449
|
-
content: GroupHonorChangedType;
|
|
3450
|
-
};
|
|
3451
|
-
/** 创建请求事件类所需参数类型 */
|
|
3452
|
-
type RequestOptions = Omit<BaseEventOptions<'request'>, 'event'> & {
|
|
3453
|
-
/** 请求内容 */
|
|
3454
|
-
content: any;
|
|
3455
|
-
};
|
|
3456
|
-
/** 创建好友申请请求事件 */
|
|
3457
|
-
type PrivateApplyRequestOptions = RequestOptions & {
|
|
3458
|
-
/** 事件来源信息 */
|
|
3459
|
-
contact: Contact<'friend'>;
|
|
3460
|
-
/** 事件创建者信息 */
|
|
3461
|
-
sender: Sender<'friend'>;
|
|
3462
|
-
/** 请求内容 */
|
|
3463
|
-
content: PrivateApplyType;
|
|
3464
|
-
};
|
|
3465
|
-
type FriendRequestOptions = PrivateApplyRequestOptions;
|
|
3466
|
-
/** 创建新成员加入群聊申请请求事件 */
|
|
3467
|
-
type GroupApplyRequestOptions = RequestOptions & {
|
|
3468
|
-
/** 事件来源信息 */
|
|
3469
|
-
contact: Contact<'group'>;
|
|
3470
|
-
/** 事件创建者信息 */
|
|
3471
|
-
sender: Sender<'group'>;
|
|
3472
|
-
/** 请求内容 */
|
|
3473
|
-
content: GroupApply;
|
|
3474
|
-
};
|
|
3475
|
-
/** 创建邀请机器人加入群聊请求事件 */
|
|
3476
|
-
type GroupInviteRequestOptions = RequestOptions & {
|
|
3477
|
-
/** 事件来源信息 */
|
|
3478
|
-
contact: Contact<'group'>;
|
|
3479
|
-
/** 事件创建者信息 */
|
|
3480
|
-
sender: Sender<'group'>;
|
|
3481
|
-
/** 请求内容 */
|
|
3482
|
-
content: GroupInvite;
|
|
3483
|
-
};
|
|
3484
|
-
|
|
3485
|
-
/** 事件实现基类 */
|
|
3486
|
-
declare abstract class BaseEvent<T extends EventParent> {
|
|
3487
|
-
#private;
|
|
3488
|
-
/** 快速回复 */
|
|
3489
|
-
reply: Reply;
|
|
3490
|
-
/** 存储器 由开发者自行调用 */
|
|
3491
|
-
store: Map<any, any>;
|
|
3492
|
-
/** 日志函数字符串 */
|
|
3493
|
-
logFnc: string;
|
|
3494
|
-
/** 日志用户字符串 */
|
|
3495
|
-
logText: string;
|
|
3496
|
-
/** 是否为主人 */
|
|
3497
|
-
isMaster: boolean;
|
|
3498
|
-
/** 是否为Bot管理员 */
|
|
3499
|
-
isAdmin: boolean;
|
|
3500
|
-
constructor({ event, subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, }: BaseEventOptions<T>);
|
|
3501
|
-
/**
|
|
3502
|
-
* @description 机器人ID
|
|
3503
|
-
* @deprecated 即将废弃,请使用 `selfId`
|
|
3504
|
-
*/
|
|
3505
|
-
get self_id(): string;
|
|
3506
|
-
/**
|
|
3507
|
-
* @description 用户ID
|
|
3508
|
-
* @deprecated 即将废弃,请使用 `userId`
|
|
3509
|
-
*/
|
|
3510
|
-
get user_id(): string;
|
|
3511
|
-
/** 机器人自身ID */
|
|
3512
|
-
get selfId(): string;
|
|
3513
|
-
/** 用户ID */
|
|
3514
|
-
get userId(): string;
|
|
3515
|
-
/** 事件父类型 */
|
|
3516
|
-
get event(): T;
|
|
3517
|
-
/** 事件子类型 */
|
|
3518
|
-
get subEvent(): EventToSubEvent[T];
|
|
3519
|
-
/** 事件ID */
|
|
3520
|
-
get eventId(): string;
|
|
3521
|
-
/** 原始事件 */
|
|
3522
|
-
get rawEvent(): unknown;
|
|
3523
|
-
/** 事件触发时间戳 */
|
|
3524
|
-
get time(): number;
|
|
3525
|
-
/** 事件来源信息 */
|
|
3526
|
-
get contact(): Contact;
|
|
3527
|
-
/** 事件发送者信息 */
|
|
3528
|
-
get sender(): Sender;
|
|
3529
|
-
/** 快速回复源函数 */
|
|
3530
|
-
get srcReply(): SrcReply;
|
|
3531
|
-
/** 机器人实例 */
|
|
3532
|
-
get bot(): AdapterType;
|
|
3533
|
-
/**
|
|
3534
|
-
* 是否为私聊场景
|
|
3535
|
-
* - 在好友场景下为 `true`
|
|
3536
|
-
* - 在频道私信场景下为 `true`
|
|
3537
|
-
*/
|
|
3538
|
-
get isPrivate(): boolean;
|
|
3539
|
-
/** 是否为好友场景 */
|
|
3540
|
-
get isFriend(): boolean;
|
|
3541
|
-
/** 是否为群聊场景 */
|
|
3542
|
-
get isGroup(): boolean;
|
|
3543
|
-
/** 是否为频道场景 */
|
|
3544
|
-
get isGuild(): boolean;
|
|
3545
|
-
/** 是否为群临时会话场景 */
|
|
3546
|
-
get isGroupTemp(): boolean;
|
|
3547
|
-
/** 是否为频道私信场景 */
|
|
3548
|
-
get isDirect(): boolean;
|
|
3549
|
-
}
|
|
3550
|
-
|
|
3551
|
-
/**
|
|
3552
|
-
* @description 消息事件基类
|
|
3553
|
-
* @class FriendMessage
|
|
3554
|
-
*/
|
|
3555
|
-
declare abstract class MessageBase extends BaseEvent<'message'> {
|
|
3556
|
-
#private;
|
|
3557
|
-
/** 消息段 */
|
|
3558
|
-
elements: Elements[];
|
|
3559
|
-
/** 消息文本 */
|
|
3560
|
-
msg: string;
|
|
3561
|
-
/** 别名 */
|
|
3562
|
-
alias: string;
|
|
3563
|
-
/** 消息日志 */
|
|
3564
|
-
rawMessage: string;
|
|
3565
|
-
constructor({ subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, messageId, messageSeq, elements, }: MessageOptions);
|
|
3566
|
-
/**
|
|
3567
|
-
* @deprecated 即将废弃 请使用 `rawMessage`
|
|
3568
|
-
*/
|
|
3569
|
-
get raw_message(): string;
|
|
3570
|
-
/**
|
|
3571
|
-
* @description 消息ID
|
|
3572
|
-
* @deprecated 即将废弃 请使用 `messageId`
|
|
3573
|
-
*/
|
|
3574
|
-
get message_id(): string;
|
|
3575
|
-
/**
|
|
3576
|
-
* @description 消息序列号
|
|
3577
|
-
* @deprecated 即将废弃 请使用 `messageSeq`
|
|
3578
|
-
*/
|
|
3579
|
-
get message_seq(): number;
|
|
3580
|
-
get event(): "message";
|
|
3581
|
-
get subEvent(): MessageEventSub;
|
|
3582
|
-
get messageId(): string;
|
|
3583
|
-
get messageSeq(): number;
|
|
3584
|
-
get at(): string[];
|
|
3585
|
-
get atBot(): boolean;
|
|
3586
|
-
get atAll(): boolean;
|
|
3587
|
-
get image(): string[];
|
|
3588
|
-
get record(): string;
|
|
3589
|
-
get replyId(): string;
|
|
3590
|
-
/**
|
|
3591
|
-
* @description 引用回复的消息id
|
|
3592
|
-
* @deprecated 即将废弃 请使用 `replyId`
|
|
3593
|
-
*/
|
|
3594
|
-
get reply_id(): string;
|
|
3595
|
-
}
|
|
3596
|
-
/**
|
|
3597
|
-
* @description 好友消息事件类
|
|
3598
|
-
* @class FriendMessage
|
|
3599
|
-
*/
|
|
3600
|
-
declare class FriendMessage extends MessageBase {
|
|
3601
|
-
#private;
|
|
3602
|
-
constructor(options: FriendMessageOptions);
|
|
3603
|
-
get contact(): FriendContact;
|
|
3604
|
-
get sender(): SenderBase;
|
|
3605
|
-
get subEvent(): "friend";
|
|
3606
|
-
get isPrivate(): true;
|
|
3607
|
-
get isFriend(): true;
|
|
3608
|
-
get isGroup(): false;
|
|
3609
|
-
get isGuild(): false;
|
|
3610
|
-
get isDirect(): false;
|
|
3611
|
-
get isGroupTemp(): false;
|
|
3612
|
-
}
|
|
3613
|
-
/**
|
|
3614
|
-
* @description 群消息事件类
|
|
3615
|
-
* @class GroupMessage
|
|
3616
|
-
*/
|
|
3617
|
-
declare class GroupMessage extends MessageBase {
|
|
3618
|
-
#private;
|
|
3619
|
-
constructor(options: GroupMessageOptions);
|
|
3620
|
-
/**
|
|
3621
|
-
* @description 群ID
|
|
3622
|
-
* @deprecated 即将废弃 请使用 `groupId`
|
|
3623
|
-
*/
|
|
3624
|
-
get group_id(): string;
|
|
3625
|
-
/**
|
|
3626
|
-
* @description 群ID
|
|
3627
|
-
*/
|
|
3628
|
-
get groupId(): string;
|
|
3629
|
-
get contact(): GroupContact;
|
|
3630
|
-
get sender(): GroupSender;
|
|
3631
|
-
get subEvent(): "group";
|
|
3632
|
-
get isPrivate(): false;
|
|
3633
|
-
get isFriend(): false;
|
|
3634
|
-
get isGroup(): true;
|
|
3635
|
-
get isGuild(): false;
|
|
3636
|
-
get isDirect(): false;
|
|
3637
|
-
get isGroupTemp(): false;
|
|
3638
|
-
}
|
|
3639
|
-
/**
|
|
3640
|
-
* @description 频道私信消息事件类
|
|
3641
|
-
* @class DirectMessage
|
|
3642
|
-
*/
|
|
3643
|
-
declare class DirectMessage extends MessageBase {
|
|
3644
|
-
#private;
|
|
3645
|
-
constructor(options: DirectMessageOptions);
|
|
3646
|
-
/** 来源频道id */
|
|
3647
|
-
get srcGuildId(): string;
|
|
3648
|
-
get contact(): DirectContact;
|
|
3649
|
-
get sender(): SenderBase;
|
|
3650
|
-
get subEvent(): "direct";
|
|
3651
|
-
get isPrivate(): true;
|
|
3652
|
-
get isFriend(): false;
|
|
3653
|
-
get isGroup(): false;
|
|
3654
|
-
get isGuild(): false;
|
|
3655
|
-
get isDirect(): true;
|
|
3656
|
-
get isGroupTemp(): false;
|
|
3657
|
-
}
|
|
3658
|
-
/**
|
|
3659
|
-
* @description 频道消息事件类
|
|
3660
|
-
* @class GuildMessage
|
|
3661
|
-
*/
|
|
3662
|
-
declare class GuildMessage extends MessageBase {
|
|
3663
|
-
#private;
|
|
3664
|
-
constructor(options: GuildMessageOptions);
|
|
3665
|
-
/**
|
|
3666
|
-
* @description 频道ID
|
|
3667
|
-
* @deprecated 即将废弃 请使用 `guildId`
|
|
3668
|
-
*/
|
|
3669
|
-
get guild_id(): string;
|
|
3670
|
-
/**
|
|
3671
|
-
* @description 子频道ID
|
|
3672
|
-
* @deprecated 即将废弃 请使用 `channelId`
|
|
3673
|
-
*/
|
|
3674
|
-
get channel_id(): string;
|
|
3675
|
-
/**
|
|
3676
|
-
* @description 频道ID
|
|
3677
|
-
*/
|
|
3678
|
-
get guildId(): string;
|
|
3679
|
-
/**
|
|
3680
|
-
* @description 子频道ID
|
|
3681
|
-
*/
|
|
3682
|
-
get channelId(): string;
|
|
3683
|
-
get contact(): GuildContact;
|
|
3684
|
-
get sender(): GuildSender;
|
|
3685
|
-
get subEvent(): "guild";
|
|
3686
|
-
get isPrivate(): false;
|
|
3687
|
-
get isFriend(): false;
|
|
3688
|
-
get isGroup(): false;
|
|
3689
|
-
get isGuild(): true;
|
|
3690
|
-
get isDirect(): false;
|
|
3691
|
-
get isGroupTemp(): false;
|
|
3692
|
-
}
|
|
3693
|
-
/**
|
|
3694
|
-
* @description 群临时会话消息事件类
|
|
3695
|
-
* @class GroupTempMessage
|
|
3696
|
-
*/
|
|
3697
|
-
declare class GroupTempMessage extends MessageBase {
|
|
3698
|
-
#private;
|
|
3699
|
-
constructor(options: GroupTempMessageOptions);
|
|
3700
|
-
/**
|
|
3701
|
-
* @description 群ID
|
|
3702
|
-
* @deprecated 即将废弃 请使用 `groupId`
|
|
3703
|
-
*/
|
|
3704
|
-
get group_id(): string;
|
|
3705
|
-
/**
|
|
3706
|
-
* @description 群ID
|
|
3707
|
-
*/
|
|
3708
|
-
get groupId(): string;
|
|
3709
|
-
get contact(): GroupTempContact;
|
|
3710
|
-
get sender(): SenderBase;
|
|
3711
|
-
get subEvent(): "groupTemp";
|
|
3712
|
-
get isPrivate(): false;
|
|
3713
|
-
get isFriend(): false;
|
|
3714
|
-
get isGroup(): false;
|
|
3715
|
-
get isGuild(): false;
|
|
3716
|
-
get isDirect(): false;
|
|
3717
|
-
get isGroupTemp(): true;
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
/**
|
|
3721
|
-
* @description 通知事件基类
|
|
3722
|
-
* @class NoticeBase
|
|
3723
|
-
*/
|
|
3724
|
-
declare abstract class NoticeBase extends BaseEvent<'notice'> {
|
|
3725
|
-
#private;
|
|
3726
|
-
/** 通知内容str */
|
|
3727
|
-
tips: string;
|
|
3728
|
-
/** 事件内容 */
|
|
3729
|
-
content: unknown;
|
|
3730
|
-
constructor({ subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, }: NoticeOptions);
|
|
3731
|
-
get event(): "notice";
|
|
3732
|
-
get subEvent(): NoticeEventSub;
|
|
3733
|
-
}
|
|
3734
|
-
/**
|
|
3735
|
-
* @description 收到点赞事件
|
|
3736
|
-
* @class ReceiveLikeNotice
|
|
3737
|
-
*/
|
|
3738
|
-
declare class ReceiveLikeNotice extends NoticeBase {
|
|
3739
|
-
#private;
|
|
3740
|
-
content: ReceiveLikeOptions['content'];
|
|
3741
|
-
constructor(options: ReceiveLikeOptions);
|
|
3742
|
-
get subEvent(): "receiveLike";
|
|
3743
|
-
get contact(): FriendContact;
|
|
3744
|
-
get sender(): Sender & SenderBase;
|
|
3745
|
-
get isPrivate(): true;
|
|
3746
|
-
get isFriend(): true;
|
|
3747
|
-
get isGroup(): false;
|
|
3748
|
-
get isGuild(): false;
|
|
3749
|
-
get isDirect(): false;
|
|
3750
|
-
get isGroupTemp(): false;
|
|
3751
|
-
}
|
|
3752
|
-
/**
|
|
3753
|
-
* @description 好友增加事件
|
|
3754
|
-
* @class FriendIncreaseNotice
|
|
3755
|
-
*/
|
|
3756
|
-
declare class FriendIncreaseNotice extends NoticeBase {
|
|
3757
|
-
#private;
|
|
3758
|
-
content: FriendIncreaseOptions['content'];
|
|
3759
|
-
constructor(options: FriendIncreaseOptions);
|
|
3760
|
-
get subEvent(): "friendIncrease";
|
|
3761
|
-
get contact(): FriendContact;
|
|
3762
|
-
get sender(): Sender & SenderBase;
|
|
3763
|
-
get isPrivate(): true;
|
|
3764
|
-
get isFriend(): true;
|
|
3765
|
-
get isGroup(): false;
|
|
3766
|
-
get isGuild(): false;
|
|
3767
|
-
get isDirect(): false;
|
|
3768
|
-
get isGroupTemp(): false;
|
|
3769
|
-
}
|
|
3770
|
-
/**
|
|
3771
|
-
* @description 好友减少事件
|
|
3772
|
-
* @class FriendDecreaseNotice
|
|
3773
|
-
*/
|
|
3774
|
-
declare class FriendDecreaseNotice extends NoticeBase {
|
|
3775
|
-
#private;
|
|
3776
|
-
content: FriendDecreaseOptions['content'];
|
|
3777
|
-
constructor(options: FriendDecreaseOptions);
|
|
3778
|
-
get subEvent(): "friendDecrease";
|
|
3779
|
-
get contact(): FriendContact;
|
|
3780
|
-
get sender(): Sender & SenderBase;
|
|
3781
|
-
get isPrivate(): true;
|
|
3782
|
-
get isFriend(): true;
|
|
3783
|
-
get isGroup(): false;
|
|
3784
|
-
get isGuild(): false;
|
|
3785
|
-
get isDirect(): false;
|
|
3786
|
-
get isGroupTemp(): false;
|
|
3787
|
-
}
|
|
3788
|
-
/**
|
|
3789
|
-
* @description 收到私聊戳一戳事件
|
|
3790
|
-
* @class PrivatePokeNotice
|
|
3791
|
-
*/
|
|
3792
|
-
declare class PrivatePokeNotice extends NoticeBase {
|
|
3793
|
-
#private;
|
|
3794
|
-
content: PrivatePokeOptions['content'];
|
|
3795
|
-
constructor(options: PrivatePokeOptions);
|
|
3796
|
-
get subEvent(): "friendPoke";
|
|
3797
|
-
get contact(): FriendContact;
|
|
3798
|
-
get sender(): Sender & SenderBase;
|
|
3799
|
-
get isPrivate(): true;
|
|
3800
|
-
get isFriend(): true;
|
|
3801
|
-
get isGroup(): false;
|
|
3802
|
-
get isGuild(): false;
|
|
3803
|
-
get isDirect(): false;
|
|
3804
|
-
get isGroupTemp(): false;
|
|
3805
|
-
}
|
|
3806
|
-
/**
|
|
3807
|
-
* @description 收到私聊撤回事件
|
|
3808
|
-
* @class PrivateRecallNotice
|
|
3809
|
-
*/
|
|
3810
|
-
declare class PrivateRecallNotice extends NoticeBase {
|
|
3811
|
-
#private;
|
|
3812
|
-
content: PrivateRecallOptions['content'];
|
|
3813
|
-
constructor(options: PrivateRecallOptions);
|
|
3814
|
-
get subEvent(): "friendRecall";
|
|
3815
|
-
get contact(): FriendContact;
|
|
3816
|
-
get sender(): Sender & SenderBase;
|
|
3817
|
-
get isPrivate(): true;
|
|
3818
|
-
get isFriend(): true;
|
|
3819
|
-
get isGroup(): false;
|
|
3820
|
-
get isGuild(): false;
|
|
3821
|
-
get isDirect(): false;
|
|
3822
|
-
get isGroupTemp(): false;
|
|
3823
|
-
}
|
|
3824
|
-
/**
|
|
3825
|
-
* @description 收到私聊文件上传事件
|
|
3826
|
-
* @class PrivateFileUploadedNotice
|
|
3827
|
-
*/
|
|
3828
|
-
declare class PrivateFileUploadedNotice extends NoticeBase {
|
|
3829
|
-
#private;
|
|
3830
|
-
content: PrivateFileUploadedOptions['content'];
|
|
3831
|
-
constructor(options: PrivateFileUploadedOptions);
|
|
3832
|
-
get subEvent(): "friendFileUploaded";
|
|
3833
|
-
get contact(): FriendContact;
|
|
3834
|
-
get sender(): Sender & SenderBase;
|
|
3835
|
-
get isPrivate(): true;
|
|
3836
|
-
get isFriend(): true;
|
|
3837
|
-
get isGroup(): false;
|
|
3838
|
-
get isGuild(): false;
|
|
3839
|
-
get isDirect(): false;
|
|
3840
|
-
get isGroupTemp(): false;
|
|
3841
|
-
}
|
|
3842
|
-
declare class GroupNotice extends NoticeBase {
|
|
3843
|
-
/**
|
|
3844
|
-
* @deprecated 已经弃用 请使用`groupId`
|
|
3845
|
-
*/
|
|
3846
|
-
get group_id(): string;
|
|
3847
|
-
get groupId(): string;
|
|
3848
|
-
}
|
|
3849
|
-
/**
|
|
3850
|
-
* @description 收到群聊戳一戳事件
|
|
3851
|
-
* @class GroupPokeNotice
|
|
3852
|
-
*/
|
|
3853
|
-
declare class GroupPokeNotice extends GroupNotice {
|
|
3854
|
-
#private;
|
|
3855
|
-
content: GroupPokeOptions['content'];
|
|
3856
|
-
constructor(options: GroupPokeOptions);
|
|
3857
|
-
get subEvent(): "groupPoke";
|
|
3858
|
-
get contact(): GroupContact;
|
|
3859
|
-
get sender(): Sender & GroupSender;
|
|
3860
|
-
get isPrivate(): false;
|
|
3861
|
-
get isFriend(): false;
|
|
3862
|
-
get isGroup(): true;
|
|
3863
|
-
get isGuild(): false;
|
|
3864
|
-
get isDirect(): false;
|
|
3865
|
-
get isGroupTemp(): false;
|
|
3866
|
-
}
|
|
3867
|
-
/**
|
|
3868
|
-
* @description 收到群聊撤回事件
|
|
3869
|
-
* @class GroupRecallNotice
|
|
3870
|
-
*/
|
|
3871
|
-
declare class GroupRecallNotice extends GroupNotice {
|
|
3872
|
-
#private;
|
|
3873
|
-
content: GroupRecallOptions['content'];
|
|
3874
|
-
constructor(options: GroupRecallOptions);
|
|
3875
|
-
get subEvent(): "groupRecall";
|
|
3876
|
-
get contact(): GroupContact;
|
|
3877
|
-
get sender(): Sender & GroupSender;
|
|
3878
|
-
get isPrivate(): false;
|
|
3879
|
-
get isFriend(): false;
|
|
3880
|
-
get isGroup(): true;
|
|
3881
|
-
get isGuild(): false;
|
|
3882
|
-
get isDirect(): false;
|
|
3883
|
-
get isGroupTemp(): false;
|
|
3884
|
-
}
|
|
3885
|
-
/**
|
|
3886
|
-
* @description 收到群聊文件上传事件
|
|
3887
|
-
* @class GroupFileUploadedNotice
|
|
3888
|
-
*/
|
|
3889
|
-
declare class GroupFileUploadedNotice extends GroupNotice {
|
|
3890
|
-
#private;
|
|
3891
|
-
content: GroupFileUploadedOptions['content'];
|
|
3892
|
-
constructor(options: GroupFileUploadedOptions);
|
|
3893
|
-
get subEvent(): "groupFileUploaded";
|
|
3894
|
-
get contact(): GroupContact;
|
|
3895
|
-
get sender(): Sender & GroupSender;
|
|
3896
|
-
get isPrivate(): false;
|
|
3897
|
-
get isFriend(): false;
|
|
3898
|
-
get isGroup(): true;
|
|
3899
|
-
get isGuild(): false;
|
|
3900
|
-
get isDirect(): false;
|
|
3901
|
-
get isGroupTemp(): false;
|
|
3902
|
-
}
|
|
3903
|
-
/**
|
|
3904
|
-
* @description 群名片变动事件
|
|
3905
|
-
* @class GroupCardChangedNotice
|
|
3906
|
-
*/
|
|
3907
|
-
declare class GroupCardChangedNotice extends GroupNotice {
|
|
3908
|
-
#private;
|
|
3909
|
-
content: GroupCardChangedOptions['content'];
|
|
3910
|
-
constructor(options: GroupCardChangedOptions);
|
|
3911
|
-
get subEvent(): "groupCardChanged";
|
|
3912
|
-
get contact(): GroupContact;
|
|
3913
|
-
get sender(): Sender & GroupSender;
|
|
3914
|
-
get isPrivate(): false;
|
|
3915
|
-
get isFriend(): false;
|
|
3916
|
-
get isGroup(): true;
|
|
3917
|
-
get isGuild(): false;
|
|
3918
|
-
get isDirect(): false;
|
|
3919
|
-
get isGroupTemp(): false;
|
|
3920
|
-
}
|
|
3921
|
-
/**
|
|
3922
|
-
* @description 群成员头衔变动事件
|
|
3923
|
-
* @class GroupMemberTitleUpdatedNotice
|
|
3924
|
-
*/
|
|
3925
|
-
declare class GroupMemberTitleUpdatedNotice extends GroupNotice {
|
|
3926
|
-
#private;
|
|
3927
|
-
content: GroupMemberUniqueTitleChangedOptions['content'];
|
|
3928
|
-
constructor(options: GroupMemberUniqueTitleChangedOptions);
|
|
3929
|
-
get subEvent(): "groupMemberTitleUpdate";
|
|
3930
|
-
get contact(): GroupContact;
|
|
3931
|
-
get sender(): Sender & GroupSender;
|
|
3932
|
-
get isPrivate(): false;
|
|
3933
|
-
get isFriend(): false;
|
|
3934
|
-
get isGroup(): true;
|
|
3935
|
-
get isGuild(): false;
|
|
3936
|
-
get isDirect(): false;
|
|
3937
|
-
get isGroupTemp(): false;
|
|
3938
|
-
}
|
|
3939
|
-
/**
|
|
3940
|
-
* @description 群精华消息变动事件
|
|
3941
|
-
* @class GroupHlightsChangedNotice
|
|
3942
|
-
*/
|
|
3943
|
-
declare class GroupHlightsChangedNotice extends GroupNotice {
|
|
3944
|
-
#private;
|
|
3945
|
-
content: GroupHlightsChangedOptions['content'];
|
|
3946
|
-
constructor(options: GroupHlightsChangedOptions);
|
|
3947
|
-
get subEvent(): "groupHighlightsChange";
|
|
3948
|
-
get contact(): GroupContact;
|
|
3949
|
-
get sender(): Sender & GroupSender;
|
|
3950
|
-
get isPrivate(): false;
|
|
3951
|
-
get isFriend(): false;
|
|
3952
|
-
get isGroup(): true;
|
|
3953
|
-
get isGuild(): false;
|
|
3954
|
-
get isDirect(): false;
|
|
3955
|
-
get isGroupTemp(): false;
|
|
3956
|
-
}
|
|
3957
|
-
/**
|
|
3958
|
-
* @description 群成员增加事件
|
|
3959
|
-
* @class GroupMemberIncreaseNotice
|
|
3960
|
-
*/
|
|
3961
|
-
declare class GroupMemberIncreaseNotice extends GroupNotice {
|
|
3962
|
-
#private;
|
|
3963
|
-
content: GroupMemberIncreaseOptions['content'];
|
|
3964
|
-
constructor(options: GroupMemberIncreaseOptions);
|
|
3965
|
-
get subEvent(): "groupMemberAdd";
|
|
3966
|
-
get contact(): GroupContact;
|
|
3967
|
-
get sender(): Sender & GroupSender;
|
|
3968
|
-
get isPrivate(): false;
|
|
3969
|
-
get isFriend(): false;
|
|
3970
|
-
get isGroup(): true;
|
|
3971
|
-
get isGuild(): false;
|
|
3972
|
-
get isDirect(): false;
|
|
3973
|
-
get isGroupTemp(): false;
|
|
3974
|
-
}
|
|
3975
|
-
/**
|
|
3976
|
-
* @description 群成员减少事件
|
|
3977
|
-
* @class GroupMemberDecreaseNotice
|
|
3978
|
-
*/
|
|
3979
|
-
declare class GroupMemberDecreaseNotice extends GroupNotice {
|
|
3980
|
-
#private;
|
|
3981
|
-
content: GroupMemberDecreaseOptions['content'];
|
|
3982
|
-
constructor(options: GroupMemberDecreaseOptions);
|
|
3983
|
-
get subEvent(): "groupMemberRemove";
|
|
3984
|
-
get contact(): GroupContact;
|
|
3985
|
-
get sender(): Sender & GroupSender;
|
|
3986
|
-
get isPrivate(): false;
|
|
3987
|
-
get isFriend(): false;
|
|
3988
|
-
get isGroup(): true;
|
|
3989
|
-
get isGuild(): false;
|
|
3990
|
-
get isDirect(): false;
|
|
3991
|
-
get isGroupTemp(): false;
|
|
3992
|
-
}
|
|
3993
|
-
/**
|
|
3994
|
-
* @description 群管理员变动事件
|
|
3995
|
-
* @class GroupAdminChangedNotice
|
|
3996
|
-
*/
|
|
3997
|
-
declare class GroupAdminChangedNotice extends GroupNotice {
|
|
3998
|
-
#private;
|
|
3999
|
-
content: GroupAdminChangedOptions['content'];
|
|
4000
|
-
constructor(options: GroupAdminChangedOptions);
|
|
4001
|
-
get subEvent(): "groupAdminChanged";
|
|
4002
|
-
get contact(): GroupContact;
|
|
4003
|
-
get sender(): Sender & GroupSender;
|
|
4004
|
-
get isPrivate(): false;
|
|
4005
|
-
get isFriend(): false;
|
|
4006
|
-
get isGroup(): true;
|
|
4007
|
-
get isGuild(): false;
|
|
4008
|
-
get isDirect(): false;
|
|
4009
|
-
get isGroupTemp(): false;
|
|
4010
|
-
}
|
|
4011
|
-
/**
|
|
4012
|
-
* @description 群打卡事件
|
|
4013
|
-
* @class GroupSignInNotice
|
|
4014
|
-
*/
|
|
4015
|
-
declare class GroupSignInNotice extends GroupNotice {
|
|
4016
|
-
#private;
|
|
4017
|
-
content: GroupSignInOptions['content'];
|
|
4018
|
-
constructor(options: GroupSignInOptions);
|
|
4019
|
-
get subEvent(): "groupSignIn";
|
|
4020
|
-
get contact(): GroupContact;
|
|
4021
|
-
get sender(): Sender & GroupSender;
|
|
4022
|
-
get isPrivate(): false;
|
|
4023
|
-
get isFriend(): false;
|
|
4024
|
-
get isGroup(): true;
|
|
4025
|
-
get isGuild(): false;
|
|
4026
|
-
get isDirect(): false;
|
|
4027
|
-
get isGroupTemp(): false;
|
|
4028
|
-
}
|
|
4029
|
-
/**
|
|
4030
|
-
* @description 群成员被禁言事件
|
|
4031
|
-
* @class GroupMemberBanNotice
|
|
4032
|
-
*/
|
|
4033
|
-
declare class GroupMemberBanNotice extends GroupNotice {
|
|
4034
|
-
#private;
|
|
4035
|
-
content: GroupMemberBanOptions['content'];
|
|
4036
|
-
constructor(options: GroupMemberBanOptions);
|
|
4037
|
-
get subEvent(): "groupMemberBan";
|
|
4038
|
-
get contact(): GroupContact;
|
|
4039
|
-
get sender(): Sender & GroupSender;
|
|
4040
|
-
get isPrivate(): false;
|
|
4041
|
-
get isFriend(): false;
|
|
4042
|
-
get isGroup(): true;
|
|
4043
|
-
get isGuild(): false;
|
|
4044
|
-
get isDirect(): false;
|
|
4045
|
-
get isGroupTemp(): false;
|
|
4046
|
-
}
|
|
4047
|
-
/**
|
|
4048
|
-
* @description 群全员禁言事件
|
|
4049
|
-
* @class GroupWholeBanNotice
|
|
4050
|
-
*/
|
|
4051
|
-
declare class GroupWholeBanNotice extends GroupNotice {
|
|
4052
|
-
#private;
|
|
4053
|
-
content: GroupWholeBanOptions['content'];
|
|
4054
|
-
constructor(options: GroupWholeBanOptions);
|
|
4055
|
-
get subEvent(): "groupWholeBan";
|
|
4056
|
-
get contact(): GroupContact;
|
|
4057
|
-
get sender(): Sender & GroupSender;
|
|
4058
|
-
get isPrivate(): false;
|
|
4059
|
-
get isFriend(): false;
|
|
4060
|
-
get isGroup(): true;
|
|
4061
|
-
get isGuild(): false;
|
|
4062
|
-
get isDirect(): false;
|
|
4063
|
-
get isGroupTemp(): false;
|
|
4064
|
-
}
|
|
4065
|
-
/**
|
|
4066
|
-
* @description 群表情动态事件
|
|
4067
|
-
* @class GroupMessageReactionNotice
|
|
4068
|
-
*/
|
|
4069
|
-
declare class GroupMessageReactionNotice extends GroupNotice {
|
|
4070
|
-
#private;
|
|
4071
|
-
content: GroupMessageReactionOptions['content'];
|
|
4072
|
-
constructor(options: GroupMessageReactionOptions);
|
|
4073
|
-
get subEvent(): "groupMessageReaction";
|
|
4074
|
-
get contact(): GroupContact;
|
|
4075
|
-
get sender(): Sender & GroupSender;
|
|
4076
|
-
get isPrivate(): false;
|
|
4077
|
-
get isFriend(): false;
|
|
4078
|
-
get isGroup(): true;
|
|
4079
|
-
get isGuild(): false;
|
|
4080
|
-
get isDirect(): false;
|
|
4081
|
-
get isGroupTemp(): false;
|
|
4082
|
-
}
|
|
4083
|
-
/**
|
|
4084
|
-
* @description 群聊运气王事件
|
|
4085
|
-
* @class GroupLuckKingNotice
|
|
4086
|
-
*/
|
|
4087
|
-
declare class GroupLuckKingNotice extends GroupNotice {
|
|
4088
|
-
#private;
|
|
4089
|
-
content: GroupLuckKingOptions['content'];
|
|
4090
|
-
constructor(options: GroupLuckKingOptions);
|
|
4091
|
-
get subEvent(): "groupLuckyKing";
|
|
4092
|
-
get contact(): GroupContact;
|
|
4093
|
-
get sender(): Sender & GroupSender;
|
|
4094
|
-
get isPrivate(): false;
|
|
4095
|
-
get isFriend(): false;
|
|
4096
|
-
get isGroup(): true;
|
|
4097
|
-
get isGuild(): false;
|
|
4098
|
-
get isDirect(): false;
|
|
4099
|
-
get isGroupTemp(): false;
|
|
4100
|
-
}
|
|
4101
|
-
/**
|
|
4102
|
-
* @description 群聊荣誉变更事件
|
|
4103
|
-
* @class GroupHonorChangedNotice
|
|
4104
|
-
*/
|
|
4105
|
-
declare class GroupHonorChangedNotice extends GroupNotice {
|
|
4106
|
-
#private;
|
|
4107
|
-
content: GroupHonorChangedOptions['content'];
|
|
4108
|
-
constructor(options: GroupHonorChangedOptions);
|
|
4109
|
-
get subEvent(): "groupHonorChange";
|
|
4110
|
-
get contact(): GroupContact;
|
|
4111
|
-
get sender(): Sender & GroupSender;
|
|
4112
|
-
get isPrivate(): false;
|
|
4113
|
-
get isFriend(): false;
|
|
4114
|
-
get isGroup(): true;
|
|
4115
|
-
get isGuild(): false;
|
|
4116
|
-
get isDirect(): false;
|
|
4117
|
-
get isGroupTemp(): false;
|
|
4118
|
-
}
|
|
4119
|
-
|
|
4120
|
-
/**
|
|
4121
|
-
* @description 请求事件基类
|
|
4122
|
-
* @class RequestBase
|
|
4123
|
-
*/
|
|
4124
|
-
declare abstract class RequestBase extends BaseEvent<'request'> {
|
|
4125
|
-
#private;
|
|
4126
|
-
/** 通知内容str */
|
|
4127
|
-
tips: string;
|
|
4128
|
-
/** 事件内容 */
|
|
4129
|
-
content: unknown;
|
|
4130
|
-
constructor({ subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, }: RequestOptions);
|
|
4131
|
-
get event(): "request";
|
|
4132
|
-
get subEvent(): RequestEventSub;
|
|
4133
|
-
}
|
|
4134
|
-
/**
|
|
4135
|
-
* @description 创建好友申请请求事件
|
|
4136
|
-
* @class ReceiveLikeNotice
|
|
4137
|
-
*/
|
|
4138
|
-
declare class PrivateApplyRequest extends RequestBase {
|
|
4139
|
-
#private;
|
|
4140
|
-
content: PrivateApplyRequestOptions['content'];
|
|
4141
|
-
constructor(options: PrivateApplyRequestOptions);
|
|
4142
|
-
get subEvent(): "friendApply";
|
|
4143
|
-
get contact(): FriendContact;
|
|
4144
|
-
get sender(): Sender & SenderBase;
|
|
4145
|
-
get isPrivate(): true;
|
|
4146
|
-
get isFriend(): true;
|
|
4147
|
-
get isGroup(): false;
|
|
4148
|
-
get isGuild(): false;
|
|
4149
|
-
get isDirect(): false;
|
|
4150
|
-
get isGroupTemp(): false;
|
|
4151
|
-
}
|
|
4152
|
-
/**
|
|
4153
|
-
* @description 创建入群请求事件
|
|
4154
|
-
* @class ReceiveLikeNotice
|
|
4155
|
-
*/
|
|
4156
|
-
declare class GroupApplyRequest extends RequestBase {
|
|
4157
|
-
#private;
|
|
4158
|
-
content: GroupApplyRequestOptions['content'];
|
|
4159
|
-
constructor(options: GroupApplyRequestOptions);
|
|
4160
|
-
/**
|
|
4161
|
-
* @deprecated 已经弃用 请使用`groupId`
|
|
4162
|
-
*/
|
|
4163
|
-
get group_id(): string;
|
|
4164
|
-
get groupId(): string;
|
|
4165
|
-
get subEvent(): "groupApply";
|
|
4166
|
-
get contact(): GroupContact;
|
|
4167
|
-
get sender(): Sender & GroupSender;
|
|
4168
|
-
get isPrivate(): false;
|
|
4169
|
-
get isFriend(): false;
|
|
4170
|
-
get isGroup(): true;
|
|
4171
|
-
get isGuild(): false;
|
|
4172
|
-
get isDirect(): false;
|
|
4173
|
-
get isGroupTemp(): false;
|
|
4174
|
-
}
|
|
4175
|
-
/**
|
|
4176
|
-
* @description 创建邀请Bot入群请求事件
|
|
4177
|
-
* @class GroupInviteRequest
|
|
4178
|
-
*/
|
|
4179
|
-
declare class GroupInviteRequest extends RequestBase {
|
|
4180
|
-
#private;
|
|
4181
|
-
content: GroupInviteRequestOptions['content'];
|
|
4182
|
-
constructor(options: GroupInviteRequestOptions);
|
|
4183
|
-
/**
|
|
4184
|
-
* @deprecated 已经弃用 请使用`groupId`
|
|
4185
|
-
*/
|
|
4186
|
-
get group_id(): string;
|
|
4187
|
-
get groupId(): string;
|
|
4188
|
-
get subEvent(): "groupInvite";
|
|
4189
|
-
get contact(): GroupContact;
|
|
4190
|
-
get sender(): Sender & GroupSender;
|
|
4191
|
-
get isPrivate(): false;
|
|
4192
|
-
get isFriend(): false;
|
|
4193
|
-
get isGroup(): true;
|
|
4194
|
-
get isGuild(): false;
|
|
4195
|
-
get isDirect(): false;
|
|
4196
|
-
get isGroupTemp(): false;
|
|
4197
|
-
}
|
|
4198
|
-
|
|
4199
|
-
/** 消息事件对应的对象类型 */
|
|
4200
|
-
interface MessageEventMap {
|
|
4201
|
-
message: Message$2;
|
|
4202
|
-
'message.group': GroupMessage;
|
|
4203
|
-
'message.friend': FriendMessage;
|
|
4204
|
-
'message.guild': GuildMessage;
|
|
4205
|
-
'message.direct': DirectMessage;
|
|
4206
|
-
'message.groupTemp': GroupTempMessage;
|
|
4207
|
-
}
|
|
4208
|
-
/** 私聊通知事件对应的对象类型 */
|
|
4209
|
-
interface FriendNoticeEventMap {
|
|
4210
|
-
'notice.receiveLike': ReceiveLikeNotice;
|
|
4211
|
-
'notice.friendDecrease': FriendDecreaseNotice;
|
|
4212
|
-
'notice.friendIncrease': FriendIncreaseNotice;
|
|
4213
|
-
'notice.privatePoke': PrivatePokeNotice;
|
|
4214
|
-
'notice.privateRecall': PrivateRecallNotice;
|
|
4215
|
-
'notice.privateFileUploaded': PrivateFileUploadedNotice;
|
|
4216
|
-
}
|
|
4217
|
-
/** 群聊通知事件对应的对象类型 */
|
|
4218
|
-
interface GroupNoticeEventMap {
|
|
4219
|
-
'notice.groupPoke': GroupPokeNotice;
|
|
4220
|
-
'notice.groupRecall': GroupRecallNotice;
|
|
4221
|
-
'notice.groupFileUploaded': GroupFileUploadedNotice;
|
|
4222
|
-
'notice.groupCardChanged': GroupCardChangedNotice;
|
|
4223
|
-
'notice.groupMemberTitleUpdate': GroupMemberTitleUpdatedNotice;
|
|
4224
|
-
'notice.groupHighlightsChange': GroupHlightsChangedNotice;
|
|
4225
|
-
'notice.groupMemberAdd': GroupMemberIncreaseNotice;
|
|
4226
|
-
'notice.groupMemberRemove': GroupMemberDecreaseNotice;
|
|
4227
|
-
'notice.groupAdminChanged': GroupAdminChangedNotice;
|
|
4228
|
-
'notice.groupSignIn': GroupSignInNotice;
|
|
4229
|
-
'notice.groupMemberBan': GroupMemberBanNotice;
|
|
4230
|
-
'notice.groupWholeBan': GroupWholeBanNotice;
|
|
4231
|
-
'notice.groupMessageReaction': GroupMessageReactionNotice;
|
|
4232
|
-
'notice.groupLuckyKing': GroupLuckKingNotice;
|
|
4233
|
-
'notice.groupHonorChange': GroupHonorChangedNotice;
|
|
4234
|
-
}
|
|
4235
|
-
/** 通知事件对应的对象类型 */
|
|
4236
|
-
interface NoticeEventMap extends FriendNoticeEventMap, GroupNoticeEventMap {
|
|
4237
|
-
notice: Notice;
|
|
4238
|
-
}
|
|
4239
|
-
/** 好友请求事件对应的对象类型 */
|
|
4240
|
-
interface FriendRequestEventMap {
|
|
4241
|
-
'request.friendApply': PrivateApplyRequest;
|
|
4242
|
-
}
|
|
4243
|
-
/** 群聊请求事件对应的对象类型 */
|
|
4244
|
-
interface GroupRequestEventMap {
|
|
4245
|
-
'request.groupApply': GroupApplyRequest;
|
|
4246
|
-
'request.groupInvite': GroupInviteRequest;
|
|
4247
|
-
}
|
|
4248
|
-
/** 请求事件对应的对象类型 */
|
|
4249
|
-
interface RequestEventMap extends FriendRequestEventMap, GroupRequestEventMap {
|
|
4250
|
-
request: Request;
|
|
4251
|
-
}
|
|
4252
|
-
/**
|
|
4253
|
-
* @description 通知事件类型
|
|
4254
|
-
*/
|
|
4255
|
-
type Notice = ReceiveLikeNotice | FriendDecreaseNotice | FriendIncreaseNotice | PrivatePokeNotice | PrivateRecallNotice | PrivateFileUploadedNotice | GroupPokeNotice | GroupRecallNotice | GroupFileUploadedNotice | GroupCardChangedNotice | GroupMemberTitleUpdatedNotice | GroupHlightsChangedNotice | GroupMemberIncreaseNotice | GroupMemberDecreaseNotice | GroupAdminChangedNotice | GroupSignInNotice | GroupMemberBanNotice | GroupWholeBanNotice | GroupMessageReactionNotice | GroupLuckKingNotice | GroupHonorChangedNotice;
|
|
4256
|
-
/**
|
|
4257
|
-
* @description 消息事件类型
|
|
4258
|
-
*/
|
|
4259
|
-
type Message$2 = FriendMessage | GroupMessage | DirectMessage | GuildMessage | GroupTempMessage;
|
|
4260
|
-
/**
|
|
4261
|
-
* @description 请求事件类型
|
|
4262
|
-
*/
|
|
4263
|
-
type Request = PrivateApplyRequest | GroupApplyRequest | GroupInviteRequest;
|
|
4264
|
-
/**
|
|
4265
|
-
* @description 所有事件类型
|
|
4266
|
-
*/
|
|
4267
|
-
type Event = Message$2 | Notice | Request;
|
|
4268
|
-
|
|
4269
|
-
/**
|
|
4270
|
-
* 权限类型
|
|
4271
|
-
* - `all`: 所有人
|
|
4272
|
-
* - `master`: 所有者
|
|
4273
|
-
* - `admin`: 管理员
|
|
4274
|
-
* - `group.owner`: 群主
|
|
4275
|
-
* - `group.admin`: 群管理
|
|
4276
|
-
* - `guild.owner`: 频道主
|
|
4277
|
-
* - `guild.admin`: 频道管理
|
|
4278
|
-
*/
|
|
4279
|
-
type Permission = 'all' | 'master' | 'admin' | 'group.owner' | 'group.admin' | 'guild.owner' | 'guild.admin';
|
|
4280
|
-
|
|
4281
|
-
type Args = {
|
|
4282
|
-
e?: Event;
|
|
4283
|
-
} & Record<string, any>;
|
|
4284
|
-
type FileToUrlResult<T> = T extends 'image' ? {
|
|
4285
|
-
url: string;
|
|
4286
|
-
width: number;
|
|
4287
|
-
height: number;
|
|
4288
|
-
} : {
|
|
4289
|
-
url: string;
|
|
4290
|
-
};
|
|
4291
|
-
/**
|
|
4292
|
-
* 文件转换为url类型
|
|
4293
|
-
*/
|
|
4294
|
-
type FileToUrlHandler = {
|
|
4295
|
-
<T extends 'image' | 'video' | 'record' | 'file'>(
|
|
4296
|
-
/** 文件类型 */
|
|
4297
|
-
type: T,
|
|
4298
|
-
/** 文件数据 */
|
|
4299
|
-
file: string | Buffer | Uint8Array,
|
|
4300
|
-
/** 文件名名称: `image.jpg` */
|
|
4301
|
-
filename: string,
|
|
4302
|
-
/** 自定义参数 如果传e记得符合规范 */
|
|
4303
|
-
args?: Args): Promise<FileToUrlResult<T>>;
|
|
4304
|
-
};
|
|
4305
|
-
|
|
4306
|
-
/**
|
|
4307
|
-
* 适配器基类 一个示例
|
|
4308
|
-
* @class AdapterBase
|
|
2852
|
+
* 适配器基类 一个示例
|
|
2853
|
+
* @class AdapterBase
|
|
4309
2854
|
*/
|
|
4310
2855
|
declare abstract class AdapterBase implements AdapterType {
|
|
4311
2856
|
account: AdapterType['account'];
|
|
@@ -6079,147 +4624,1602 @@ interface AdapterType {
|
|
|
6079
4624
|
* @param isApprove 是否同意
|
|
6080
4625
|
* @returns 此接口的返回值不值得信任
|
|
6081
4626
|
*/
|
|
6082
|
-
setInvitedJoinGroupResult(requestId: string, isApprove: boolean): Promise<boolean>;
|
|
4627
|
+
setInvitedJoinGroupResult(requestId: string, isApprove: boolean): Promise<boolean>;
|
|
4628
|
+
/**
|
|
4629
|
+
* 设置消息表情回应
|
|
4630
|
+
* @param contact 目标信息
|
|
4631
|
+
* @param messageId 消息ID
|
|
4632
|
+
* @param faceId 表情ID
|
|
4633
|
+
* @returns 此接口的返回值不值得信任
|
|
4634
|
+
*/
|
|
4635
|
+
setMsgReaction(contact: Contact, messageId: string, faceId: number, isSet: boolean): Promise<boolean>;
|
|
4636
|
+
/**
|
|
4637
|
+
* 上传群文件、私聊文件
|
|
4638
|
+
* @param contact 目标信息
|
|
4639
|
+
* @param file 本地文件绝对路径
|
|
4640
|
+
* @param name 文件名称 必须提供
|
|
4641
|
+
* @param folder 父目录ID 不提供则上传到根目录 仅在群聊时有效
|
|
4642
|
+
* @returns 此接口的返回值不值得信任
|
|
4643
|
+
*/
|
|
4644
|
+
uploadFile(contact: Contact, file: string, name: string, folder?: string): Promise<boolean>;
|
|
4645
|
+
/**
|
|
4646
|
+
* 让协议端下载文件到协议端本地
|
|
4647
|
+
* @param options 下载文件的选项
|
|
4648
|
+
* @returns 下载文件的绝对路径和文件MD5
|
|
4649
|
+
*/
|
|
4650
|
+
downloadFile(options?: DownloadFileOptions): Promise<DownloadFileResponse>;
|
|
4651
|
+
/**
|
|
4652
|
+
* 创建群文件夹
|
|
4653
|
+
* @param groupId 群号
|
|
4654
|
+
* @param name 文件夹名
|
|
4655
|
+
* @returns 返回文件夹id和已使用空间
|
|
4656
|
+
*/
|
|
4657
|
+
createGroupFolder(groupId: string, name: string): Promise<CreateGroupFolderResponse>;
|
|
4658
|
+
/**
|
|
4659
|
+
* 重命名群文件的文件夹
|
|
4660
|
+
* @param groupId 群号
|
|
4661
|
+
* @param folderId 文件夹id
|
|
4662
|
+
* @param name 文件夹名
|
|
4663
|
+
* @returns 无返回值
|
|
4664
|
+
*/
|
|
4665
|
+
renameGroupFolder(groupId: string, folderId: string, name: string): Promise<boolean>;
|
|
4666
|
+
/**
|
|
4667
|
+
* 删除群文件的文件夹
|
|
4668
|
+
* @param groupId 群号
|
|
4669
|
+
* @param folderId 文件夹id
|
|
4670
|
+
* @returns 无返回值
|
|
4671
|
+
*/
|
|
4672
|
+
delGroupFolder(groupId: string, folderId: string): Promise<boolean>;
|
|
4673
|
+
/**
|
|
4674
|
+
* 上传群文件
|
|
4675
|
+
* @description 此接口仅可以在Bot和协议端在同一台设备上时使用
|
|
4676
|
+
* @param groupId 群号
|
|
4677
|
+
* @param file 文件绝对路径
|
|
4678
|
+
* @param name 文件名
|
|
4679
|
+
* @returns 无返回值
|
|
4680
|
+
*/
|
|
4681
|
+
uploadGroupFile(groupId: string, file: string, name?: string): Promise<boolean>;
|
|
4682
|
+
/**
|
|
4683
|
+
* 删除群文件
|
|
4684
|
+
* @param groupId 群号
|
|
4685
|
+
* @param fileId 文件id
|
|
4686
|
+
* @param busId 文件类型ID
|
|
4687
|
+
* @returns 无返回值
|
|
4688
|
+
*/
|
|
4689
|
+
delGroupFile(groupId: string, fileId: string, busId: number): Promise<boolean>;
|
|
4690
|
+
/**
|
|
4691
|
+
* 获取群文件系统信息
|
|
4692
|
+
* @param groupId 群号
|
|
4693
|
+
* @returns 返回文件数量、文件数量上限、已使用空间和空间上限
|
|
4694
|
+
*/
|
|
4695
|
+
getGroupFileSystemInfo(groupId: string): Promise<GetGroupFileSystemInfoResponse>;
|
|
4696
|
+
/**
|
|
4697
|
+
* 获取群文件夹下文件列表
|
|
4698
|
+
* @param groupId 群号
|
|
4699
|
+
* @param folderId 文件夹id,空则为根目录
|
|
4700
|
+
* @returns 返回文件和文件夹的列表
|
|
4701
|
+
*/
|
|
4702
|
+
getGroupFileList(groupId: string, folderId?: string): Promise<GetGroupFileListResponse>;
|
|
4703
|
+
/**
|
|
4704
|
+
* 设置群备注
|
|
4705
|
+
* @param groupId 群号
|
|
4706
|
+
* @param remark 新的备注
|
|
4707
|
+
* @returns 此接口的返回值不值得信任
|
|
4708
|
+
*/
|
|
4709
|
+
setGroupRemark(groupId: string, remark: string): Promise<boolean>;
|
|
4710
|
+
/**
|
|
4711
|
+
* 获取陌生群信息
|
|
4712
|
+
* @param groupId 群号
|
|
4713
|
+
*/
|
|
4714
|
+
getNotJoinedGroupInfo?(groupId: string): Promise<GroupInfo>;
|
|
4715
|
+
/**
|
|
4716
|
+
* 获取艾特全体成员剩余次数
|
|
4717
|
+
* @param groupId 群号
|
|
4718
|
+
* @returns 返回是否允许at全体成员和全群剩余次数、个人剩余次数
|
|
4719
|
+
*/
|
|
4720
|
+
getAtAllCount(groupId: string): Promise<GetAtAllCountResponse>;
|
|
4721
|
+
/**
|
|
4722
|
+
* 获取群被禁言用户列表
|
|
4723
|
+
* @param groupId
|
|
4724
|
+
* @returns 返回禁言用户列表
|
|
4725
|
+
*/
|
|
4726
|
+
getGroupMuteList(groupId: string): Promise<Array<GetGroupMuteListResponse>>;
|
|
4727
|
+
/**
|
|
4728
|
+
* 戳一戳用户 支持群聊和私聊
|
|
4729
|
+
* @param contact 目标信息
|
|
4730
|
+
* @param count 戳一戳次数 默认为1
|
|
4731
|
+
* @returns 此接口的返回值不值得信任
|
|
4732
|
+
*/
|
|
4733
|
+
pokeUser(contact: Contact, count?: number): Promise<boolean>;
|
|
4734
|
+
/**
|
|
4735
|
+
* 获取 Cookies
|
|
4736
|
+
* @param domain The domain to get cookies from
|
|
4737
|
+
*/
|
|
4738
|
+
getCookies(domain: string): Promise<{
|
|
4739
|
+
cookie: string;
|
|
4740
|
+
}>;
|
|
4741
|
+
/**
|
|
4742
|
+
* 获取 QQ 相关接口凭证
|
|
4743
|
+
* @param domain The domain to get credentials from
|
|
4744
|
+
*/
|
|
4745
|
+
getCredentials(domain: string): Promise<{
|
|
4746
|
+
cookies: string;
|
|
4747
|
+
csrf_token: number;
|
|
4748
|
+
}>;
|
|
4749
|
+
/**
|
|
4750
|
+
* 获取 CSRF Token
|
|
4751
|
+
* @param domain The domain to get the CSRF token from
|
|
4752
|
+
*/
|
|
4753
|
+
getCSRFToken(domain: string): Promise<{
|
|
4754
|
+
token: number;
|
|
4755
|
+
}>;
|
|
6083
4756
|
/**
|
|
6084
|
-
*
|
|
6085
|
-
* @param
|
|
6086
|
-
* @param
|
|
6087
|
-
* @param
|
|
6088
|
-
* @returns 此接口的返回值不值得信任
|
|
4757
|
+
* 获取 HTTP Cookies
|
|
4758
|
+
* @param appid The appid
|
|
4759
|
+
* @param daid The daid
|
|
4760
|
+
* @param jumpUrl The jump url
|
|
6089
4761
|
*/
|
|
6090
|
-
|
|
4762
|
+
getHttpCookies(appid: string, daid: string, jumpUrl: string): Promise<{
|
|
4763
|
+
cookie: string;
|
|
4764
|
+
}>;
|
|
4765
|
+
}
|
|
4766
|
+
/** 适配器类型 */
|
|
4767
|
+
type Adapter = AdapterType;
|
|
4768
|
+
|
|
4769
|
+
/** 快速回复源函数 适配器实现 */
|
|
4770
|
+
type SrcReply = (
|
|
4771
|
+
/** 发送的消息 */
|
|
4772
|
+
elements: Elements[]) => Promise<SendMsgResults> | SendMsgResults;
|
|
4773
|
+
/** 快速回复函数 */
|
|
4774
|
+
type Reply = (
|
|
4775
|
+
/** 发送的消息 */
|
|
4776
|
+
elements: SendMessage,
|
|
4777
|
+
/** 发送消息选项 */
|
|
4778
|
+
options?: {
|
|
4779
|
+
/** 是否@发送者 */
|
|
4780
|
+
at?: boolean;
|
|
4781
|
+
/** 是否引用回复发送者 */
|
|
4782
|
+
reply?: boolean;
|
|
4783
|
+
/** 撤回消息时间 默认为0不撤回 */
|
|
4784
|
+
recallMsg?: number;
|
|
4785
|
+
/** 重试次数 默认为0 */
|
|
4786
|
+
retryCount?: number;
|
|
4787
|
+
}) => Promise<SendMsgResults> | SendMsgResults;
|
|
4788
|
+
|
|
4789
|
+
/** 通知事件: 收到点赞 */
|
|
4790
|
+
interface ReceiveLikeType {
|
|
4791
|
+
/** 点赞者id */
|
|
4792
|
+
operatorId: string;
|
|
4793
|
+
/** 点赞者数量 */
|
|
4794
|
+
count: number;
|
|
4795
|
+
}
|
|
4796
|
+
/** 通知事件: 新增好友 */
|
|
4797
|
+
interface FriendIncreaseType {
|
|
4798
|
+
/** 新好友id */
|
|
4799
|
+
targetId: string;
|
|
4800
|
+
}
|
|
4801
|
+
/** 通知事件: 好友减少 */
|
|
4802
|
+
interface FriendDecreaseType {
|
|
4803
|
+
/** 减少的好友id */
|
|
4804
|
+
targetId: string;
|
|
4805
|
+
}
|
|
4806
|
+
/** 通知事件: 私聊戳一戳 */
|
|
4807
|
+
interface PrivatePokeType {
|
|
4808
|
+
/** 操作者id */
|
|
4809
|
+
operatorId: string;
|
|
4810
|
+
/** 被戳者id */
|
|
4811
|
+
targetId: string;
|
|
4812
|
+
/** 操作名称,如“戳了戳” */
|
|
4813
|
+
action: string;
|
|
4814
|
+
/** 后缀,未设置则未空字符串 */
|
|
4815
|
+
suffix: string;
|
|
4816
|
+
/** 操作图标url */
|
|
4817
|
+
actionImage: string;
|
|
4818
|
+
}
|
|
4819
|
+
/** 通知事件: 私聊撤回消息 */
|
|
4820
|
+
interface PrivateRecallType {
|
|
4821
|
+
/** 操作者id */
|
|
4822
|
+
operatorId: string;
|
|
4823
|
+
/** 撤回的消息id */
|
|
4824
|
+
messageId: string;
|
|
4825
|
+
/** 操作提示,如“撤回了一条消息” 一般此项为空字符串 */
|
|
4826
|
+
tips: string;
|
|
4827
|
+
}
|
|
4828
|
+
/**
|
|
4829
|
+
* 通知事件: 私聊文件上传
|
|
4830
|
+
* 文件信息最少需要提供一个url
|
|
4831
|
+
*/
|
|
4832
|
+
interface PrivateFileUploadedType {
|
|
4833
|
+
/** 操作者id */
|
|
4834
|
+
operatorId: string;
|
|
4835
|
+
/** 文件ID 此项没有则为空字符串 */
|
|
4836
|
+
fid: string;
|
|
4837
|
+
/** 文件子ID 此项没有则为空字符串 */
|
|
4838
|
+
subId: number;
|
|
4839
|
+
/** 文件名 此项没有则为空字符串 */
|
|
4840
|
+
name: string;
|
|
4841
|
+
/** 文件大小 此项没有则为0 */
|
|
4842
|
+
size: number;
|
|
4843
|
+
/** 过期时间 此项没有则为0 */
|
|
4844
|
+
expireTime: number;
|
|
4845
|
+
/** 文件URL */
|
|
4846
|
+
url: string;
|
|
4847
|
+
}
|
|
4848
|
+
/** 通知事件: 群聊戳一戳 */
|
|
4849
|
+
interface GroupPokeType {
|
|
4850
|
+
/** 操作者id */
|
|
4851
|
+
operatorId: string;
|
|
4852
|
+
/** 操作名称,如“戳了戳” */
|
|
4853
|
+
action: string;
|
|
4854
|
+
/** 后缀,未设置则未空字符串 */
|
|
4855
|
+
suffix: string;
|
|
4856
|
+
/** 操作图标url */
|
|
4857
|
+
actionImage: string;
|
|
4858
|
+
/** 被戳目标id */
|
|
4859
|
+
targetId: string;
|
|
4860
|
+
}
|
|
4861
|
+
/**
|
|
4862
|
+
* 通知事件: 群聊撤回
|
|
4863
|
+
* 撤回自己消息时,operator和target为自己
|
|
4864
|
+
* 撤回别人消息时,operator为操作者,target为被撤回者
|
|
4865
|
+
*/
|
|
4866
|
+
interface GroupRecallType {
|
|
4867
|
+
/** 操作者id */
|
|
4868
|
+
operatorId: string;
|
|
4869
|
+
/** 目标id 撤回自己消息为自己 否则是被撤回者 */
|
|
4870
|
+
targetId: string;
|
|
4871
|
+
/** 撤回的消息id */
|
|
4872
|
+
messageId: string;
|
|
4873
|
+
/** 操作提示,如“撤回了一条消息” 一般此项为空字符串 */
|
|
4874
|
+
tip: string;
|
|
4875
|
+
}
|
|
4876
|
+
/**
|
|
4877
|
+
* 通知事件: 群文件上传
|
|
4878
|
+
* 文件信息最少需要提供一个url
|
|
4879
|
+
*/
|
|
4880
|
+
interface GroupFileUploadedType {
|
|
4881
|
+
/** 文件ID */
|
|
4882
|
+
fid: string;
|
|
4883
|
+
/** 文件子ID */
|
|
4884
|
+
subId: number;
|
|
4885
|
+
/** 文件名 */
|
|
4886
|
+
name: string;
|
|
4887
|
+
/** 文件大小 */
|
|
4888
|
+
size: number;
|
|
4889
|
+
/** 过期时间 */
|
|
4890
|
+
expireTime?: number;
|
|
4891
|
+
/** 文件URL */
|
|
4892
|
+
url?: string;
|
|
4893
|
+
}
|
|
4894
|
+
/** 通知事件: 群名片变动 */
|
|
4895
|
+
interface GroupCardChangedType {
|
|
4896
|
+
/** 操作者id */
|
|
4897
|
+
operatorId: string;
|
|
4898
|
+
/** 目标id */
|
|
4899
|
+
targetId: string;
|
|
4900
|
+
/** 新名片 */
|
|
4901
|
+
newCard: string;
|
|
4902
|
+
}
|
|
4903
|
+
/** 通知事件: 群成员头衔变动 */
|
|
4904
|
+
interface GroupMemberUniqueTitleChangedType {
|
|
4905
|
+
/** 目标id */
|
|
4906
|
+
targetId: string;
|
|
4907
|
+
/** 新头衔 */
|
|
4908
|
+
title: string;
|
|
4909
|
+
}
|
|
4910
|
+
/** 通知事件: 群精华消息变动 */
|
|
4911
|
+
interface GroupHlightsChangedType {
|
|
4912
|
+
/** 操作者id */
|
|
4913
|
+
operatorId: string;
|
|
4914
|
+
/** 发送者id */
|
|
4915
|
+
senderId: string;
|
|
4916
|
+
/** 被操作的消息id */
|
|
4917
|
+
messageId: string;
|
|
4918
|
+
/** 设置、取消精华 */
|
|
4919
|
+
isSet: boolean;
|
|
4920
|
+
}
|
|
4921
|
+
/** 通知事件: 群成员增加 */
|
|
4922
|
+
interface GroupMemberIncreaseType {
|
|
4923
|
+
/** 操作者id */
|
|
4924
|
+
operatorId: string;
|
|
4925
|
+
/** 加入者id */
|
|
4926
|
+
targetId: string;
|
|
4927
|
+
/** 加入方式 APPROVE:管理员批准 INVITE:管理员邀请 */
|
|
4928
|
+
type: 'invite' | 'approve';
|
|
4929
|
+
}
|
|
4930
|
+
/** 通知事件: 群成员减少 */
|
|
4931
|
+
interface GroupMemberDecreaseType {
|
|
4932
|
+
/** 操作者id */
|
|
4933
|
+
operatorId: string;
|
|
4934
|
+
/** 目标id */
|
|
4935
|
+
targetId: string;
|
|
4936
|
+
/** 减少方式 leave:主动退群 kick:成员被踢 kickBot:机器人自身被踢 */
|
|
4937
|
+
type: 'leave' | 'kick' | 'kickBot';
|
|
4938
|
+
}
|
|
4939
|
+
/** 通知事件: 群管理员变动 */
|
|
4940
|
+
interface GroupAdminChangedType {
|
|
4941
|
+
/** 目标id */
|
|
4942
|
+
targetId: string;
|
|
4943
|
+
/** 设置、取消管理员 */
|
|
4944
|
+
isAdmin: boolean;
|
|
4945
|
+
}
|
|
4946
|
+
/** 通知事件: 群打卡 */
|
|
4947
|
+
interface GroupSignInType {
|
|
4948
|
+
/** 目标id */
|
|
4949
|
+
targetId: string;
|
|
4950
|
+
/** 操作名称,如“打卡了” */
|
|
4951
|
+
action: string;
|
|
4952
|
+
/** 打卡图标url */
|
|
4953
|
+
rankImage: string;
|
|
4954
|
+
}
|
|
4955
|
+
/** 通知事件: 群成员被禁言 */
|
|
4956
|
+
interface GroupMemberBanType {
|
|
4957
|
+
/** 操作者id */
|
|
4958
|
+
operatorId: string;
|
|
4959
|
+
/** 目标id */
|
|
4960
|
+
targetId: string;
|
|
4961
|
+
/** 禁言时长,单位秒 */
|
|
4962
|
+
duration: number;
|
|
4963
|
+
/** 是否为禁言 */
|
|
4964
|
+
isBan: boolean;
|
|
4965
|
+
}
|
|
4966
|
+
/** 通知事件: 群全员禁言 */
|
|
4967
|
+
interface GroupWholeBanType {
|
|
4968
|
+
/** 操作者id */
|
|
4969
|
+
operatorId: string;
|
|
4970
|
+
/** 是否开启全体禁言 */
|
|
4971
|
+
isBan: boolean;
|
|
4972
|
+
}
|
|
4973
|
+
/** 通知事件: 群表情动态 */
|
|
4974
|
+
interface GroupMessageReactionType {
|
|
4975
|
+
/** 消息ID */
|
|
4976
|
+
messageId: string;
|
|
4977
|
+
/** 表情ID 参考: https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#EmojiType */
|
|
4978
|
+
faceId: number;
|
|
4979
|
+
/** 数量 */
|
|
4980
|
+
count: number;
|
|
4981
|
+
/** 添加、取消回应 */
|
|
4982
|
+
isSet: boolean;
|
|
4983
|
+
}
|
|
4984
|
+
/** 通知事件: 群聊运气王 */
|
|
4985
|
+
interface GroupLuckKingType {
|
|
4986
|
+
/** 红包发送者id */
|
|
4987
|
+
userId: string;
|
|
4988
|
+
/** 运气王id */
|
|
4989
|
+
targetId: string;
|
|
4990
|
+
}
|
|
4991
|
+
/** 通知事件: 群聊荣誉变更事件 */
|
|
4992
|
+
interface GroupHonorChangedType {
|
|
4993
|
+
/** 荣誉类型,分别表示龙王、群聊之火、快乐源泉 */
|
|
4994
|
+
honorType: 'talkative' | 'performer' | 'emotion';
|
|
4995
|
+
}
|
|
4996
|
+
/** 请求事件: 好友申请 */
|
|
4997
|
+
interface PrivateApplyType {
|
|
4998
|
+
/** 申请者id */
|
|
4999
|
+
applierId: string;
|
|
5000
|
+
/** 验证信息 */
|
|
5001
|
+
message: string;
|
|
5002
|
+
/** 请求 flag,在调用处理请求的 API 时需要传入 */
|
|
5003
|
+
flag: string;
|
|
5004
|
+
}
|
|
5005
|
+
/** 请求事件: 新成员申请加入群聊申请 */
|
|
5006
|
+
interface GroupApply {
|
|
5007
|
+
/** 申请者id */
|
|
5008
|
+
applierId: string;
|
|
5009
|
+
/** 邀请者id */
|
|
5010
|
+
inviterId: string;
|
|
5011
|
+
/** 申请理由 */
|
|
5012
|
+
reason: string;
|
|
5013
|
+
/** 请求 flag,在调用处理请求的 API 时需要传入 */
|
|
5014
|
+
flag: string;
|
|
5015
|
+
/** 群id */
|
|
5016
|
+
groupId: string;
|
|
5017
|
+
}
|
|
5018
|
+
/** 请求事件: 邀请Bot加入群聊 */
|
|
5019
|
+
interface GroupInvite {
|
|
5020
|
+
/** 邀请者id */
|
|
5021
|
+
inviterId: string;
|
|
5022
|
+
/** 请求 flag,在调用处理请求的 API 时需要传入 */
|
|
5023
|
+
flag: string;
|
|
5024
|
+
}
|
|
5025
|
+
|
|
5026
|
+
/**
|
|
5027
|
+
* 事件父类型
|
|
5028
|
+
* - `message`: 消息事件
|
|
5029
|
+
* - `notice`: 通知事件
|
|
5030
|
+
* - `request`: 请求事件
|
|
5031
|
+
*/
|
|
5032
|
+
type EventParent = 'message' | 'notice' | 'request';
|
|
5033
|
+
/**
|
|
5034
|
+
* `消息`事件子类型
|
|
5035
|
+
* - `group`: 群消息
|
|
5036
|
+
* - `friend`: 好友消息
|
|
5037
|
+
* - `guild`: 频道消息
|
|
5038
|
+
* - `direct`: 频道私信
|
|
5039
|
+
* - `groupTemp`: 群临时会话
|
|
5040
|
+
*/
|
|
5041
|
+
type MessageEventSub = 'group' | 'friend' | 'guild' | 'direct' | 'groupTemp';
|
|
5042
|
+
/**
|
|
5043
|
+
* `通知`事件子类型
|
|
5044
|
+
* - `receiveLike`: 收到点赞
|
|
5045
|
+
* - `friendPoke`: 好友戳一戳
|
|
5046
|
+
* - `friendRecall`: 好友撤回消息
|
|
5047
|
+
* - `friendFileUploaded`: 好友发送文件
|
|
5048
|
+
* - `friendIncrease`: 好友增加
|
|
5049
|
+
* - `friendDecrease`: 好友减少
|
|
5050
|
+
*
|
|
5051
|
+
* - `groupPoke`: 群聊戳一戳
|
|
5052
|
+
* - `groupCardChanged`: 群聊名片变动
|
|
5053
|
+
* - `groupMemberTitleUpdate`: 群聊成员头衔变动
|
|
5054
|
+
* - `groupHighlightsChange`: 群聊精华消息变动
|
|
5055
|
+
* - `groupRecall`: 群聊撤回消息
|
|
5056
|
+
* - `groupMemberAdd`: 群聊成员增加
|
|
5057
|
+
* - `groupMemberRemove`: 群聊成员减少
|
|
5058
|
+
* - `groupAdminChanged`: 群聊管理员变动
|
|
5059
|
+
* - `groupMemberBan`: 群聊成员禁言
|
|
5060
|
+
* - `groupSignIn`: 群聊签到
|
|
5061
|
+
* - `groupWholeBan`: 群聊全员禁言
|
|
5062
|
+
* - `groupFileUploaded`: 群聊发送文件
|
|
5063
|
+
* - `groupMessageReaction`: 群聊消息表情动态回应
|
|
5064
|
+
* - `groupLuckyKing`: 群聊运气王事件
|
|
5065
|
+
* - `groupHonorChange`: 群聊荣誉变更事件
|
|
5066
|
+
*/
|
|
5067
|
+
type NoticeEventSub =
|
|
5068
|
+
/** 收到点赞 */
|
|
5069
|
+
'receiveLike'
|
|
5070
|
+
/** 好友戳一戳 */
|
|
5071
|
+
| 'friendPoke'
|
|
5072
|
+
/** 好友撤回消息 */
|
|
5073
|
+
| 'friendRecall'
|
|
5074
|
+
/** 好友发送文件 */
|
|
5075
|
+
| 'friendFileUploaded'
|
|
5076
|
+
/** 好友增加 */
|
|
5077
|
+
| 'friendIncrease'
|
|
5078
|
+
/** 好友减少 */
|
|
5079
|
+
| 'friendDecrease'
|
|
5080
|
+
/** 群聊戳一戳 */
|
|
5081
|
+
| 'groupPoke'
|
|
5082
|
+
/** 群聊名片变动 */
|
|
5083
|
+
| 'groupCardChanged'
|
|
5084
|
+
/** 群聊成员头衔变动 */
|
|
5085
|
+
| 'groupMemberTitleUpdate'
|
|
5086
|
+
/** 群聊精华消息变动 */
|
|
5087
|
+
| 'groupHighlightsChange'
|
|
5088
|
+
/** 群聊撤回消息 */
|
|
5089
|
+
| 'groupRecall'
|
|
5090
|
+
/** 群聊成员增加 */
|
|
5091
|
+
| 'groupMemberAdd'
|
|
5092
|
+
/** 群聊成员减少 */
|
|
5093
|
+
| 'groupMemberRemove'
|
|
5094
|
+
/** 群聊管理员变动 */
|
|
5095
|
+
| 'groupAdminChanged'
|
|
5096
|
+
/** 群聊成员禁言 */
|
|
5097
|
+
| 'groupMemberBan'
|
|
5098
|
+
/** 群聊签到 */
|
|
5099
|
+
| 'groupSignIn'
|
|
5100
|
+
/** 群聊全员禁言 */
|
|
5101
|
+
| 'groupWholeBan'
|
|
5102
|
+
/** 群聊发送文件 */
|
|
5103
|
+
| 'groupFileUploaded'
|
|
5104
|
+
/** 群聊消息表情动态回应 */
|
|
5105
|
+
| 'groupMessageReaction'
|
|
5106
|
+
/** 群聊运气王事件 */
|
|
5107
|
+
| 'groupLuckyKing'
|
|
5108
|
+
/** 群聊荣誉变更事件 */
|
|
5109
|
+
| 'groupHonorChange';
|
|
5110
|
+
/**
|
|
5111
|
+
* `请求`事件子类型
|
|
5112
|
+
* - `friendApply`: 收到添加Bot为好友请求
|
|
5113
|
+
* - `groupApply`: 收到用户申请加入群聊请求
|
|
5114
|
+
* - `groupInvite`: 收到邀请Bot加入群聊请求
|
|
5115
|
+
*/
|
|
5116
|
+
type RequestEventSub = 'friendApply' | 'groupApply' | 'groupInvite';
|
|
5117
|
+
/**
|
|
5118
|
+
* 事件父类型与子类型的映射
|
|
5119
|
+
*/
|
|
5120
|
+
interface EventToSubEvent {
|
|
5121
|
+
message: MessageEventSub;
|
|
5122
|
+
notice: NoticeEventSub;
|
|
5123
|
+
request: RequestEventSub;
|
|
5124
|
+
}
|
|
5125
|
+
/**
|
|
5126
|
+
* 事件基类定义
|
|
5127
|
+
* @description 所有的事件都拥有这些基本属性
|
|
5128
|
+
*/
|
|
5129
|
+
interface BaseEventType<T extends EventParent> {
|
|
5130
|
+
/** 机器人ID */
|
|
5131
|
+
selfId: string;
|
|
5132
|
+
/** 用户ID */
|
|
5133
|
+
userId: string;
|
|
5134
|
+
/** 事件类型 */
|
|
5135
|
+
event: T;
|
|
5136
|
+
/** 事件子类型 */
|
|
5137
|
+
subEvent: EventToSubEvent[T];
|
|
5138
|
+
/** 事件ID */
|
|
5139
|
+
eventId: string;
|
|
5140
|
+
/** 原始事件 */
|
|
5141
|
+
rawEvent: any;
|
|
5142
|
+
/** 事件触发时间戳 */
|
|
5143
|
+
time: number;
|
|
5144
|
+
/** 事件联系人信息 */
|
|
5145
|
+
contact: Contact;
|
|
5146
|
+
/** 事件发送者信息 */
|
|
5147
|
+
sender: Sender;
|
|
5148
|
+
/** 快速回复源函数 适配器实现 */
|
|
5149
|
+
srcReply: SrcReply;
|
|
5150
|
+
/** bot自身实例 所有标准Api都通过这里调用 */
|
|
5151
|
+
bot: AdapterType;
|
|
5152
|
+
}
|
|
5153
|
+
/** 事件基类参数 */
|
|
5154
|
+
type BaseEventOptions<T extends EventParent> = Omit<BaseEventType<T>, 'userId' | 'selfId'>;
|
|
5155
|
+
/** 创建消息事件类所需参数类型 */
|
|
5156
|
+
type MessageOptions = Omit<BaseEventOptions<'message'>, 'event'> & {
|
|
5157
|
+
/** 消息ID */
|
|
5158
|
+
messageId: string;
|
|
5159
|
+
/** 消息序列号 */
|
|
5160
|
+
messageSeq: number;
|
|
5161
|
+
/** 消息体元素 */
|
|
5162
|
+
elements: Elements[];
|
|
5163
|
+
};
|
|
5164
|
+
/** 创建好友消息事件所需参数类型 */
|
|
5165
|
+
type FriendMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
5166
|
+
/** 事件来源好友信息 */
|
|
5167
|
+
contact: Contact<'friend'>;
|
|
5168
|
+
/** 好友发送者信息 */
|
|
5169
|
+
sender: Sender<'friend'>;
|
|
5170
|
+
};
|
|
5171
|
+
/** 创建群消息事件所需参数类型 */
|
|
5172
|
+
type GroupMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
5173
|
+
/** 事件来源群信息 */
|
|
5174
|
+
contact: Contact<'group'>;
|
|
5175
|
+
/** 群发送者信息 */
|
|
5176
|
+
sender: Sender<'group'>;
|
|
5177
|
+
};
|
|
5178
|
+
/** 创建频道消息事件所需参数类型 */
|
|
5179
|
+
type GuildMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
5180
|
+
/** 事件来源频道信息 */
|
|
5181
|
+
contact: Contact<'guild'>;
|
|
5182
|
+
/** 频道发送者信息 */
|
|
5183
|
+
sender: Sender<'guild'>;
|
|
5184
|
+
};
|
|
5185
|
+
/** 创建频道私信消息事件所需参数类型 */
|
|
5186
|
+
type DirectMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
5187
|
+
/** 事件来源频道私信信息 */
|
|
5188
|
+
contact: Contact<'direct'>;
|
|
5189
|
+
/** 频道私信发送者信息 */
|
|
5190
|
+
sender: Sender<'direct'>;
|
|
5191
|
+
/** 来源频道ID */
|
|
5192
|
+
srcGuildId: string;
|
|
5193
|
+
};
|
|
5194
|
+
/** 创建群临时会话消息事件所需参数类型 */
|
|
5195
|
+
type GroupTempMessageOptions = Omit<MessageOptions, 'subEvent' | 'contact' | 'sender'> & {
|
|
5196
|
+
/** 事件来源群临时会话信息 */
|
|
5197
|
+
contact: Contact<'groupTemp'>;
|
|
5198
|
+
/** 群临时会话发送者信息 */
|
|
5199
|
+
sender: Sender<'groupTemp'>;
|
|
5200
|
+
};
|
|
5201
|
+
/** 通知事件: 创建通知事件类所需参数类型 */
|
|
5202
|
+
type NoticeOptions = Omit<BaseEventOptions<'notice'>, 'event' | 'sender'> & {
|
|
5203
|
+
sender: Sender;
|
|
5204
|
+
};
|
|
5205
|
+
/** 创建收到点赞通知事件 */
|
|
5206
|
+
type ReceiveLikeOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5207
|
+
/** 事件来源信息 */
|
|
5208
|
+
contact: Contact<'friend'>;
|
|
5209
|
+
/** 事件创建者信息 */
|
|
5210
|
+
sender: Sender<'friend'>;
|
|
5211
|
+
/** 请求内容 */
|
|
5212
|
+
content: ReceiveLikeType;
|
|
5213
|
+
};
|
|
5214
|
+
/** 创建好友增加通知事件 */
|
|
5215
|
+
type FriendIncreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5216
|
+
/** 事件来源信息 */
|
|
5217
|
+
contact: Contact<'friend'>;
|
|
5218
|
+
/** 事件创建者信息 */
|
|
5219
|
+
sender: Sender<'friend'>;
|
|
5220
|
+
/** 请求内容 */
|
|
5221
|
+
content: FriendIncreaseType;
|
|
5222
|
+
};
|
|
5223
|
+
/** 创建好友减少通知事件 */
|
|
5224
|
+
type FriendDecreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5225
|
+
/** 事件来源信息 */
|
|
5226
|
+
contact: Contact<'friend'>;
|
|
5227
|
+
/** 事件创建者信息 */
|
|
5228
|
+
sender: Sender<'friend'>;
|
|
5229
|
+
/** 请求内容 */
|
|
5230
|
+
content: FriendDecreaseType;
|
|
5231
|
+
};
|
|
5232
|
+
/** 创建私聊戳一戳通知事件 */
|
|
5233
|
+
type PrivatePokeOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5234
|
+
/** 事件来源信息 */
|
|
5235
|
+
contact: Contact<'friend'>;
|
|
5236
|
+
/** 事件创建者信息 */
|
|
5237
|
+
sender: Sender<'friend'>;
|
|
5238
|
+
/** 请求内容 */
|
|
5239
|
+
content: PrivatePokeType;
|
|
5240
|
+
};
|
|
5241
|
+
/** 创建私聊撤回消息通知事件 */
|
|
5242
|
+
type PrivateRecallOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5243
|
+
/** 事件来源信息 */
|
|
5244
|
+
contact: Contact<'friend'>;
|
|
5245
|
+
/** 事件创建者信息 */
|
|
5246
|
+
sender: Sender<'friend'>;
|
|
5247
|
+
/** 请求内容 */
|
|
5248
|
+
content: PrivateRecallType;
|
|
5249
|
+
};
|
|
5250
|
+
/** 创建私聊文件上传通知事件 */
|
|
5251
|
+
type PrivateFileUploadedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5252
|
+
/** 事件来源信息 */
|
|
5253
|
+
contact: Contact<'friend'>;
|
|
5254
|
+
/** 事件创建者信息 */
|
|
5255
|
+
sender: Sender<'friend'>;
|
|
5256
|
+
/** 请求内容 */
|
|
5257
|
+
content: PrivateFileUploadedType;
|
|
5258
|
+
};
|
|
5259
|
+
/** 创建群聊戳一戳通知事件 */
|
|
5260
|
+
type GroupPokeOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5261
|
+
/** 事件来源信息 */
|
|
5262
|
+
contact: Contact<'group'>;
|
|
5263
|
+
/** 事件创建者信息 */
|
|
5264
|
+
sender: Sender<'group'>;
|
|
5265
|
+
/** 请求内容 */
|
|
5266
|
+
content: GroupPokeType;
|
|
5267
|
+
};
|
|
5268
|
+
/** 创建群聊撤回通知事件 */
|
|
5269
|
+
type GroupRecallOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5270
|
+
/** 事件来源信息 */
|
|
5271
|
+
contact: Contact<'group'>;
|
|
5272
|
+
/** 事件创建者信息 */
|
|
5273
|
+
sender: Sender<'group'>;
|
|
5274
|
+
/** 请求内容 */
|
|
5275
|
+
content: GroupRecallType;
|
|
5276
|
+
};
|
|
5277
|
+
/** 创建群聊文件上传通知事件 */
|
|
5278
|
+
type GroupFileUploadedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5279
|
+
/** 事件来源信息 */
|
|
5280
|
+
contact: Contact<'group'>;
|
|
5281
|
+
/** 事件创建者信息 */
|
|
5282
|
+
sender: Sender<'group'>;
|
|
5283
|
+
/** 请求内容 */
|
|
5284
|
+
content: GroupFileUploadedType;
|
|
5285
|
+
};
|
|
5286
|
+
/** 创建群名片变动通知事件 */
|
|
5287
|
+
type GroupCardChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5288
|
+
/** 事件来源信息 */
|
|
5289
|
+
contact: Contact<'group'>;
|
|
5290
|
+
/** 事件创建者信息 */
|
|
5291
|
+
sender: Sender<'group'>;
|
|
5292
|
+
/** 请求内容 */
|
|
5293
|
+
content: GroupCardChangedType;
|
|
5294
|
+
};
|
|
5295
|
+
/** 创建群成员头衔变动通知事件 */
|
|
5296
|
+
type GroupMemberUniqueTitleChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5297
|
+
/** 事件来源信息 */
|
|
5298
|
+
contact: Contact<'group'>;
|
|
5299
|
+
/** 事件创建者信息 */
|
|
5300
|
+
sender: Sender<'group'>;
|
|
5301
|
+
/** 请求内容 */
|
|
5302
|
+
content: GroupMemberUniqueTitleChangedType;
|
|
5303
|
+
};
|
|
5304
|
+
/** 创建群精华消息变动通知事件 */
|
|
5305
|
+
type GroupHlightsChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5306
|
+
/** 事件来源信息 */
|
|
5307
|
+
contact: Contact<'group'>;
|
|
5308
|
+
/** 事件创建者信息 */
|
|
5309
|
+
sender: Sender<'group'>;
|
|
5310
|
+
/** 请求内容 */
|
|
5311
|
+
content: GroupHlightsChangedType;
|
|
5312
|
+
};
|
|
5313
|
+
/** 创建群成员增加通知事件 */
|
|
5314
|
+
type GroupMemberIncreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5315
|
+
/** 事件来源信息 */
|
|
5316
|
+
contact: Contact<'group'>;
|
|
5317
|
+
/** 事件创建者信息 */
|
|
5318
|
+
sender: Sender<'group'>;
|
|
5319
|
+
/** 请求内容 */
|
|
5320
|
+
content: GroupMemberIncreaseType;
|
|
5321
|
+
};
|
|
5322
|
+
/** 创建群成员减少通知事件 */
|
|
5323
|
+
type GroupMemberDecreaseOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5324
|
+
/** 事件来源信息 */
|
|
5325
|
+
contact: Contact<'group'>;
|
|
5326
|
+
/** 事件创建者信息 */
|
|
5327
|
+
sender: Sender<'group'>;
|
|
5328
|
+
/** 请求内容 */
|
|
5329
|
+
content: GroupMemberDecreaseType;
|
|
5330
|
+
};
|
|
5331
|
+
/** 创建群管理员变动通知事件 */
|
|
5332
|
+
type GroupAdminChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5333
|
+
/** 事件来源信息 */
|
|
5334
|
+
contact: Contact<'group'>;
|
|
5335
|
+
/** 事件创建者信息 */
|
|
5336
|
+
sender: Sender<'group'>;
|
|
5337
|
+
/** 请求内容 */
|
|
5338
|
+
content: GroupAdminChangedType;
|
|
5339
|
+
};
|
|
5340
|
+
/** 创建群打卡通知事件 */
|
|
5341
|
+
type GroupSignInOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5342
|
+
/** 事件来源信息 */
|
|
5343
|
+
contact: Contact<'group'>;
|
|
5344
|
+
/** 事件创建者信息 */
|
|
5345
|
+
sender: Sender<'group'>;
|
|
5346
|
+
/** 请求内容 */
|
|
5347
|
+
content: GroupSignInType;
|
|
5348
|
+
};
|
|
5349
|
+
/** 创建群成员被禁言通知事件 */
|
|
5350
|
+
type GroupMemberBanOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5351
|
+
/** 事件来源信息 */
|
|
5352
|
+
contact: Contact<'group'>;
|
|
5353
|
+
/** 事件创建者信息 */
|
|
5354
|
+
sender: Sender<'group'>;
|
|
5355
|
+
/** 请求内容 */
|
|
5356
|
+
content: GroupMemberBanType;
|
|
5357
|
+
};
|
|
5358
|
+
/** 创建群全员禁言通知事件 */
|
|
5359
|
+
type GroupWholeBanOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5360
|
+
/** 事件来源信息 */
|
|
5361
|
+
contact: Contact<'group'>;
|
|
5362
|
+
/** 事件创建者信息 */
|
|
5363
|
+
sender: Sender<'group'>;
|
|
5364
|
+
/** 请求内容 */
|
|
5365
|
+
content: GroupWholeBanType;
|
|
5366
|
+
};
|
|
5367
|
+
/** 创建群表情动态通知事件 */
|
|
5368
|
+
type GroupMessageReactionOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5369
|
+
/** 事件来源信息 */
|
|
5370
|
+
contact: Contact<'group'>;
|
|
5371
|
+
/** 事件创建者信息 */
|
|
5372
|
+
sender: Sender<'group'>;
|
|
5373
|
+
/** 请求内容 */
|
|
5374
|
+
content: GroupMessageReactionType;
|
|
5375
|
+
};
|
|
5376
|
+
/** 创建群聊运气王通知事件 */
|
|
5377
|
+
type GroupLuckKingOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5378
|
+
/** 事件来源信息 */
|
|
5379
|
+
contact: Contact<'group'>;
|
|
5380
|
+
/** 事件创建者信息 */
|
|
5381
|
+
sender: Sender<'group'>;
|
|
5382
|
+
/** 请求内容 */
|
|
5383
|
+
content: GroupLuckKingType;
|
|
5384
|
+
};
|
|
5385
|
+
/** 创建群聊荣誉变更通知事件 */
|
|
5386
|
+
type GroupHonorChangedOptions = Omit<NoticeOptions, 'subEvent'> & {
|
|
5387
|
+
/** 事件来源信息 */
|
|
5388
|
+
contact: Contact<'group'>;
|
|
5389
|
+
/** 事件创建者信息 */
|
|
5390
|
+
sender: Sender<'group'>;
|
|
5391
|
+
/** 请求内容 */
|
|
5392
|
+
content: GroupHonorChangedType;
|
|
5393
|
+
};
|
|
5394
|
+
/** 创建请求事件类所需参数类型 */
|
|
5395
|
+
type RequestOptions = Omit<BaseEventOptions<'request'>, 'event'> & {
|
|
5396
|
+
/** 请求内容 */
|
|
5397
|
+
content: any;
|
|
5398
|
+
};
|
|
5399
|
+
/** 创建好友申请请求事件 */
|
|
5400
|
+
type PrivateApplyRequestOptions = RequestOptions & {
|
|
5401
|
+
/** 事件来源信息 */
|
|
5402
|
+
contact: Contact<'friend'>;
|
|
5403
|
+
/** 事件创建者信息 */
|
|
5404
|
+
sender: Sender<'friend'>;
|
|
5405
|
+
/** 请求内容 */
|
|
5406
|
+
content: PrivateApplyType;
|
|
5407
|
+
};
|
|
5408
|
+
type FriendRequestOptions = PrivateApplyRequestOptions;
|
|
5409
|
+
/** 创建新成员加入群聊申请请求事件 */
|
|
5410
|
+
type GroupApplyRequestOptions = RequestOptions & {
|
|
5411
|
+
/** 事件来源信息 */
|
|
5412
|
+
contact: Contact<'group'>;
|
|
5413
|
+
/** 事件创建者信息 */
|
|
5414
|
+
sender: Sender<'group'>;
|
|
5415
|
+
/** 请求内容 */
|
|
5416
|
+
content: GroupApply;
|
|
5417
|
+
};
|
|
5418
|
+
/** 创建邀请机器人加入群聊请求事件 */
|
|
5419
|
+
type GroupInviteRequestOptions = RequestOptions & {
|
|
5420
|
+
/** 事件来源信息 */
|
|
5421
|
+
contact: Contact<'group'>;
|
|
5422
|
+
/** 事件创建者信息 */
|
|
5423
|
+
sender: Sender<'group'>;
|
|
5424
|
+
/** 请求内容 */
|
|
5425
|
+
content: GroupInvite;
|
|
5426
|
+
};
|
|
5427
|
+
|
|
5428
|
+
/** 事件实现基类 */
|
|
5429
|
+
declare abstract class BaseEvent<T extends EventParent> {
|
|
5430
|
+
#private;
|
|
5431
|
+
/** 快速回复 */
|
|
5432
|
+
reply: Reply;
|
|
5433
|
+
/** 存储器 由开发者自行调用 */
|
|
5434
|
+
store: Map<any, any>;
|
|
5435
|
+
/** 日志函数字符串 */
|
|
5436
|
+
logFnc: string;
|
|
5437
|
+
/** 日志用户字符串 */
|
|
5438
|
+
logText: string;
|
|
5439
|
+
/** 是否为主人 */
|
|
5440
|
+
isMaster: boolean;
|
|
5441
|
+
/** 是否为Bot管理员 */
|
|
5442
|
+
isAdmin: boolean;
|
|
5443
|
+
constructor({ event, subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, }: BaseEventOptions<T>);
|
|
6091
5444
|
/**
|
|
6092
|
-
*
|
|
6093
|
-
* @
|
|
6094
|
-
* @param file 本地文件绝对路径
|
|
6095
|
-
* @param name 文件名称 必须提供
|
|
6096
|
-
* @param folder 父目录ID 不提供则上传到根目录 仅在群聊时有效
|
|
6097
|
-
* @returns 此接口的返回值不值得信任
|
|
5445
|
+
* @description 机器人ID
|
|
5446
|
+
* @deprecated 即将废弃,请使用 `selfId`
|
|
6098
5447
|
*/
|
|
6099
|
-
|
|
5448
|
+
get self_id(): string;
|
|
6100
5449
|
/**
|
|
6101
|
-
*
|
|
6102
|
-
* @
|
|
6103
|
-
* @returns 下载文件的绝对路径和文件MD5
|
|
5450
|
+
* @description 用户ID
|
|
5451
|
+
* @deprecated 即将废弃,请使用 `userId`
|
|
6104
5452
|
*/
|
|
6105
|
-
|
|
5453
|
+
get user_id(): string;
|
|
5454
|
+
/** 机器人自身ID */
|
|
5455
|
+
get selfId(): string;
|
|
5456
|
+
/** 用户ID */
|
|
5457
|
+
get userId(): string;
|
|
5458
|
+
/** 事件父类型 */
|
|
5459
|
+
get event(): T;
|
|
5460
|
+
/** 事件子类型 */
|
|
5461
|
+
get subEvent(): EventToSubEvent[T];
|
|
5462
|
+
/** 事件ID */
|
|
5463
|
+
get eventId(): string;
|
|
5464
|
+
/** 原始事件 */
|
|
5465
|
+
get rawEvent(): unknown;
|
|
5466
|
+
/** 事件触发时间戳 */
|
|
5467
|
+
get time(): number;
|
|
5468
|
+
/** 事件来源信息 */
|
|
5469
|
+
get contact(): Contact;
|
|
5470
|
+
/** 事件发送者信息 */
|
|
5471
|
+
get sender(): Sender;
|
|
5472
|
+
/** 快速回复源函数 */
|
|
5473
|
+
get srcReply(): SrcReply;
|
|
5474
|
+
/** 机器人实例 */
|
|
5475
|
+
get bot(): AdapterType;
|
|
6106
5476
|
/**
|
|
6107
|
-
*
|
|
6108
|
-
*
|
|
6109
|
-
*
|
|
6110
|
-
* @returns 返回文件夹id和已使用空间
|
|
5477
|
+
* 是否为私聊场景
|
|
5478
|
+
* - 在好友场景下为 `true`
|
|
5479
|
+
* - 在频道私信场景下为 `true`
|
|
6111
5480
|
*/
|
|
6112
|
-
|
|
5481
|
+
get isPrivate(): boolean;
|
|
5482
|
+
/** 是否为好友场景 */
|
|
5483
|
+
get isFriend(): boolean;
|
|
5484
|
+
/** 是否为群聊场景 */
|
|
5485
|
+
get isGroup(): boolean;
|
|
5486
|
+
/** 是否为频道场景 */
|
|
5487
|
+
get isGuild(): boolean;
|
|
5488
|
+
/** 是否为群临时会话场景 */
|
|
5489
|
+
get isGroupTemp(): boolean;
|
|
5490
|
+
/** 是否为频道私信场景 */
|
|
5491
|
+
get isDirect(): boolean;
|
|
5492
|
+
}
|
|
5493
|
+
|
|
5494
|
+
/**
|
|
5495
|
+
* @description 消息事件基类
|
|
5496
|
+
* @class FriendMessage
|
|
5497
|
+
*/
|
|
5498
|
+
declare abstract class MessageBase extends BaseEvent<'message'> {
|
|
5499
|
+
#private;
|
|
5500
|
+
/** 消息段 */
|
|
5501
|
+
elements: Elements[];
|
|
5502
|
+
/** 消息文本 */
|
|
5503
|
+
msg: string;
|
|
5504
|
+
/** 别名 */
|
|
5505
|
+
alias: string;
|
|
5506
|
+
/** 消息日志 */
|
|
5507
|
+
rawMessage: string;
|
|
5508
|
+
constructor({ subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, messageId, messageSeq, elements, }: MessageOptions);
|
|
6113
5509
|
/**
|
|
6114
|
-
*
|
|
6115
|
-
* @param groupId 群号
|
|
6116
|
-
* @param folderId 文件夹id
|
|
6117
|
-
* @param name 文件夹名
|
|
6118
|
-
* @returns 无返回值
|
|
5510
|
+
* @deprecated 即将废弃 请使用 `rawMessage`
|
|
6119
5511
|
*/
|
|
6120
|
-
|
|
5512
|
+
get raw_message(): string;
|
|
6121
5513
|
/**
|
|
6122
|
-
*
|
|
6123
|
-
* @
|
|
6124
|
-
* @param folderId 文件夹id
|
|
6125
|
-
* @returns 无返回值
|
|
5514
|
+
* @description 消息ID
|
|
5515
|
+
* @deprecated 即将废弃 请使用 `messageId`
|
|
6126
5516
|
*/
|
|
6127
|
-
|
|
5517
|
+
get message_id(): string;
|
|
6128
5518
|
/**
|
|
6129
|
-
*
|
|
6130
|
-
* @
|
|
6131
|
-
* @param groupId 群号
|
|
6132
|
-
* @param file 文件绝对路径
|
|
6133
|
-
* @param name 文件名
|
|
6134
|
-
* @returns 无返回值
|
|
5519
|
+
* @description 消息序列号
|
|
5520
|
+
* @deprecated 即将废弃 请使用 `messageSeq`
|
|
6135
5521
|
*/
|
|
6136
|
-
|
|
5522
|
+
get message_seq(): number;
|
|
5523
|
+
get event(): "message";
|
|
5524
|
+
get subEvent(): MessageEventSub;
|
|
5525
|
+
get messageId(): string;
|
|
5526
|
+
get messageSeq(): number;
|
|
5527
|
+
get at(): string[];
|
|
5528
|
+
get atBot(): boolean;
|
|
5529
|
+
get atAll(): boolean;
|
|
5530
|
+
get image(): string[];
|
|
5531
|
+
get record(): string;
|
|
5532
|
+
get replyId(): string;
|
|
6137
5533
|
/**
|
|
6138
|
-
*
|
|
6139
|
-
* @
|
|
6140
|
-
* @param fileId 文件id
|
|
6141
|
-
* @param busId 文件类型ID
|
|
6142
|
-
* @returns 无返回值
|
|
5534
|
+
* @description 引用回复的消息id
|
|
5535
|
+
* @deprecated 即将废弃 请使用 `replyId`
|
|
6143
5536
|
*/
|
|
6144
|
-
|
|
5537
|
+
get reply_id(): string;
|
|
5538
|
+
}
|
|
5539
|
+
/**
|
|
5540
|
+
* @description 好友消息事件类
|
|
5541
|
+
* @class FriendMessage
|
|
5542
|
+
*/
|
|
5543
|
+
declare class FriendMessage extends MessageBase {
|
|
5544
|
+
#private;
|
|
5545
|
+
constructor(options: FriendMessageOptions);
|
|
5546
|
+
get contact(): FriendContact;
|
|
5547
|
+
get sender(): SenderBase;
|
|
5548
|
+
get subEvent(): "friend";
|
|
5549
|
+
get isPrivate(): true;
|
|
5550
|
+
get isFriend(): true;
|
|
5551
|
+
get isGroup(): false;
|
|
5552
|
+
get isGuild(): false;
|
|
5553
|
+
get isDirect(): false;
|
|
5554
|
+
get isGroupTemp(): false;
|
|
5555
|
+
}
|
|
5556
|
+
/**
|
|
5557
|
+
* @description 群消息事件类
|
|
5558
|
+
* @class GroupMessage
|
|
5559
|
+
*/
|
|
5560
|
+
declare class GroupMessage extends MessageBase {
|
|
5561
|
+
#private;
|
|
5562
|
+
constructor(options: GroupMessageOptions);
|
|
6145
5563
|
/**
|
|
6146
|
-
*
|
|
6147
|
-
* @
|
|
6148
|
-
* @returns 返回文件数量、文件数量上限、已使用空间和空间上限
|
|
5564
|
+
* @description 群ID
|
|
5565
|
+
* @deprecated 即将废弃 请使用 `groupId`
|
|
6149
5566
|
*/
|
|
6150
|
-
|
|
5567
|
+
get group_id(): string;
|
|
6151
5568
|
/**
|
|
6152
|
-
*
|
|
6153
|
-
* @param groupId 群号
|
|
6154
|
-
* @param folderId 文件夹id,空则为根目录
|
|
6155
|
-
* @returns 返回文件和文件夹的列表
|
|
5569
|
+
* @description 群ID
|
|
6156
5570
|
*/
|
|
6157
|
-
|
|
5571
|
+
get groupId(): string;
|
|
5572
|
+
get contact(): GroupContact;
|
|
5573
|
+
get sender(): GroupSender;
|
|
5574
|
+
get subEvent(): "group";
|
|
5575
|
+
get isPrivate(): false;
|
|
5576
|
+
get isFriend(): false;
|
|
5577
|
+
get isGroup(): true;
|
|
5578
|
+
get isGuild(): false;
|
|
5579
|
+
get isDirect(): false;
|
|
5580
|
+
get isGroupTemp(): false;
|
|
5581
|
+
}
|
|
5582
|
+
/**
|
|
5583
|
+
* @description 频道私信消息事件类
|
|
5584
|
+
* @class DirectMessage
|
|
5585
|
+
*/
|
|
5586
|
+
declare class DirectMessage extends MessageBase {
|
|
5587
|
+
#private;
|
|
5588
|
+
constructor(options: DirectMessageOptions);
|
|
5589
|
+
/** 来源频道id */
|
|
5590
|
+
get srcGuildId(): string;
|
|
5591
|
+
get contact(): DirectContact;
|
|
5592
|
+
get sender(): SenderBase;
|
|
5593
|
+
get subEvent(): "direct";
|
|
5594
|
+
get isPrivate(): true;
|
|
5595
|
+
get isFriend(): false;
|
|
5596
|
+
get isGroup(): false;
|
|
5597
|
+
get isGuild(): false;
|
|
5598
|
+
get isDirect(): true;
|
|
5599
|
+
get isGroupTemp(): false;
|
|
5600
|
+
}
|
|
5601
|
+
/**
|
|
5602
|
+
* @description 频道消息事件类
|
|
5603
|
+
* @class GuildMessage
|
|
5604
|
+
*/
|
|
5605
|
+
declare class GuildMessage extends MessageBase {
|
|
5606
|
+
#private;
|
|
5607
|
+
constructor(options: GuildMessageOptions);
|
|
6158
5608
|
/**
|
|
6159
|
-
*
|
|
6160
|
-
* @
|
|
6161
|
-
* @param remark 新的备注
|
|
6162
|
-
* @returns 此接口的返回值不值得信任
|
|
5609
|
+
* @description 频道ID
|
|
5610
|
+
* @deprecated 即将废弃 请使用 `guildId`
|
|
6163
5611
|
*/
|
|
6164
|
-
|
|
5612
|
+
get guild_id(): string;
|
|
6165
5613
|
/**
|
|
6166
|
-
*
|
|
6167
|
-
* @
|
|
5614
|
+
* @description 子频道ID
|
|
5615
|
+
* @deprecated 即将废弃 请使用 `channelId`
|
|
6168
5616
|
*/
|
|
6169
|
-
|
|
5617
|
+
get channel_id(): string;
|
|
6170
5618
|
/**
|
|
6171
|
-
*
|
|
6172
|
-
* @param groupId 群号
|
|
6173
|
-
* @returns 返回是否允许at全体成员和全群剩余次数、个人剩余次数
|
|
5619
|
+
* @description 频道ID
|
|
6174
5620
|
*/
|
|
6175
|
-
|
|
5621
|
+
get guildId(): string;
|
|
6176
5622
|
/**
|
|
6177
|
-
*
|
|
6178
|
-
* @param groupId
|
|
6179
|
-
* @returns 返回禁言用户列表
|
|
5623
|
+
* @description 子频道ID
|
|
6180
5624
|
*/
|
|
6181
|
-
|
|
5625
|
+
get channelId(): string;
|
|
5626
|
+
get contact(): GuildContact;
|
|
5627
|
+
get sender(): GuildSender;
|
|
5628
|
+
get subEvent(): "guild";
|
|
5629
|
+
get isPrivate(): false;
|
|
5630
|
+
get isFriend(): false;
|
|
5631
|
+
get isGroup(): false;
|
|
5632
|
+
get isGuild(): true;
|
|
5633
|
+
get isDirect(): false;
|
|
5634
|
+
get isGroupTemp(): false;
|
|
5635
|
+
}
|
|
5636
|
+
/**
|
|
5637
|
+
* @description 群临时会话消息事件类
|
|
5638
|
+
* @class GroupTempMessage
|
|
5639
|
+
*/
|
|
5640
|
+
declare class GroupTempMessage extends MessageBase {
|
|
5641
|
+
#private;
|
|
5642
|
+
constructor(options: GroupTempMessageOptions);
|
|
6182
5643
|
/**
|
|
6183
|
-
*
|
|
6184
|
-
* @
|
|
6185
|
-
* @param count 戳一戳次数 默认为1
|
|
6186
|
-
* @returns 此接口的返回值不值得信任
|
|
5644
|
+
* @description 群ID
|
|
5645
|
+
* @deprecated 即将废弃 请使用 `groupId`
|
|
6187
5646
|
*/
|
|
6188
|
-
|
|
5647
|
+
get group_id(): string;
|
|
6189
5648
|
/**
|
|
6190
|
-
*
|
|
6191
|
-
* @param domain The domain to get cookies from
|
|
5649
|
+
* @description 群ID
|
|
6192
5650
|
*/
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
5651
|
+
get groupId(): string;
|
|
5652
|
+
get contact(): GroupTempContact;
|
|
5653
|
+
get sender(): SenderBase;
|
|
5654
|
+
get subEvent(): "groupTemp";
|
|
5655
|
+
get isPrivate(): false;
|
|
5656
|
+
get isFriend(): false;
|
|
5657
|
+
get isGroup(): false;
|
|
5658
|
+
get isGuild(): false;
|
|
5659
|
+
get isDirect(): false;
|
|
5660
|
+
get isGroupTemp(): true;
|
|
5661
|
+
}
|
|
5662
|
+
|
|
5663
|
+
/**
|
|
5664
|
+
* @description 通知事件基类
|
|
5665
|
+
* @class NoticeBase
|
|
5666
|
+
*/
|
|
5667
|
+
declare abstract class NoticeBase extends BaseEvent<'notice'> {
|
|
5668
|
+
#private;
|
|
5669
|
+
/** 通知内容str */
|
|
5670
|
+
tips: string;
|
|
5671
|
+
/** 事件内容 */
|
|
5672
|
+
content: unknown;
|
|
5673
|
+
constructor({ subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, }: NoticeOptions);
|
|
5674
|
+
get event(): "notice";
|
|
5675
|
+
get subEvent(): NoticeEventSub;
|
|
5676
|
+
}
|
|
5677
|
+
/**
|
|
5678
|
+
* @description 收到点赞事件
|
|
5679
|
+
* @class ReceiveLikeNotice
|
|
5680
|
+
*/
|
|
5681
|
+
declare class ReceiveLikeNotice extends NoticeBase {
|
|
5682
|
+
#private;
|
|
5683
|
+
content: ReceiveLikeOptions['content'];
|
|
5684
|
+
constructor(options: ReceiveLikeOptions);
|
|
5685
|
+
get subEvent(): "receiveLike";
|
|
5686
|
+
get contact(): FriendContact;
|
|
5687
|
+
get sender(): Sender & SenderBase;
|
|
5688
|
+
get isPrivate(): true;
|
|
5689
|
+
get isFriend(): true;
|
|
5690
|
+
get isGroup(): false;
|
|
5691
|
+
get isGuild(): false;
|
|
5692
|
+
get isDirect(): false;
|
|
5693
|
+
get isGroupTemp(): false;
|
|
5694
|
+
}
|
|
5695
|
+
/**
|
|
5696
|
+
* @description 好友增加事件
|
|
5697
|
+
* @class FriendIncreaseNotice
|
|
5698
|
+
*/
|
|
5699
|
+
declare class FriendIncreaseNotice extends NoticeBase {
|
|
5700
|
+
#private;
|
|
5701
|
+
content: FriendIncreaseOptions['content'];
|
|
5702
|
+
constructor(options: FriendIncreaseOptions);
|
|
5703
|
+
get subEvent(): "friendIncrease";
|
|
5704
|
+
get contact(): FriendContact;
|
|
5705
|
+
get sender(): Sender & SenderBase;
|
|
5706
|
+
get isPrivate(): true;
|
|
5707
|
+
get isFriend(): true;
|
|
5708
|
+
get isGroup(): false;
|
|
5709
|
+
get isGuild(): false;
|
|
5710
|
+
get isDirect(): false;
|
|
5711
|
+
get isGroupTemp(): false;
|
|
5712
|
+
}
|
|
5713
|
+
/**
|
|
5714
|
+
* @description 好友减少事件
|
|
5715
|
+
* @class FriendDecreaseNotice
|
|
5716
|
+
*/
|
|
5717
|
+
declare class FriendDecreaseNotice extends NoticeBase {
|
|
5718
|
+
#private;
|
|
5719
|
+
content: FriendDecreaseOptions['content'];
|
|
5720
|
+
constructor(options: FriendDecreaseOptions);
|
|
5721
|
+
get subEvent(): "friendDecrease";
|
|
5722
|
+
get contact(): FriendContact;
|
|
5723
|
+
get sender(): Sender & SenderBase;
|
|
5724
|
+
get isPrivate(): true;
|
|
5725
|
+
get isFriend(): true;
|
|
5726
|
+
get isGroup(): false;
|
|
5727
|
+
get isGuild(): false;
|
|
5728
|
+
get isDirect(): false;
|
|
5729
|
+
get isGroupTemp(): false;
|
|
5730
|
+
}
|
|
5731
|
+
/**
|
|
5732
|
+
* @description 收到私聊戳一戳事件
|
|
5733
|
+
* @class PrivatePokeNotice
|
|
5734
|
+
*/
|
|
5735
|
+
declare class PrivatePokeNotice extends NoticeBase {
|
|
5736
|
+
#private;
|
|
5737
|
+
content: PrivatePokeOptions['content'];
|
|
5738
|
+
constructor(options: PrivatePokeOptions);
|
|
5739
|
+
get subEvent(): "friendPoke";
|
|
5740
|
+
get contact(): FriendContact;
|
|
5741
|
+
get sender(): Sender & SenderBase;
|
|
5742
|
+
get isPrivate(): true;
|
|
5743
|
+
get isFriend(): true;
|
|
5744
|
+
get isGroup(): false;
|
|
5745
|
+
get isGuild(): false;
|
|
5746
|
+
get isDirect(): false;
|
|
5747
|
+
get isGroupTemp(): false;
|
|
5748
|
+
}
|
|
5749
|
+
/**
|
|
5750
|
+
* @description 收到私聊撤回事件
|
|
5751
|
+
* @class PrivateRecallNotice
|
|
5752
|
+
*/
|
|
5753
|
+
declare class PrivateRecallNotice extends NoticeBase {
|
|
5754
|
+
#private;
|
|
5755
|
+
content: PrivateRecallOptions['content'];
|
|
5756
|
+
constructor(options: PrivateRecallOptions);
|
|
5757
|
+
get subEvent(): "friendRecall";
|
|
5758
|
+
get contact(): FriendContact;
|
|
5759
|
+
get sender(): Sender & SenderBase;
|
|
5760
|
+
get isPrivate(): true;
|
|
5761
|
+
get isFriend(): true;
|
|
5762
|
+
get isGroup(): false;
|
|
5763
|
+
get isGuild(): false;
|
|
5764
|
+
get isDirect(): false;
|
|
5765
|
+
get isGroupTemp(): false;
|
|
5766
|
+
}
|
|
5767
|
+
/**
|
|
5768
|
+
* @description 收到私聊文件上传事件
|
|
5769
|
+
* @class PrivateFileUploadedNotice
|
|
5770
|
+
*/
|
|
5771
|
+
declare class PrivateFileUploadedNotice extends NoticeBase {
|
|
5772
|
+
#private;
|
|
5773
|
+
content: PrivateFileUploadedOptions['content'];
|
|
5774
|
+
constructor(options: PrivateFileUploadedOptions);
|
|
5775
|
+
get subEvent(): "friendFileUploaded";
|
|
5776
|
+
get contact(): FriendContact;
|
|
5777
|
+
get sender(): Sender & SenderBase;
|
|
5778
|
+
get isPrivate(): true;
|
|
5779
|
+
get isFriend(): true;
|
|
5780
|
+
get isGroup(): false;
|
|
5781
|
+
get isGuild(): false;
|
|
5782
|
+
get isDirect(): false;
|
|
5783
|
+
get isGroupTemp(): false;
|
|
5784
|
+
}
|
|
5785
|
+
declare class GroupNotice extends NoticeBase {
|
|
6196
5786
|
/**
|
|
6197
|
-
*
|
|
6198
|
-
* @param domain The domain to get credentials from
|
|
5787
|
+
* @deprecated 已经弃用 请使用`groupId`
|
|
6199
5788
|
*/
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
5789
|
+
get group_id(): string;
|
|
5790
|
+
get groupId(): string;
|
|
5791
|
+
}
|
|
5792
|
+
/**
|
|
5793
|
+
* @description 收到群聊戳一戳事件
|
|
5794
|
+
* @class GroupPokeNotice
|
|
5795
|
+
*/
|
|
5796
|
+
declare class GroupPokeNotice extends GroupNotice {
|
|
5797
|
+
#private;
|
|
5798
|
+
content: GroupPokeOptions['content'];
|
|
5799
|
+
constructor(options: GroupPokeOptions);
|
|
5800
|
+
get subEvent(): "groupPoke";
|
|
5801
|
+
get contact(): GroupContact;
|
|
5802
|
+
get sender(): Sender & GroupSender;
|
|
5803
|
+
get isPrivate(): false;
|
|
5804
|
+
get isFriend(): false;
|
|
5805
|
+
get isGroup(): true;
|
|
5806
|
+
get isGuild(): false;
|
|
5807
|
+
get isDirect(): false;
|
|
5808
|
+
get isGroupTemp(): false;
|
|
5809
|
+
}
|
|
5810
|
+
/**
|
|
5811
|
+
* @description 收到群聊撤回事件
|
|
5812
|
+
* @class GroupRecallNotice
|
|
5813
|
+
*/
|
|
5814
|
+
declare class GroupRecallNotice extends GroupNotice {
|
|
5815
|
+
#private;
|
|
5816
|
+
content: GroupRecallOptions['content'];
|
|
5817
|
+
constructor(options: GroupRecallOptions);
|
|
5818
|
+
get subEvent(): "groupRecall";
|
|
5819
|
+
get contact(): GroupContact;
|
|
5820
|
+
get sender(): Sender & GroupSender;
|
|
5821
|
+
get isPrivate(): false;
|
|
5822
|
+
get isFriend(): false;
|
|
5823
|
+
get isGroup(): true;
|
|
5824
|
+
get isGuild(): false;
|
|
5825
|
+
get isDirect(): false;
|
|
5826
|
+
get isGroupTemp(): false;
|
|
5827
|
+
}
|
|
5828
|
+
/**
|
|
5829
|
+
* @description 收到群聊文件上传事件
|
|
5830
|
+
* @class GroupFileUploadedNotice
|
|
5831
|
+
*/
|
|
5832
|
+
declare class GroupFileUploadedNotice extends GroupNotice {
|
|
5833
|
+
#private;
|
|
5834
|
+
content: GroupFileUploadedOptions['content'];
|
|
5835
|
+
constructor(options: GroupFileUploadedOptions);
|
|
5836
|
+
get subEvent(): "groupFileUploaded";
|
|
5837
|
+
get contact(): GroupContact;
|
|
5838
|
+
get sender(): Sender & GroupSender;
|
|
5839
|
+
get isPrivate(): false;
|
|
5840
|
+
get isFriend(): false;
|
|
5841
|
+
get isGroup(): true;
|
|
5842
|
+
get isGuild(): false;
|
|
5843
|
+
get isDirect(): false;
|
|
5844
|
+
get isGroupTemp(): false;
|
|
5845
|
+
}
|
|
5846
|
+
/**
|
|
5847
|
+
* @description 群名片变动事件
|
|
5848
|
+
* @class GroupCardChangedNotice
|
|
5849
|
+
*/
|
|
5850
|
+
declare class GroupCardChangedNotice extends GroupNotice {
|
|
5851
|
+
#private;
|
|
5852
|
+
content: GroupCardChangedOptions['content'];
|
|
5853
|
+
constructor(options: GroupCardChangedOptions);
|
|
5854
|
+
get subEvent(): "groupCardChanged";
|
|
5855
|
+
get contact(): GroupContact;
|
|
5856
|
+
get sender(): Sender & GroupSender;
|
|
5857
|
+
get isPrivate(): false;
|
|
5858
|
+
get isFriend(): false;
|
|
5859
|
+
get isGroup(): true;
|
|
5860
|
+
get isGuild(): false;
|
|
5861
|
+
get isDirect(): false;
|
|
5862
|
+
get isGroupTemp(): false;
|
|
5863
|
+
}
|
|
5864
|
+
/**
|
|
5865
|
+
* @description 群成员头衔变动事件
|
|
5866
|
+
* @class GroupMemberTitleUpdatedNotice
|
|
5867
|
+
*/
|
|
5868
|
+
declare class GroupMemberTitleUpdatedNotice extends GroupNotice {
|
|
5869
|
+
#private;
|
|
5870
|
+
content: GroupMemberUniqueTitleChangedOptions['content'];
|
|
5871
|
+
constructor(options: GroupMemberUniqueTitleChangedOptions);
|
|
5872
|
+
get subEvent(): "groupMemberTitleUpdate";
|
|
5873
|
+
get contact(): GroupContact;
|
|
5874
|
+
get sender(): Sender & GroupSender;
|
|
5875
|
+
get isPrivate(): false;
|
|
5876
|
+
get isFriend(): false;
|
|
5877
|
+
get isGroup(): true;
|
|
5878
|
+
get isGuild(): false;
|
|
5879
|
+
get isDirect(): false;
|
|
5880
|
+
get isGroupTemp(): false;
|
|
5881
|
+
}
|
|
5882
|
+
/**
|
|
5883
|
+
* @description 群精华消息变动事件
|
|
5884
|
+
* @class GroupHlightsChangedNotice
|
|
5885
|
+
*/
|
|
5886
|
+
declare class GroupHlightsChangedNotice extends GroupNotice {
|
|
5887
|
+
#private;
|
|
5888
|
+
content: GroupHlightsChangedOptions['content'];
|
|
5889
|
+
constructor(options: GroupHlightsChangedOptions);
|
|
5890
|
+
get subEvent(): "groupHighlightsChange";
|
|
5891
|
+
get contact(): GroupContact;
|
|
5892
|
+
get sender(): Sender & GroupSender;
|
|
5893
|
+
get isPrivate(): false;
|
|
5894
|
+
get isFriend(): false;
|
|
5895
|
+
get isGroup(): true;
|
|
5896
|
+
get isGuild(): false;
|
|
5897
|
+
get isDirect(): false;
|
|
5898
|
+
get isGroupTemp(): false;
|
|
5899
|
+
}
|
|
5900
|
+
/**
|
|
5901
|
+
* @description 群成员增加事件
|
|
5902
|
+
* @class GroupMemberIncreaseNotice
|
|
5903
|
+
*/
|
|
5904
|
+
declare class GroupMemberIncreaseNotice extends GroupNotice {
|
|
5905
|
+
#private;
|
|
5906
|
+
content: GroupMemberIncreaseOptions['content'];
|
|
5907
|
+
constructor(options: GroupMemberIncreaseOptions);
|
|
5908
|
+
get subEvent(): "groupMemberAdd";
|
|
5909
|
+
get contact(): GroupContact;
|
|
5910
|
+
get sender(): Sender & GroupSender;
|
|
5911
|
+
get isPrivate(): false;
|
|
5912
|
+
get isFriend(): false;
|
|
5913
|
+
get isGroup(): true;
|
|
5914
|
+
get isGuild(): false;
|
|
5915
|
+
get isDirect(): false;
|
|
5916
|
+
get isGroupTemp(): false;
|
|
5917
|
+
}
|
|
5918
|
+
/**
|
|
5919
|
+
* @description 群成员减少事件
|
|
5920
|
+
* @class GroupMemberDecreaseNotice
|
|
5921
|
+
*/
|
|
5922
|
+
declare class GroupMemberDecreaseNotice extends GroupNotice {
|
|
5923
|
+
#private;
|
|
5924
|
+
content: GroupMemberDecreaseOptions['content'];
|
|
5925
|
+
constructor(options: GroupMemberDecreaseOptions);
|
|
5926
|
+
get subEvent(): "groupMemberRemove";
|
|
5927
|
+
get contact(): GroupContact;
|
|
5928
|
+
get sender(): Sender & GroupSender;
|
|
5929
|
+
get isPrivate(): false;
|
|
5930
|
+
get isFriend(): false;
|
|
5931
|
+
get isGroup(): true;
|
|
5932
|
+
get isGuild(): false;
|
|
5933
|
+
get isDirect(): false;
|
|
5934
|
+
get isGroupTemp(): false;
|
|
5935
|
+
}
|
|
5936
|
+
/**
|
|
5937
|
+
* @description 群管理员变动事件
|
|
5938
|
+
* @class GroupAdminChangedNotice
|
|
5939
|
+
*/
|
|
5940
|
+
declare class GroupAdminChangedNotice extends GroupNotice {
|
|
5941
|
+
#private;
|
|
5942
|
+
content: GroupAdminChangedOptions['content'];
|
|
5943
|
+
constructor(options: GroupAdminChangedOptions);
|
|
5944
|
+
get subEvent(): "groupAdminChanged";
|
|
5945
|
+
get contact(): GroupContact;
|
|
5946
|
+
get sender(): Sender & GroupSender;
|
|
5947
|
+
get isPrivate(): false;
|
|
5948
|
+
get isFriend(): false;
|
|
5949
|
+
get isGroup(): true;
|
|
5950
|
+
get isGuild(): false;
|
|
5951
|
+
get isDirect(): false;
|
|
5952
|
+
get isGroupTemp(): false;
|
|
5953
|
+
}
|
|
5954
|
+
/**
|
|
5955
|
+
* @description 群打卡事件
|
|
5956
|
+
* @class GroupSignInNotice
|
|
5957
|
+
*/
|
|
5958
|
+
declare class GroupSignInNotice extends GroupNotice {
|
|
5959
|
+
#private;
|
|
5960
|
+
content: GroupSignInOptions['content'];
|
|
5961
|
+
constructor(options: GroupSignInOptions);
|
|
5962
|
+
get subEvent(): "groupSignIn";
|
|
5963
|
+
get contact(): GroupContact;
|
|
5964
|
+
get sender(): Sender & GroupSender;
|
|
5965
|
+
get isPrivate(): false;
|
|
5966
|
+
get isFriend(): false;
|
|
5967
|
+
get isGroup(): true;
|
|
5968
|
+
get isGuild(): false;
|
|
5969
|
+
get isDirect(): false;
|
|
5970
|
+
get isGroupTemp(): false;
|
|
5971
|
+
}
|
|
5972
|
+
/**
|
|
5973
|
+
* @description 群成员被禁言事件
|
|
5974
|
+
* @class GroupMemberBanNotice
|
|
5975
|
+
*/
|
|
5976
|
+
declare class GroupMemberBanNotice extends GroupNotice {
|
|
5977
|
+
#private;
|
|
5978
|
+
content: GroupMemberBanOptions['content'];
|
|
5979
|
+
constructor(options: GroupMemberBanOptions);
|
|
5980
|
+
get subEvent(): "groupMemberBan";
|
|
5981
|
+
get contact(): GroupContact;
|
|
5982
|
+
get sender(): Sender & GroupSender;
|
|
5983
|
+
get isPrivate(): false;
|
|
5984
|
+
get isFriend(): false;
|
|
5985
|
+
get isGroup(): true;
|
|
5986
|
+
get isGuild(): false;
|
|
5987
|
+
get isDirect(): false;
|
|
5988
|
+
get isGroupTemp(): false;
|
|
5989
|
+
}
|
|
5990
|
+
/**
|
|
5991
|
+
* @description 群全员禁言事件
|
|
5992
|
+
* @class GroupWholeBanNotice
|
|
5993
|
+
*/
|
|
5994
|
+
declare class GroupWholeBanNotice extends GroupNotice {
|
|
5995
|
+
#private;
|
|
5996
|
+
content: GroupWholeBanOptions['content'];
|
|
5997
|
+
constructor(options: GroupWholeBanOptions);
|
|
5998
|
+
get subEvent(): "groupWholeBan";
|
|
5999
|
+
get contact(): GroupContact;
|
|
6000
|
+
get sender(): Sender & GroupSender;
|
|
6001
|
+
get isPrivate(): false;
|
|
6002
|
+
get isFriend(): false;
|
|
6003
|
+
get isGroup(): true;
|
|
6004
|
+
get isGuild(): false;
|
|
6005
|
+
get isDirect(): false;
|
|
6006
|
+
get isGroupTemp(): false;
|
|
6007
|
+
}
|
|
6008
|
+
/**
|
|
6009
|
+
* @description 群表情动态事件
|
|
6010
|
+
* @class GroupMessageReactionNotice
|
|
6011
|
+
*/
|
|
6012
|
+
declare class GroupMessageReactionNotice extends GroupNotice {
|
|
6013
|
+
#private;
|
|
6014
|
+
content: GroupMessageReactionOptions['content'];
|
|
6015
|
+
constructor(options: GroupMessageReactionOptions);
|
|
6016
|
+
get subEvent(): "groupMessageReaction";
|
|
6017
|
+
get contact(): GroupContact;
|
|
6018
|
+
get sender(): Sender & GroupSender;
|
|
6019
|
+
get isPrivate(): false;
|
|
6020
|
+
get isFriend(): false;
|
|
6021
|
+
get isGroup(): true;
|
|
6022
|
+
get isGuild(): false;
|
|
6023
|
+
get isDirect(): false;
|
|
6024
|
+
get isGroupTemp(): false;
|
|
6025
|
+
}
|
|
6026
|
+
/**
|
|
6027
|
+
* @description 群聊运气王事件
|
|
6028
|
+
* @class GroupLuckKingNotice
|
|
6029
|
+
*/
|
|
6030
|
+
declare class GroupLuckKingNotice extends GroupNotice {
|
|
6031
|
+
#private;
|
|
6032
|
+
content: GroupLuckKingOptions['content'];
|
|
6033
|
+
constructor(options: GroupLuckKingOptions);
|
|
6034
|
+
get subEvent(): "groupLuckyKing";
|
|
6035
|
+
get contact(): GroupContact;
|
|
6036
|
+
get sender(): Sender & GroupSender;
|
|
6037
|
+
get isPrivate(): false;
|
|
6038
|
+
get isFriend(): false;
|
|
6039
|
+
get isGroup(): true;
|
|
6040
|
+
get isGuild(): false;
|
|
6041
|
+
get isDirect(): false;
|
|
6042
|
+
get isGroupTemp(): false;
|
|
6043
|
+
}
|
|
6044
|
+
/**
|
|
6045
|
+
* @description 群聊荣誉变更事件
|
|
6046
|
+
* @class GroupHonorChangedNotice
|
|
6047
|
+
*/
|
|
6048
|
+
declare class GroupHonorChangedNotice extends GroupNotice {
|
|
6049
|
+
#private;
|
|
6050
|
+
content: GroupHonorChangedOptions['content'];
|
|
6051
|
+
constructor(options: GroupHonorChangedOptions);
|
|
6052
|
+
get subEvent(): "groupHonorChange";
|
|
6053
|
+
get contact(): GroupContact;
|
|
6054
|
+
get sender(): Sender & GroupSender;
|
|
6055
|
+
get isPrivate(): false;
|
|
6056
|
+
get isFriend(): false;
|
|
6057
|
+
get isGroup(): true;
|
|
6058
|
+
get isGuild(): false;
|
|
6059
|
+
get isDirect(): false;
|
|
6060
|
+
get isGroupTemp(): false;
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6063
|
+
/**
|
|
6064
|
+
* @description 请求事件基类
|
|
6065
|
+
* @class RequestBase
|
|
6066
|
+
*/
|
|
6067
|
+
declare abstract class RequestBase extends BaseEvent<'request'> {
|
|
6068
|
+
#private;
|
|
6069
|
+
/** 通知内容str */
|
|
6070
|
+
tips: string;
|
|
6071
|
+
/** 事件内容 */
|
|
6072
|
+
content: unknown;
|
|
6073
|
+
constructor({ subEvent, eventId, rawEvent, time, contact, sender, srcReply, bot, }: RequestOptions);
|
|
6074
|
+
get event(): "request";
|
|
6075
|
+
get subEvent(): RequestEventSub;
|
|
6076
|
+
}
|
|
6077
|
+
/**
|
|
6078
|
+
* @description 创建好友申请请求事件
|
|
6079
|
+
* @class ReceiveLikeNotice
|
|
6080
|
+
*/
|
|
6081
|
+
declare class PrivateApplyRequest extends RequestBase {
|
|
6082
|
+
#private;
|
|
6083
|
+
content: PrivateApplyRequestOptions['content'];
|
|
6084
|
+
constructor(options: PrivateApplyRequestOptions);
|
|
6085
|
+
get subEvent(): "friendApply";
|
|
6086
|
+
get contact(): FriendContact;
|
|
6087
|
+
get sender(): Sender & SenderBase;
|
|
6088
|
+
get isPrivate(): true;
|
|
6089
|
+
get isFriend(): true;
|
|
6090
|
+
get isGroup(): false;
|
|
6091
|
+
get isGuild(): false;
|
|
6092
|
+
get isDirect(): false;
|
|
6093
|
+
get isGroupTemp(): false;
|
|
6094
|
+
}
|
|
6095
|
+
/**
|
|
6096
|
+
* @description 创建入群请求事件
|
|
6097
|
+
* @class ReceiveLikeNotice
|
|
6098
|
+
*/
|
|
6099
|
+
declare class GroupApplyRequest extends RequestBase {
|
|
6100
|
+
#private;
|
|
6101
|
+
content: GroupApplyRequestOptions['content'];
|
|
6102
|
+
constructor(options: GroupApplyRequestOptions);
|
|
6204
6103
|
/**
|
|
6205
|
-
*
|
|
6206
|
-
* @param domain The domain to get the CSRF token from
|
|
6104
|
+
* @deprecated 已经弃用 请使用`groupId`
|
|
6207
6105
|
*/
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6106
|
+
get group_id(): string;
|
|
6107
|
+
get groupId(): string;
|
|
6108
|
+
get subEvent(): "groupApply";
|
|
6109
|
+
get contact(): GroupContact;
|
|
6110
|
+
get sender(): Sender & GroupSender;
|
|
6111
|
+
get isPrivate(): false;
|
|
6112
|
+
get isFriend(): false;
|
|
6113
|
+
get isGroup(): true;
|
|
6114
|
+
get isGuild(): false;
|
|
6115
|
+
get isDirect(): false;
|
|
6116
|
+
get isGroupTemp(): false;
|
|
6117
|
+
}
|
|
6118
|
+
/**
|
|
6119
|
+
* @description 创建邀请Bot入群请求事件
|
|
6120
|
+
* @class GroupInviteRequest
|
|
6121
|
+
*/
|
|
6122
|
+
declare class GroupInviteRequest extends RequestBase {
|
|
6123
|
+
#private;
|
|
6124
|
+
content: GroupInviteRequestOptions['content'];
|
|
6125
|
+
constructor(options: GroupInviteRequestOptions);
|
|
6211
6126
|
/**
|
|
6212
|
-
*
|
|
6213
|
-
* @param appid The appid
|
|
6214
|
-
* @param daid The daid
|
|
6215
|
-
* @param jumpUrl The jump url
|
|
6127
|
+
* @deprecated 已经弃用 请使用`groupId`
|
|
6216
6128
|
*/
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6129
|
+
get group_id(): string;
|
|
6130
|
+
get groupId(): string;
|
|
6131
|
+
get subEvent(): "groupInvite";
|
|
6132
|
+
get contact(): GroupContact;
|
|
6133
|
+
get sender(): Sender & GroupSender;
|
|
6134
|
+
get isPrivate(): false;
|
|
6135
|
+
get isFriend(): false;
|
|
6136
|
+
get isGroup(): true;
|
|
6137
|
+
get isGuild(): false;
|
|
6138
|
+
get isDirect(): false;
|
|
6139
|
+
get isGroupTemp(): false;
|
|
6220
6140
|
}
|
|
6221
|
-
|
|
6222
|
-
|
|
6141
|
+
|
|
6142
|
+
/** 消息事件对应的对象类型 */
|
|
6143
|
+
interface MessageEventMap {
|
|
6144
|
+
message: Message$2;
|
|
6145
|
+
'message.group': GroupMessage;
|
|
6146
|
+
'message.friend': FriendMessage;
|
|
6147
|
+
'message.guild': GuildMessage;
|
|
6148
|
+
'message.direct': DirectMessage;
|
|
6149
|
+
'message.groupTemp': GroupTempMessage;
|
|
6150
|
+
}
|
|
6151
|
+
/** 私聊通知事件对应的对象类型 */
|
|
6152
|
+
interface FriendNoticeEventMap {
|
|
6153
|
+
'notice.receiveLike': ReceiveLikeNotice;
|
|
6154
|
+
'notice.friendDecrease': FriendDecreaseNotice;
|
|
6155
|
+
'notice.friendIncrease': FriendIncreaseNotice;
|
|
6156
|
+
'notice.privatePoke': PrivatePokeNotice;
|
|
6157
|
+
'notice.privateRecall': PrivateRecallNotice;
|
|
6158
|
+
'notice.privateFileUploaded': PrivateFileUploadedNotice;
|
|
6159
|
+
}
|
|
6160
|
+
/** 群聊通知事件对应的对象类型 */
|
|
6161
|
+
interface GroupNoticeEventMap {
|
|
6162
|
+
'notice.groupPoke': GroupPokeNotice;
|
|
6163
|
+
'notice.groupRecall': GroupRecallNotice;
|
|
6164
|
+
'notice.groupFileUploaded': GroupFileUploadedNotice;
|
|
6165
|
+
'notice.groupCardChanged': GroupCardChangedNotice;
|
|
6166
|
+
'notice.groupMemberTitleUpdate': GroupMemberTitleUpdatedNotice;
|
|
6167
|
+
'notice.groupHighlightsChange': GroupHlightsChangedNotice;
|
|
6168
|
+
'notice.groupMemberAdd': GroupMemberIncreaseNotice;
|
|
6169
|
+
'notice.groupMemberRemove': GroupMemberDecreaseNotice;
|
|
6170
|
+
'notice.groupAdminChanged': GroupAdminChangedNotice;
|
|
6171
|
+
'notice.groupSignIn': GroupSignInNotice;
|
|
6172
|
+
'notice.groupMemberBan': GroupMemberBanNotice;
|
|
6173
|
+
'notice.groupWholeBan': GroupWholeBanNotice;
|
|
6174
|
+
'notice.groupMessageReaction': GroupMessageReactionNotice;
|
|
6175
|
+
'notice.groupLuckyKing': GroupLuckKingNotice;
|
|
6176
|
+
'notice.groupHonorChange': GroupHonorChangedNotice;
|
|
6177
|
+
}
|
|
6178
|
+
/** 通知事件对应的对象类型 */
|
|
6179
|
+
interface NoticeEventMap extends FriendNoticeEventMap, GroupNoticeEventMap {
|
|
6180
|
+
notice: Notice;
|
|
6181
|
+
}
|
|
6182
|
+
/** 好友请求事件对应的对象类型 */
|
|
6183
|
+
interface FriendRequestEventMap {
|
|
6184
|
+
'request.friendApply': PrivateApplyRequest;
|
|
6185
|
+
}
|
|
6186
|
+
/** 群聊请求事件对应的对象类型 */
|
|
6187
|
+
interface GroupRequestEventMap {
|
|
6188
|
+
'request.groupApply': GroupApplyRequest;
|
|
6189
|
+
'request.groupInvite': GroupInviteRequest;
|
|
6190
|
+
}
|
|
6191
|
+
/** 请求事件对应的对象类型 */
|
|
6192
|
+
interface RequestEventMap extends FriendRequestEventMap, GroupRequestEventMap {
|
|
6193
|
+
request: Request;
|
|
6194
|
+
}
|
|
6195
|
+
/**
|
|
6196
|
+
* @description 通知事件类型
|
|
6197
|
+
*/
|
|
6198
|
+
type Notice = ReceiveLikeNotice | FriendDecreaseNotice | FriendIncreaseNotice | PrivatePokeNotice | PrivateRecallNotice | PrivateFileUploadedNotice | GroupPokeNotice | GroupRecallNotice | GroupFileUploadedNotice | GroupCardChangedNotice | GroupMemberTitleUpdatedNotice | GroupHlightsChangedNotice | GroupMemberIncreaseNotice | GroupMemberDecreaseNotice | GroupAdminChangedNotice | GroupSignInNotice | GroupMemberBanNotice | GroupWholeBanNotice | GroupMessageReactionNotice | GroupLuckKingNotice | GroupHonorChangedNotice;
|
|
6199
|
+
/**
|
|
6200
|
+
* @description 消息事件类型
|
|
6201
|
+
*/
|
|
6202
|
+
type Message$2 = FriendMessage | GroupMessage | DirectMessage | GuildMessage | GroupTempMessage;
|
|
6203
|
+
/**
|
|
6204
|
+
* @description 请求事件类型
|
|
6205
|
+
*/
|
|
6206
|
+
type Request = PrivateApplyRequest | GroupApplyRequest | GroupInviteRequest;
|
|
6207
|
+
/**
|
|
6208
|
+
* @description 所有事件类型
|
|
6209
|
+
*/
|
|
6210
|
+
type Event = Message$2 | Notice | Request;
|
|
6211
|
+
|
|
6212
|
+
/**
|
|
6213
|
+
* 权限类型
|
|
6214
|
+
* - `all`: 所有人
|
|
6215
|
+
* - `master`: 所有者
|
|
6216
|
+
* - `admin`: 管理员
|
|
6217
|
+
* - `group.owner`: 群主
|
|
6218
|
+
* - `group.admin`: 群管理
|
|
6219
|
+
* - `guild.owner`: 频道主
|
|
6220
|
+
* - `guild.admin`: 频道管理
|
|
6221
|
+
*/
|
|
6222
|
+
type Permission = 'all' | 'master' | 'admin' | 'group.owner' | 'group.admin' | 'guild.owner' | 'guild.admin';
|
|
6223
6223
|
|
|
6224
6224
|
type GetBot = {
|
|
6225
6225
|
/**
|
|
@@ -9999,6 +9999,8 @@ interface ComponentProps {
|
|
|
9999
9999
|
description?: string;
|
|
10000
10000
|
/** 每个渲染的组件都包裹了一个div,这里可以自定义这个div的className */
|
|
10001
10001
|
className?: string;
|
|
10002
|
+
/** 组件本身的className */
|
|
10003
|
+
componentClassName?: string;
|
|
10002
10004
|
}
|
|
10003
10005
|
|
|
10004
10006
|
/**
|
|
@@ -10014,35 +10016,6 @@ interface DividerProps extends ComponentProps {
|
|
|
10014
10016
|
descPosition?: number;
|
|
10015
10017
|
}
|
|
10016
10018
|
|
|
10017
|
-
/**
|
|
10018
|
-
* 输入类型枚举
|
|
10019
|
-
*/
|
|
10020
|
-
declare enum InputDataType {
|
|
10021
|
-
/** 字符串 */
|
|
10022
|
-
STRING = "string",
|
|
10023
|
-
/** 数字 */
|
|
10024
|
-
NUMBER = "number",
|
|
10025
|
-
/** 布尔值 */
|
|
10026
|
-
BOOLEAN = "boolean",
|
|
10027
|
-
/** 日期 */
|
|
10028
|
-
DATE = "date",
|
|
10029
|
-
/** 时间 */
|
|
10030
|
-
TIME = "time",
|
|
10031
|
-
/** 日期时间 */
|
|
10032
|
-
DATETIME = "datetime",
|
|
10033
|
-
/** 邮箱 */
|
|
10034
|
-
EMAIL = "email",
|
|
10035
|
-
/** URL */
|
|
10036
|
-
URL = "url",
|
|
10037
|
-
/** 电话 */
|
|
10038
|
-
TEL = "tel",
|
|
10039
|
-
/** 密码 */
|
|
10040
|
-
PASSWORD = "password",
|
|
10041
|
-
/** 颜色 */
|
|
10042
|
-
COLOR = "color",
|
|
10043
|
-
/** JSON */
|
|
10044
|
-
JSON = "json"
|
|
10045
|
-
}
|
|
10046
10019
|
/**
|
|
10047
10020
|
* 验证规则接口
|
|
10048
10021
|
*/
|
|
@@ -10101,6 +10074,8 @@ interface InputProps extends ComponentProps {
|
|
|
10101
10074
|
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
10102
10075
|
/** 标签 */
|
|
10103
10076
|
label?: string;
|
|
10077
|
+
/** 值 */
|
|
10078
|
+
value?: string;
|
|
10104
10079
|
/** 默认值 */
|
|
10105
10080
|
defaultValue?: string;
|
|
10106
10081
|
/** 提示信息 */
|
|
@@ -10137,14 +10112,14 @@ interface InputProps extends ComponentProps {
|
|
|
10137
10112
|
isInvalid?: boolean;
|
|
10138
10113
|
/** 禁用动画 */
|
|
10139
10114
|
disableAnimation?: boolean;
|
|
10140
|
-
/** 类名 */
|
|
10141
|
-
classNames?: Partial<Record<'base' | 'label' | 'inputWrapper' | 'innerWrapper' | 'mainWrapper' | 'input' | 'clearButton' | 'helperWrapper' | 'description' | 'errorMessage', string>>;
|
|
10142
10115
|
/** 自定义字段 验证规则 */
|
|
10143
10116
|
rules?: ValidationRule[];
|
|
10144
10117
|
/** 自定义字段 输入框宽度 */
|
|
10145
10118
|
width?: string;
|
|
10146
10119
|
/** 自定义字段 输入框高度 */
|
|
10147
10120
|
height?: string;
|
|
10121
|
+
/** 自动补全 */
|
|
10122
|
+
autoComplete?: string;
|
|
10148
10123
|
}
|
|
10149
10124
|
/**
|
|
10150
10125
|
* 输入框组类型
|
|
@@ -10155,14 +10130,16 @@ interface InputGroupProps extends ComponentProps {
|
|
|
10155
10130
|
label?: string;
|
|
10156
10131
|
/** 输入框模板 */
|
|
10157
10132
|
template: InputProps;
|
|
10133
|
+
/** 数据 */
|
|
10134
|
+
data: string[];
|
|
10158
10135
|
/** 输入框一行最多显示多少个 默认3个 */
|
|
10159
10136
|
itemsPerRow?: number;
|
|
10160
10137
|
/** 输入框最大显示多少行 超出后滚动 默认3行 */
|
|
10161
10138
|
maxRows?: number;
|
|
10162
10139
|
/** 输入框最大输入框数量 默认100 0不限制 */
|
|
10163
10140
|
maxInputs?: number;
|
|
10164
|
-
/**
|
|
10165
|
-
|
|
10141
|
+
/** 删除输入框提示 默认: 删除成功 */
|
|
10142
|
+
deleteSuccessTips?: string;
|
|
10166
10143
|
}
|
|
10167
10144
|
|
|
10168
10145
|
/**
|
|
@@ -10194,6 +10171,8 @@ interface SwitchProps extends ComponentProps {
|
|
|
10194
10171
|
isDisabled?: boolean;
|
|
10195
10172
|
/** 是否禁用动画 */
|
|
10196
10173
|
disableAnimation?: boolean;
|
|
10174
|
+
/** 标签 */
|
|
10175
|
+
label?: string;
|
|
10197
10176
|
}
|
|
10198
10177
|
|
|
10199
10178
|
/**
|
|
@@ -10337,7 +10316,109 @@ interface Radio extends ComponentProps {
|
|
|
10337
10316
|
disableAnimation?: boolean;
|
|
10338
10317
|
}
|
|
10339
10318
|
|
|
10319
|
+
/**
|
|
10320
|
+
* 手风琴(折叠面板) 类型
|
|
10321
|
+
*/
|
|
10322
|
+
interface Accordion extends ComponentProps {
|
|
10323
|
+
/** 标签 */
|
|
10324
|
+
label?: string;
|
|
10325
|
+
/** 子组件 */
|
|
10326
|
+
children?: AccordionItemProps[];
|
|
10327
|
+
/** 标题 */
|
|
10328
|
+
title?: string;
|
|
10329
|
+
/**
|
|
10330
|
+
* 样式
|
|
10331
|
+
* - light: 浅色
|
|
10332
|
+
* - shadow: 阴影
|
|
10333
|
+
* - bordered: 边框
|
|
10334
|
+
* - splitted: 分割
|
|
10335
|
+
*/
|
|
10336
|
+
variant?: 'light' | 'shadow' | 'bordered' | 'splitted';
|
|
10337
|
+
/**
|
|
10338
|
+
* 选择模式
|
|
10339
|
+
* - none: 无
|
|
10340
|
+
* - single: 单选
|
|
10341
|
+
* - multiple: 多选
|
|
10342
|
+
*/
|
|
10343
|
+
selectionMode?: 'none' | 'single' | 'multiple';
|
|
10344
|
+
/**
|
|
10345
|
+
* 选择行为
|
|
10346
|
+
* - toggle: 切换
|
|
10347
|
+
* - replace: 替换
|
|
10348
|
+
*/
|
|
10349
|
+
selectionBehavior?: 'toggle' | 'replace';
|
|
10350
|
+
/** 是否所有 Accordion 项目都应缩小 */
|
|
10351
|
+
isCompact?: boolean;
|
|
10352
|
+
/** 是否禁用 */
|
|
10353
|
+
isDisabled?: boolean;
|
|
10354
|
+
/** 是否在每个手风琴项目的底部显示分隔线 */
|
|
10355
|
+
showDivider?: boolean;
|
|
10356
|
+
/** 是否隐藏指示器 */
|
|
10357
|
+
hideIndicator?: boolean;
|
|
10358
|
+
/** 是否禁用动画 */
|
|
10359
|
+
disableAnimation?: boolean;
|
|
10360
|
+
/** 是否禁用指示器动画 */
|
|
10361
|
+
disableIndicatorAnimation?: boolean;
|
|
10362
|
+
/** 是否不允许空选择 */
|
|
10363
|
+
disallowEmptySelection?: boolean;
|
|
10364
|
+
/** 是否保持内容挂载 */
|
|
10365
|
+
keepContentMounted?: boolean;
|
|
10366
|
+
/** 是否全宽 */
|
|
10367
|
+
fullWidth?: boolean;
|
|
10368
|
+
/** 禁用的键 */
|
|
10369
|
+
disabledKeys?: string[];
|
|
10370
|
+
/** 选中项 */
|
|
10371
|
+
selectedKeys?: string[];
|
|
10372
|
+
/** 默认选中项 */
|
|
10373
|
+
defaultSelectedKeys?: string[];
|
|
10374
|
+
}
|
|
10375
|
+
/**
|
|
10376
|
+
* 手风琴子组件类型 `也就是每一项手风琴`
|
|
10377
|
+
*/
|
|
10378
|
+
interface AccordionItemProps extends ComponentProps {
|
|
10379
|
+
componentType: 'accordion-item';
|
|
10380
|
+
/** 子组件 */
|
|
10381
|
+
children: Children[];
|
|
10382
|
+
/** 标题 */
|
|
10383
|
+
title?: string;
|
|
10384
|
+
/** 副标题 */
|
|
10385
|
+
subtitle?: string;
|
|
10386
|
+
/** 折叠项展开指示器,通常为箭头图标 */
|
|
10387
|
+
indicator?: boolean;
|
|
10388
|
+
/** 折叠项开始内容,通常是图标或头像 */
|
|
10389
|
+
/** 折叠项结束内容,通常是图标或头像 */
|
|
10390
|
+
/** 用于修改 framer 运动动画的 props。使用 variants API 创建您自己的动画 */
|
|
10391
|
+
/** 是否紧凑模式 */
|
|
10392
|
+
isCompact?: boolean;
|
|
10393
|
+
/** 是否禁用 */
|
|
10394
|
+
isDisabled?: boolean;
|
|
10395
|
+
/** 关闭时是否保持挂载 AccordionItem 内容 */
|
|
10396
|
+
keepContentMounted?: boolean;
|
|
10397
|
+
/** 是否隐藏 AccordionItem 指示器 */
|
|
10398
|
+
hideIndicator?: boolean;
|
|
10399
|
+
/** 是否禁用 AccordionItem 动画 */
|
|
10400
|
+
disableAnimation?: boolean;
|
|
10401
|
+
/** 是否禁用 AccordionItem 指示器动画 */
|
|
10402
|
+
disableIndicatorAnimation?: boolean;
|
|
10403
|
+
}
|
|
10404
|
+
/** 手风琴 */
|
|
10405
|
+
interface AccordionProps extends Accordion {
|
|
10406
|
+
componentType: 'accordion';
|
|
10407
|
+
}
|
|
10408
|
+
/**
|
|
10409
|
+
* 手风琴Pro
|
|
10410
|
+
*/
|
|
10411
|
+
interface AccordionProProps extends Omit<Accordion, 'children'> {
|
|
10412
|
+
componentType: 'accordion-pro';
|
|
10413
|
+
/** 渲染数据 */
|
|
10414
|
+
data: Record<string, any>[];
|
|
10415
|
+
/** 子组件 pro只有一个 因为是模板 */
|
|
10416
|
+
children: Omit<AccordionItemProps, 'componentType'>;
|
|
10417
|
+
}
|
|
10418
|
+
|
|
10340
10419
|
type Children = InputProps | SwitchProps | DividerProps | CheckboxProps | CheckboxGroupProps | RadioGroupProps | InputGroupProps;
|
|
10420
|
+
/** 组件配置类型 */
|
|
10421
|
+
type ComponentConfig = InputProps | SwitchProps | RadioGroupProps | CheckboxGroupProps | AccordionProps | AccordionProProps | AccordionItemProps | DividerProps | InputGroupProps;
|
|
10341
10422
|
|
|
10342
10423
|
type Option = {
|
|
10343
10424
|
label: string;
|
|
@@ -10475,106 +10556,6 @@ type AccordionProResult = AccordionResult;
|
|
|
10475
10556
|
*/
|
|
10476
10557
|
type SaveResult = InputResult | SwitchResult | RadioResult | CheckboxResult | AccordionResult | AccordionProResult;
|
|
10477
10558
|
|
|
10478
|
-
/**
|
|
10479
|
-
* 手风琴(折叠面板) 类型
|
|
10480
|
-
*/
|
|
10481
|
-
interface Accordion extends ComponentProps {
|
|
10482
|
-
/** 标签 */
|
|
10483
|
-
label?: string;
|
|
10484
|
-
/** 子组件 */
|
|
10485
|
-
children?: AccordionItemProps[];
|
|
10486
|
-
/** 标题 */
|
|
10487
|
-
title?: string;
|
|
10488
|
-
/**
|
|
10489
|
-
* 样式
|
|
10490
|
-
* - light: 浅色
|
|
10491
|
-
* - shadow: 阴影
|
|
10492
|
-
* - bordered: 边框
|
|
10493
|
-
* - splitted: 分割
|
|
10494
|
-
*/
|
|
10495
|
-
variant?: 'light' | 'shadow' | 'bordered' | 'splitted';
|
|
10496
|
-
/**
|
|
10497
|
-
* 选择模式
|
|
10498
|
-
* - none: 无
|
|
10499
|
-
* - single: 单选
|
|
10500
|
-
* - multiple: 多选
|
|
10501
|
-
*/
|
|
10502
|
-
selectionMode?: 'none' | 'single' | 'multiple';
|
|
10503
|
-
/**
|
|
10504
|
-
* 选择行为
|
|
10505
|
-
* - toggle: 切换
|
|
10506
|
-
* - replace: 替换
|
|
10507
|
-
*/
|
|
10508
|
-
selectionBehavior?: 'toggle' | 'replace';
|
|
10509
|
-
/** 是否所有 Accordion 项目都应缩小 */
|
|
10510
|
-
isCompact?: boolean;
|
|
10511
|
-
/** 是否禁用 */
|
|
10512
|
-
isDisabled?: boolean;
|
|
10513
|
-
/** 是否在每个手风琴项目的底部显示分隔线 */
|
|
10514
|
-
showDivider?: boolean;
|
|
10515
|
-
/** 是否隐藏指示器 */
|
|
10516
|
-
hideIndicator?: boolean;
|
|
10517
|
-
/** 是否禁用动画 */
|
|
10518
|
-
disableAnimation?: boolean;
|
|
10519
|
-
/** 是否禁用指示器动画 */
|
|
10520
|
-
disableIndicatorAnimation?: boolean;
|
|
10521
|
-
/** 是否不允许空选择 */
|
|
10522
|
-
disallowEmptySelection?: boolean;
|
|
10523
|
-
/** 是否保持内容挂载 */
|
|
10524
|
-
keepContentMounted?: boolean;
|
|
10525
|
-
/** 是否全宽 */
|
|
10526
|
-
fullWidth?: boolean;
|
|
10527
|
-
/** 禁用的键 */
|
|
10528
|
-
disabledKeys?: string[];
|
|
10529
|
-
/** 选中项 */
|
|
10530
|
-
selectedKeys?: string[];
|
|
10531
|
-
/** 默认选中项 */
|
|
10532
|
-
defaultSelectedKeys?: string[];
|
|
10533
|
-
}
|
|
10534
|
-
/**
|
|
10535
|
-
* 手风琴子组件类型 `也就是每一项手风琴`
|
|
10536
|
-
*/
|
|
10537
|
-
interface AccordionItemProps extends ComponentProps {
|
|
10538
|
-
componentType: 'accordion-item';
|
|
10539
|
-
/** 子组件 */
|
|
10540
|
-
children: Children[];
|
|
10541
|
-
/** 标题 */
|
|
10542
|
-
title?: string;
|
|
10543
|
-
/** 副标题 */
|
|
10544
|
-
subtitle?: string;
|
|
10545
|
-
/** 折叠项展开指示器,通常为箭头图标 */
|
|
10546
|
-
indicator?: boolean;
|
|
10547
|
-
/** 折叠项开始内容,通常是图标或头像 */
|
|
10548
|
-
/** 折叠项结束内容,通常是图标或头像 */
|
|
10549
|
-
/** 用于修改 framer 运动动画的 props。使用 variants API 创建您自己的动画 */
|
|
10550
|
-
/** 是否紧凑模式 */
|
|
10551
|
-
isCompact?: boolean;
|
|
10552
|
-
/** 是否禁用 */
|
|
10553
|
-
isDisabled?: boolean;
|
|
10554
|
-
/** 关闭时是否保持挂载 AccordionItem 内容 */
|
|
10555
|
-
keepContentMounted?: boolean;
|
|
10556
|
-
/** 是否隐藏 AccordionItem 指示器 */
|
|
10557
|
-
hideIndicator?: boolean;
|
|
10558
|
-
/** 是否禁用 AccordionItem 动画 */
|
|
10559
|
-
disableAnimation?: boolean;
|
|
10560
|
-
/** 是否禁用 AccordionItem 指示器动画 */
|
|
10561
|
-
disableIndicatorAnimation?: boolean;
|
|
10562
|
-
}
|
|
10563
|
-
/** 手风琴 */
|
|
10564
|
-
interface AccordionProps extends Accordion {
|
|
10565
|
-
componentType: 'accordion';
|
|
10566
|
-
}
|
|
10567
|
-
/**
|
|
10568
|
-
* 手风琴Pro
|
|
10569
|
-
*/
|
|
10570
|
-
interface AccordionProProps extends Omit<Accordion, 'children'> {
|
|
10571
|
-
componentType: 'accordion-pro';
|
|
10572
|
-
/** 渲染数据 */
|
|
10573
|
-
data: Record<string, any>[];
|
|
10574
|
-
/** 子组件 pro只有一个 因为是模板 */
|
|
10575
|
-
children?: Omit<AccordionItemProps, 'componentType'>;
|
|
10576
|
-
}
|
|
10577
|
-
|
|
10578
10559
|
/**
|
|
10579
10560
|
* 手风琴组件
|
|
10580
10561
|
*/
|
|
@@ -10895,6 +10876,31 @@ type Components = {
|
|
|
10895
10876
|
declare const components: Components;
|
|
10896
10877
|
type ComponentsClass = typeof divider | ReturnType<typeof input.create> | ReturnType<typeof switchComponent.create>;
|
|
10897
10878
|
|
|
10879
|
+
/**
|
|
10880
|
+
* 消息钩子系统
|
|
10881
|
+
*/
|
|
10882
|
+
declare const hooks: {
|
|
10883
|
+
/** 消息hook */
|
|
10884
|
+
message: ((callback: HookCallback<Message$2>, options?: HookOptions) => number) & {
|
|
10885
|
+
friend(callback: HookCallback<FriendMessage>, options?: HookOptions): number;
|
|
10886
|
+
group(callback: HookCallback<GroupMessage>, options?: HookOptions): number;
|
|
10887
|
+
guild(callback: HookCallback<GuildMessage>, options?: HookOptions): number;
|
|
10888
|
+
direct(callback: HookCallback<DirectMessage>, options?: HookOptions): number;
|
|
10889
|
+
groupTemp(callback: HookCallback<GroupTempMessage>, options?: HookOptions): number;
|
|
10890
|
+
remove(id: number): void;
|
|
10891
|
+
};
|
|
10892
|
+
/** 发送消息钩子 */
|
|
10893
|
+
sendMsg: {
|
|
10894
|
+
message: (callback: NormalMessageCallback, options?: HookOptions) => number;
|
|
10895
|
+
forward: (callback: ForwardMessageCallback, options?: HookOptions) => number;
|
|
10896
|
+
remove: (id: number) => void;
|
|
10897
|
+
};
|
|
10898
|
+
/** 未找到匹配插件消息钩子 */
|
|
10899
|
+
emptyMessage: ((callback: HookCallback<Message$2>, options?: HookOptions) => number) & {
|
|
10900
|
+
remove(id: number): void;
|
|
10901
|
+
};
|
|
10902
|
+
};
|
|
10903
|
+
|
|
10898
10904
|
/**
|
|
10899
10905
|
* 获取插件
|
|
10900
10906
|
* @param type 获取插件的方式
|
|
@@ -11134,6 +11140,134 @@ interface PluginUpdateInfo extends PluginLists {
|
|
|
11134
11140
|
updateCount?: number;
|
|
11135
11141
|
}
|
|
11136
11142
|
|
|
11143
|
+
/** 本地插件列表 请自行添加[] */
|
|
11144
|
+
interface LocalApiResponse {
|
|
11145
|
+
/** 插件id */
|
|
11146
|
+
id: string;
|
|
11147
|
+
/** 是否存在配置文件 无需配置 */
|
|
11148
|
+
hasConfig?: boolean;
|
|
11149
|
+
/** 插件类型 无需配置 */
|
|
11150
|
+
type?: 'git' | 'npm' | 'app';
|
|
11151
|
+
/** 插件名称 前端优先展示 */
|
|
11152
|
+
name?: string;
|
|
11153
|
+
/** 插件版本 可不填 会自动读取package.json中的version */
|
|
11154
|
+
version?: string;
|
|
11155
|
+
/** 插件描述 可不填 会自动读取package.json中的version */
|
|
11156
|
+
description?: string;
|
|
11157
|
+
/** 插件作者 */
|
|
11158
|
+
author?: {
|
|
11159
|
+
/** 名字 */
|
|
11160
|
+
name?: string;
|
|
11161
|
+
/** 主页 */
|
|
11162
|
+
home?: string;
|
|
11163
|
+
/** 头像 */
|
|
11164
|
+
avatar?: string;
|
|
11165
|
+
}[];
|
|
11166
|
+
/** 插件图标 前端优先展示 */
|
|
11167
|
+
icon?: {
|
|
11168
|
+
/** 图标名称 */
|
|
11169
|
+
name?: string;
|
|
11170
|
+
/** 图标大小 */
|
|
11171
|
+
size?: number;
|
|
11172
|
+
/** 图标颜色 */
|
|
11173
|
+
color?: string;
|
|
11174
|
+
};
|
|
11175
|
+
}
|
|
11176
|
+
/** 获取配置请求参数 */
|
|
11177
|
+
interface GetConfigRequest {
|
|
11178
|
+
/** 插件名称 */
|
|
11179
|
+
name: string;
|
|
11180
|
+
/** 插件类型 */
|
|
11181
|
+
type: 'git' | 'npm' | 'app';
|
|
11182
|
+
}
|
|
11183
|
+
/** 获取配置响应 */
|
|
11184
|
+
interface GetConfigResponse {
|
|
11185
|
+
/** 组件配置参数 */
|
|
11186
|
+
options: ComponentConfig[];
|
|
11187
|
+
/** 插件信息 */
|
|
11188
|
+
info: LocalApiResponse;
|
|
11189
|
+
}
|
|
11190
|
+
|
|
11191
|
+
type UnionMessage = Message$2 | FriendMessage | GroupMessage | GuildMessage | DirectMessage | GroupTempMessage;
|
|
11192
|
+
/** 调用后继续执行下一个钩子 如果没钩子则继续正常流程 */
|
|
11193
|
+
type HookNext = () => void;
|
|
11194
|
+
/** 通用钩子配置项 */
|
|
11195
|
+
interface HookOptions {
|
|
11196
|
+
/** 优先级,数字越小优先级越高 */
|
|
11197
|
+
priority?: number;
|
|
11198
|
+
}
|
|
11199
|
+
/** 收到消息事件钩子回调函数 */
|
|
11200
|
+
type HookCallback<T extends UnionMessage> = (event: T, next: HookNext) => void | Promise<void>;
|
|
11201
|
+
/** 收到消息事件钩子项 */
|
|
11202
|
+
interface MessageHookItem<T extends UnionMessage> {
|
|
11203
|
+
/** 钩子ID */
|
|
11204
|
+
id: number;
|
|
11205
|
+
/** 钩子优先级 */
|
|
11206
|
+
priority: number;
|
|
11207
|
+
/** 钩子回调函数 */
|
|
11208
|
+
callback: HookCallback<T>;
|
|
11209
|
+
}
|
|
11210
|
+
/**
|
|
11211
|
+
* 发送基础消息回调类型
|
|
11212
|
+
* @param contact 联系人
|
|
11213
|
+
* @param elements 消息元素
|
|
11214
|
+
* @param retryCount 重试次数
|
|
11215
|
+
*/
|
|
11216
|
+
type BaseMessageCallback<T> = (contact: Contact, elements: Array<Elements>, retryCount?: number) => T | Promise<T>;
|
|
11217
|
+
/**
|
|
11218
|
+
* 接收普通消息发送回调类型 这个由开发者调用
|
|
11219
|
+
*/
|
|
11220
|
+
type NormalMessageCallback = BaseMessageCallback<void>;
|
|
11221
|
+
/**
|
|
11222
|
+
* 消息钩子触发类型 这个由karin内部调用
|
|
11223
|
+
*/
|
|
11224
|
+
type HookEmitMessage = BaseMessageCallback<boolean>;
|
|
11225
|
+
/**
|
|
11226
|
+
* 基础转发消息回调类型
|
|
11227
|
+
* @param contact 联系人
|
|
11228
|
+
* @param elements 消息元素
|
|
11229
|
+
* @param options 转发选项
|
|
11230
|
+
*/
|
|
11231
|
+
type BaseForwardCallback<T> = (contact: Contact, elements: Array<NodeElement>, options?: ForwardOptions) => T | Promise<T>;
|
|
11232
|
+
/**
|
|
11233
|
+
* 接收转发消息回调类型 这个由开发者调用
|
|
11234
|
+
*/
|
|
11235
|
+
type ForwardMessageCallback = BaseForwardCallback<void>;
|
|
11236
|
+
/**
|
|
11237
|
+
* 转发消息钩子触发类型 这个由karin内部调用
|
|
11238
|
+
*/
|
|
11239
|
+
type HookEmitForward = BaseForwardCallback<boolean>;
|
|
11240
|
+
/** 发送消息钩子项 */
|
|
11241
|
+
interface SendMsgHookItem<T extends NormalMessageCallback | ForwardMessageCallback> {
|
|
11242
|
+
/** 钩子ID */
|
|
11243
|
+
id: number;
|
|
11244
|
+
/** 钩子优先级 */
|
|
11245
|
+
priority: number;
|
|
11246
|
+
/** 钩子回调函数 */
|
|
11247
|
+
callback: T;
|
|
11248
|
+
}
|
|
11249
|
+
/** 缓存 */
|
|
11250
|
+
interface HookCache {
|
|
11251
|
+
/** 消息事件钩子 */
|
|
11252
|
+
message: {
|
|
11253
|
+
message: MessageHookItem<Message$2>[];
|
|
11254
|
+
friend: MessageHookItem<FriendMessage>[];
|
|
11255
|
+
group: MessageHookItem<GroupMessage>[];
|
|
11256
|
+
guild: MessageHookItem<GuildMessage>[];
|
|
11257
|
+
direct: MessageHookItem<DirectMessage>[];
|
|
11258
|
+
groupTemp: MessageHookItem<GroupTempMessage>[];
|
|
11259
|
+
};
|
|
11260
|
+
/** 发送消息事件钩子 */
|
|
11261
|
+
sendMsg: {
|
|
11262
|
+
/** 普通消息 */
|
|
11263
|
+
message: SendMsgHookItem<NormalMessageCallback>[];
|
|
11264
|
+
/** 转发消息 */
|
|
11265
|
+
forward: SendMsgHookItem<ForwardMessageCallback>[];
|
|
11266
|
+
};
|
|
11267
|
+
/** 未找到匹配插件消息钩子 */
|
|
11268
|
+
emptyMessage: MessageHookItem<Message$2>[];
|
|
11269
|
+
}
|
|
11270
|
+
|
|
11137
11271
|
/**
|
|
11138
11272
|
* @public
|
|
11139
11273
|
* @description 日志管理器
|
|
@@ -11155,4 +11289,4 @@ declare let level: ReturnType<typeof createLevelDB>;
|
|
|
11155
11289
|
*/
|
|
11156
11290
|
declare const start: () => Promise<void>;
|
|
11157
11291
|
|
|
11158
|
-
export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, type ElementTypes, type Elements, type Env, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type GetAtAllCountResponse, type GetBot, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, InputDataType, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type KarinButton, type KeyboardElement, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SEND_MSG, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TextElement, type TextField, type TextSegment, type TitleField, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isRoot, isStatic, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, level, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
|
|
11292
|
+
export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, type ElementTypes, type Elements, type Env, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type GetAtAllCountResponse, type GetBot, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, type ImageElement, type ImageSegment, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type KarinButton, type KeyboardElement, type LocalApiResponse, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SEND_MSG, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TextElement, type TextField, type TextSegment, type TitleField, type UnionMessage, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, hooks, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isRoot, isStatic, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, level, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
|