node-karin 1.0.0 → 1.0.2
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 +28 -0
- package/dist/index.d.ts +99 -144
- package/dist/index.js +264 -337
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.0.2](https://github.com/KarinJS/Karin/compare/node-karin-v1.0.1...node-karin-v1.0.2) (2025-01-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* build types error ([f732ca3](https://github.com/KarinJS/Karin/commit/f732ca38155f08adefed7a9f8d42d373a9fc9cc7))
|
|
9
|
+
* ci ([56b3823](https://github.com/KarinJS/Karin/commit/56b382335d63577078e5aa8572d6238c63caf3e9))
|
|
10
|
+
* tips ([9f67525](https://github.com/KarinJS/Karin/commit/9f67525d592094532a3a29fe1f3de41bc1ec1936))
|
|
11
|
+
* version ([1b15d0b](https://github.com/KarinJS/Karin/commit/1b15d0b6c1583a8abc674b97cd746aac97b918c1))
|
|
12
|
+
* 导出 ([33b0683](https://github.com/KarinJS/Karin/commit/33b06831c3c4e6679edb3353962d88d7e2cb4d9b))
|
|
13
|
+
|
|
14
|
+
## [1.0.1](https://github.com/KarinJS/Karin/compare/node-karin-v1.0.0...node-karin-v1.0.1) (2025-01-15)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* ci ([56b3823](https://github.com/KarinJS/Karin/commit/56b382335d63577078e5aa8572d6238c63caf3e9))
|
|
20
|
+
* version ([1b15d0b](https://github.com/KarinJS/Karin/commit/1b15d0b6c1583a8abc674b97cd746aac97b918c1))
|
|
21
|
+
* 导出 ([33b0683](https://github.com/KarinJS/Karin/commit/33b06831c3c4e6679edb3353962d88d7e2cb4d9b))
|
|
22
|
+
|
|
23
|
+
## [1.0.1](https://github.com/KarinJS/Karin/compare/node-karin-v1.0.0...node-karin-v1.0.1) (2025-01-15)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* version ([1b15d0b](https://github.com/KarinJS/Karin/commit/1b15d0b6c1583a8abc674b97cd746aac97b918c1))
|
|
29
|
+
* 导出 ([33b0683](https://github.com/KarinJS/Karin/commit/33b06831c3c4e6679edb3353962d88d7e2cb4d9b))
|
|
30
|
+
|
|
3
31
|
## [0.12.17](https://github.com/KarinJS/Karin/compare/v0.12.16...v0.12.17) (2024-10-07)
|
|
4
32
|
|
|
5
33
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
1
2
|
import chalk from 'chalk';
|
|
2
3
|
import { Configuration, Logger as Logger$1 } from 'log4js';
|
|
3
4
|
import { Level } from 'level';
|
|
@@ -2476,14 +2477,14 @@ interface OB11GroupMessage extends MessageBase$1 {
|
|
|
2476
2477
|
/** 消息事件 */
|
|
2477
2478
|
type OB11Message = OB11PrivateMessage | OB11GroupMessage | OB11GroupTempMessage;
|
|
2478
2479
|
/** 通知事件基类 */
|
|
2479
|
-
interface
|
|
2480
|
+
interface OB11NoticeBaseType extends OB11EventBase {
|
|
2480
2481
|
/** 事件类型 */
|
|
2481
2482
|
post_type: OB11Event.Notice;
|
|
2482
2483
|
/** 通知类型 */
|
|
2483
2484
|
notice_type: OB11NoticeType;
|
|
2484
2485
|
}
|
|
2485
2486
|
/** 群文件上传事件 */
|
|
2486
|
-
interface OneBot11GroupUpload extends
|
|
2487
|
+
interface OneBot11GroupUpload extends OB11NoticeBaseType {
|
|
2487
2488
|
/** 通知类型 */
|
|
2488
2489
|
notice_type: OB11NoticeType.GroupUpload;
|
|
2489
2490
|
/** 群号 */
|
|
@@ -2503,7 +2504,7 @@ interface OneBot11GroupUpload extends NoticeBase$1 {
|
|
|
2503
2504
|
};
|
|
2504
2505
|
}
|
|
2505
2506
|
/** 群管理员变动事件 */
|
|
2506
|
-
interface OneBot11GroupAdmin extends
|
|
2507
|
+
interface OneBot11GroupAdmin extends OB11NoticeBaseType {
|
|
2507
2508
|
/** 通知类型 */
|
|
2508
2509
|
notice_type: OB11NoticeType.GroupAdmin;
|
|
2509
2510
|
/** 事件子类型,分别表示设置和取消管理员 */
|
|
@@ -2514,7 +2515,7 @@ interface OneBot11GroupAdmin extends NoticeBase$1 {
|
|
|
2514
2515
|
user_id: number;
|
|
2515
2516
|
}
|
|
2516
2517
|
/** 群减少事件 */
|
|
2517
|
-
interface OneBot11GroupDecrease extends
|
|
2518
|
+
interface OneBot11GroupDecrease extends OB11NoticeBaseType {
|
|
2518
2519
|
/** 通知类型 */
|
|
2519
2520
|
notice_type: OB11NoticeType.GroupDecrease;
|
|
2520
2521
|
/** 事件子类型,分别表示主动退群、成员被踢、登录号被踢 */
|
|
@@ -2527,7 +2528,7 @@ interface OneBot11GroupDecrease extends NoticeBase$1 {
|
|
|
2527
2528
|
user_id: number;
|
|
2528
2529
|
}
|
|
2529
2530
|
/** 群增加事件 */
|
|
2530
|
-
interface OneBot11GroupIncrease extends
|
|
2531
|
+
interface OneBot11GroupIncrease extends OB11NoticeBaseType {
|
|
2531
2532
|
/** 通知类型 */
|
|
2532
2533
|
notice_type: OB11NoticeType.GroupIncrease;
|
|
2533
2534
|
/** 事件子类型,分别表示管理员已同意入群、管理员邀请入群 */
|
|
@@ -2540,7 +2541,7 @@ interface OneBot11GroupIncrease extends NoticeBase$1 {
|
|
|
2540
2541
|
user_id: number;
|
|
2541
2542
|
}
|
|
2542
2543
|
/** 群禁言事件 */
|
|
2543
|
-
interface OneBot11GroupBan extends
|
|
2544
|
+
interface OneBot11GroupBan extends OB11NoticeBaseType {
|
|
2544
2545
|
/** 通知类型 */
|
|
2545
2546
|
notice_type: OB11NoticeType.GroupBan;
|
|
2546
2547
|
/** 事件子类型,分别表示禁言、解除禁言 */
|
|
@@ -2555,14 +2556,14 @@ interface OneBot11GroupBan extends NoticeBase$1 {
|
|
|
2555
2556
|
duration: number;
|
|
2556
2557
|
}
|
|
2557
2558
|
/** 新添加好友事件 */
|
|
2558
|
-
interface OneBot11FriendAdd extends
|
|
2559
|
+
interface OneBot11FriendAdd extends OB11NoticeBaseType {
|
|
2559
2560
|
/** 通知类型 */
|
|
2560
2561
|
notice_type: OB11NoticeType.FriendAdd;
|
|
2561
2562
|
/** 新添加好友 QQ 号 */
|
|
2562
2563
|
user_id: number;
|
|
2563
2564
|
}
|
|
2564
2565
|
/** 群撤回事件 */
|
|
2565
|
-
interface OneBot11GroupRecall extends
|
|
2566
|
+
interface OneBot11GroupRecall extends OB11NoticeBaseType {
|
|
2566
2567
|
/** 通知类型 */
|
|
2567
2568
|
notice_type: OB11NoticeType.GroupRecall;
|
|
2568
2569
|
/** 群号 */
|
|
@@ -2575,7 +2576,7 @@ interface OneBot11GroupRecall extends NoticeBase$1 {
|
|
|
2575
2576
|
message_id: number;
|
|
2576
2577
|
}
|
|
2577
2578
|
/** 好友消息撤回事件 */
|
|
2578
|
-
interface OneBot11FriendRecall extends
|
|
2579
|
+
interface OneBot11FriendRecall extends OB11NoticeBaseType {
|
|
2579
2580
|
/** 通知类型 */
|
|
2580
2581
|
notice_type: OB11NoticeType.FriendRecall;
|
|
2581
2582
|
/** 好友 QQ 号 */
|
|
@@ -2584,7 +2585,7 @@ interface OneBot11FriendRecall extends NoticeBase$1 {
|
|
|
2584
2585
|
message_id: number;
|
|
2585
2586
|
}
|
|
2586
2587
|
/** 戳一戳事件 */
|
|
2587
|
-
interface OneBot11Poke extends
|
|
2588
|
+
interface OneBot11Poke extends OB11NoticeBaseType {
|
|
2588
2589
|
/** 消息类型 */
|
|
2589
2590
|
notice_type: OB11NoticeType.Notify;
|
|
2590
2591
|
/** 提示类型 */
|
|
@@ -2597,7 +2598,7 @@ interface OneBot11Poke extends NoticeBase$1 {
|
|
|
2597
2598
|
target_id: number;
|
|
2598
2599
|
}
|
|
2599
2600
|
/** 运气王事件 */
|
|
2600
|
-
interface OneBot11LuckyKing extends
|
|
2601
|
+
interface OneBot11LuckyKing extends OB11NoticeBaseType {
|
|
2601
2602
|
/** 消息类型 */
|
|
2602
2603
|
notice_type: OB11NoticeType.Notify;
|
|
2603
2604
|
/** 提示类型 */
|
|
@@ -2610,7 +2611,7 @@ interface OneBot11LuckyKing extends NoticeBase$1 {
|
|
|
2610
2611
|
target_id: number;
|
|
2611
2612
|
}
|
|
2612
2613
|
/** 荣誉变更事件 */
|
|
2613
|
-
interface OneBot11Honor extends
|
|
2614
|
+
interface OneBot11Honor extends OB11NoticeBaseType {
|
|
2614
2615
|
/** 消息类型 */
|
|
2615
2616
|
notice_type: OB11NoticeType.Notify;
|
|
2616
2617
|
/** 提示类型 */
|
|
@@ -2623,7 +2624,7 @@ interface OneBot11Honor extends NoticeBase$1 {
|
|
|
2623
2624
|
user_id: number;
|
|
2624
2625
|
}
|
|
2625
2626
|
/** 群表情回应事件 napcat、llonebot */
|
|
2626
|
-
interface OneBot11GroupMessageReaction extends
|
|
2627
|
+
interface OneBot11GroupMessageReaction extends OB11NoticeBaseType {
|
|
2627
2628
|
/** 消息类型 */
|
|
2628
2629
|
notice_type: OB11NoticeType.GroupMsgEmojiLike;
|
|
2629
2630
|
/** 群号 */
|
|
@@ -2640,7 +2641,7 @@ interface OneBot11GroupMessageReaction extends NoticeBase$1 {
|
|
|
2640
2641
|
}>;
|
|
2641
2642
|
}
|
|
2642
2643
|
/** 群表情回应事件 Lagrange */
|
|
2643
|
-
interface OneBot11GroupMessageReactionLagrange extends
|
|
2644
|
+
interface OneBot11GroupMessageReactionLagrange extends OB11NoticeBaseType {
|
|
2644
2645
|
/** 消息类型 */
|
|
2645
2646
|
notice_type: OB11NoticeType.GroupMsgEmojiLikeLagrange;
|
|
2646
2647
|
/** 提示类型 */
|
|
@@ -2657,7 +2658,7 @@ interface OneBot11GroupMessageReactionLagrange extends NoticeBase$1 {
|
|
|
2657
2658
|
count: number;
|
|
2658
2659
|
}
|
|
2659
2660
|
/** 群精华 */
|
|
2660
|
-
interface OneBot11GroupEssence extends
|
|
2661
|
+
interface OneBot11GroupEssence extends OB11NoticeBaseType {
|
|
2661
2662
|
/** 通知类型 */
|
|
2662
2663
|
notice_type: OB11NoticeType.GroupEssence;
|
|
2663
2664
|
/** 操作类型 */
|
|
@@ -2672,7 +2673,7 @@ interface OneBot11GroupEssence extends NoticeBase$1 {
|
|
|
2672
2673
|
operator_id: number;
|
|
2673
2674
|
}
|
|
2674
2675
|
/** 群成员名片更新 */
|
|
2675
|
-
interface OneBot11GroupCard extends
|
|
2676
|
+
interface OneBot11GroupCard extends OB11NoticeBaseType {
|
|
2676
2677
|
/** 通知类型 */
|
|
2677
2678
|
time: number;
|
|
2678
2679
|
/** 事件类型 */
|
|
@@ -2693,7 +2694,7 @@ interface OneBot11GroupCard extends NoticeBase$1 {
|
|
|
2693
2694
|
/** 通知事件 */
|
|
2694
2695
|
type OB11Notice = OneBot11GroupUpload | OneBot11GroupAdmin | OneBot11GroupDecrease | OneBot11GroupIncrease | OneBot11GroupBan | OneBot11FriendAdd | OneBot11GroupRecall | OneBot11FriendRecall | OneBot11Poke | OneBot11LuckyKing | OneBot11Honor | OneBot11GroupMessageReaction | OneBot11GroupMessageReactionLagrange | OneBot11GroupEssence | OneBot11GroupCard;
|
|
2695
2696
|
/** 请求事件基类 */
|
|
2696
|
-
interface
|
|
2697
|
+
interface OB11RequestBaseType extends OB11EventBase {
|
|
2697
2698
|
/** 事件发生的时间戳 */
|
|
2698
2699
|
time: number;
|
|
2699
2700
|
/** 事件类型 */
|
|
@@ -2710,12 +2711,12 @@ interface RequestBase$1 extends OB11EventBase {
|
|
|
2710
2711
|
comment: string;
|
|
2711
2712
|
}
|
|
2712
2713
|
/** 好友请求事件 */
|
|
2713
|
-
interface OneBot11FriendRequest extends
|
|
2714
|
+
interface OneBot11FriendRequest extends OB11RequestBaseType {
|
|
2714
2715
|
/** 请求类型 */
|
|
2715
2716
|
request_type: OB11RequestType.Friend;
|
|
2716
2717
|
}
|
|
2717
2718
|
/** 群请求事件 */
|
|
2718
|
-
interface OneBot11GroupRequest extends
|
|
2719
|
+
interface OneBot11GroupRequest extends OB11RequestBaseType {
|
|
2719
2720
|
/** 请求类型 */
|
|
2720
2721
|
request_type: OB11RequestType.Group;
|
|
2721
2722
|
/** 请求子类型,分别表示加群请求、邀请登录号入群 */
|
|
@@ -8645,7 +8646,7 @@ declare const marketFace: (id: string) => MarketFaceElement;
|
|
|
8645
8646
|
* @param scene 分享类型
|
|
8646
8647
|
* @param peer 被推荐人的QQ号或者被推荐群的群号
|
|
8647
8648
|
*/
|
|
8648
|
-
declare const contact: (scene: "group" | "friend", peer: string) => ContactElement;
|
|
8649
|
+
declare const contact$1: (scene: "group" | "friend", peer: string) => ContactElement;
|
|
8649
8650
|
/**
|
|
8650
8651
|
* 构建常规音乐元素
|
|
8651
8652
|
* @param id 歌曲ID或自定义音乐选项
|
|
@@ -8679,7 +8680,6 @@ declare const segment_at: typeof at;
|
|
|
8679
8680
|
declare const segment_basketball: typeof basketball;
|
|
8680
8681
|
declare const segment_bubbleFace: typeof bubbleFace;
|
|
8681
8682
|
declare const segment_button: typeof button;
|
|
8682
|
-
declare const segment_contact: typeof contact;
|
|
8683
8683
|
declare const segment_customMusic: typeof customMusic;
|
|
8684
8684
|
declare const segment_dice: typeof dice;
|
|
8685
8685
|
declare const segment_face: typeof face;
|
|
@@ -8706,7 +8706,7 @@ declare const segment_video: typeof video;
|
|
|
8706
8706
|
declare const segment_weather: typeof weather;
|
|
8707
8707
|
declare const segment_xml: typeof xml;
|
|
8708
8708
|
declare namespace segment {
|
|
8709
|
-
export { segment_at as at, segment_basketball as basketball, segment_bubbleFace as bubbleFace, segment_button as button,
|
|
8709
|
+
export { segment_at as at, segment_basketball as basketball, segment_bubbleFace as bubbleFace, segment_button as button, contact$1 as contact, segment_customMusic as customMusic, segment_dice as dice, segment_face as face, segment_gift as gift, segment_image as image, segment_json as json, segment_keyboard as keyboard, segment_location as location, segment_longMsg as longMsg, segment_markdown as markdown, segment_markdownTpl as markdownTpl, segment_marketFace as marketFace, segment_music as music, segment_node as node, segment_nodeDirect as nodeDirect, segment_pasmsg as pasmsg, segment_raw as raw, segment_record as record, segment_reply as reply, segment_rps as rps, segment_share as share, segment_text as text, segment_video as video, segment_weather as weather, segment_xml as xml };
|
|
8710
8710
|
}
|
|
8711
8711
|
|
|
8712
8712
|
/**
|
|
@@ -9574,150 +9574,105 @@ declare const server: http.Server<typeof http.IncomingMessage, typeof http.Serve
|
|
|
9574
9574
|
declare const listen: (port: number, host: string) => void;
|
|
9575
9575
|
|
|
9576
9576
|
/**
|
|
9577
|
-
*
|
|
9578
|
-
* @param
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
* @
|
|
9583
|
-
* @param
|
|
9584
|
-
*/
|
|
9585
|
-
declare const createGroupMessage: (options: GroupMessageOptions) => GroupMessage;
|
|
9586
|
-
/**
|
|
9587
|
-
* @description 创建频道消息事件实例
|
|
9588
|
-
* @param options 频道消息事件所需参数
|
|
9589
|
-
*/
|
|
9590
|
-
declare const createGuildMessage: (options: GuildMessageOptions) => GuildMessage;
|
|
9591
|
-
/**
|
|
9592
|
-
* @description 创建频道私信消息事件实例
|
|
9593
|
-
* @param options 频道私信消息事件所需参数
|
|
9594
|
-
*/
|
|
9595
|
-
declare const createDirectMessage: (options: DirectMessageOptions) => DirectMessage;
|
|
9596
|
-
/**
|
|
9597
|
-
* @description 创建群临时消息事件实例
|
|
9598
|
-
* @param options 群临时消息事件所需参数
|
|
9599
|
-
*/
|
|
9600
|
-
declare const createGroupTempMessage: (options: GroupTempMessageOptions) => GroupTempMessage;
|
|
9601
|
-
/**
|
|
9602
|
-
* @description 创建点赞通知事件
|
|
9603
|
-
* @param options 点赞通知事件所需参数
|
|
9604
|
-
*/
|
|
9605
|
-
declare const createReceiveLikeNotice: (options: ReceiveLikeOptions) => ReceiveLikeNotice;
|
|
9606
|
-
/**
|
|
9607
|
-
* @description 创建好友增加通知事件
|
|
9608
|
-
* @param options 好友增加通知事件所需参数
|
|
9609
|
-
*/
|
|
9610
|
-
declare const createFriendIncreaseNotice: (options: FriendIncreaseOptions) => FriendIncreaseNotice;
|
|
9611
|
-
/**
|
|
9612
|
-
* @description 创建好友减少通知事件
|
|
9613
|
-
* @param options 好友减少通知事件所需参数
|
|
9614
|
-
*/
|
|
9615
|
-
declare const createFriendDecreaseNotice: (options: FriendDecreaseOptions) => FriendDecreaseNotice;
|
|
9616
|
-
/**
|
|
9617
|
-
* @description 创建私聊戳一戳通知事件
|
|
9618
|
-
* @param options 私聊戳一戳通知事件所需参数
|
|
9619
|
-
*/
|
|
9620
|
-
declare const createPrivatePokeNotice: (options: PrivatePokeOptions) => PrivatePokeNotice;
|
|
9621
|
-
/**
|
|
9622
|
-
* @description 创建私聊撤回通知事件
|
|
9623
|
-
* @param options 私聊撤回通知事件所需参数
|
|
9624
|
-
*/
|
|
9625
|
-
declare const createPrivateRecallNotice: (options: PrivateRecallOptions) => PrivateRecallNotice;
|
|
9626
|
-
/**
|
|
9627
|
-
* @description 创建私聊文件上传通知事件
|
|
9628
|
-
* @param options 私聊文件上传通知事件所需参数
|
|
9629
|
-
*/
|
|
9630
|
-
declare const createPrivateFileUploadedNotice: (options: PrivateFileUploadedOptions) => PrivateFileUploadedNotice;
|
|
9631
|
-
/**
|
|
9632
|
-
* @description 创建群戳一戳通知事件
|
|
9633
|
-
* @param options 群戳一戳通知事件所需参数
|
|
9634
|
-
*/
|
|
9635
|
-
declare const createGroupPokeNotice: (options: GroupPokeOptions) => GroupPokeNotice;
|
|
9636
|
-
/**
|
|
9637
|
-
* @description 创建群撤回通知事件
|
|
9638
|
-
* @param options 群撤回通知事件所需参数
|
|
9639
|
-
*/
|
|
9640
|
-
declare const createGroupRecallNotice: (options: GroupRecallOptions) => GroupRecallNotice;
|
|
9641
|
-
/**
|
|
9642
|
-
* @description 创建群文件上传通知事件
|
|
9643
|
-
* @param options 群文件上传通知事件所需参数
|
|
9644
|
-
*/
|
|
9645
|
-
declare const createGroupFileUploadedNotice: (options: GroupFileUploadedOptions) => GroupFileUploadedNotice;
|
|
9646
|
-
/**
|
|
9647
|
-
* @description 创建群成员名片更新通知事件
|
|
9648
|
-
* @param options 群成员名片更新通知事件所需参数
|
|
9649
|
-
*/
|
|
9650
|
-
declare const createGroupCardChangedNotice: (options: GroupCardChangedOptions) => GroupCardChangedNotice;
|
|
9651
|
-
/**
|
|
9652
|
-
* @description 创建群成员专属头衔更新通知事件
|
|
9653
|
-
* @param options 群成员专属头衔更新通知事件所需参数
|
|
9654
|
-
*/
|
|
9655
|
-
declare const createGroupMemberTitleUpdatedNotice: (options: GroupMemberUniqueTitleChangedOptions) => GroupMemberTitleUpdatedNotice;
|
|
9656
|
-
/**
|
|
9657
|
-
* @description 创建群精华消息变更通知事件
|
|
9658
|
-
* @param options 群精华消息变更通知事件所需参数
|
|
9659
|
-
*/
|
|
9660
|
-
declare const createGroupHlightsChangedNotice: (options: GroupHlightsChangedOptions) => GroupHlightsChangedNotice;
|
|
9661
|
-
/**
|
|
9662
|
-
* @description 创建群成员增加通知事件
|
|
9663
|
-
* @param options 群成员增加通知事件所需参数
|
|
9577
|
+
* 构建好友场景的`sender`
|
|
9578
|
+
* @param userId 用户ID
|
|
9579
|
+
* @param name 用户名
|
|
9580
|
+
* @param sex 性别
|
|
9581
|
+
* @param age 年龄
|
|
9582
|
+
* @param uid QQ场景专属
|
|
9583
|
+
* @param uin QQ场景专属
|
|
9664
9584
|
*/
|
|
9665
|
-
declare const
|
|
9585
|
+
declare const senderFriend: (userId: Sender<"friend">["userId"], name?: Sender<"friend">["name"], sex?: Sender<"friend">["sex"], age?: Sender<"friend">["age"], uid?: Sender<"friend">["uid"], uin?: Sender<"friend">["uin"]) => Sender<"friend">;
|
|
9666
9586
|
/**
|
|
9667
|
-
*
|
|
9668
|
-
* @param options 群成员减少通知事件所需参数
|
|
9587
|
+
* 构建群聊场景的`sender`
|
|
9669
9588
|
*/
|
|
9670
|
-
declare const
|
|
9589
|
+
declare const senderGroup: SenderGroup;
|
|
9671
9590
|
/**
|
|
9672
|
-
*
|
|
9673
|
-
* @param
|
|
9591
|
+
* 构建频道场景的`sender`
|
|
9592
|
+
* @param userId 用户ID
|
|
9593
|
+
* @param role 群成员身份
|
|
9594
|
+
* @param name 用户名
|
|
9595
|
+
* @param sex 性别
|
|
9596
|
+
* @param age 年龄
|
|
9674
9597
|
*/
|
|
9675
|
-
declare const
|
|
9598
|
+
declare const senderGuild: (userId: Sender<"guild">["userId"], role: Sender<"guild">["role"], name: Sender<"guild">["name"] | undefined, sex: Sender<"guild">["sex"], age: Sender<"guild">["age"]) => Sender<"guild">;
|
|
9676
9599
|
/**
|
|
9677
|
-
*
|
|
9678
|
-
* @param options 群签到通知事件所需参数
|
|
9600
|
+
* 构建频道私信场景的`sender`
|
|
9679
9601
|
*/
|
|
9680
|
-
declare const
|
|
9602
|
+
declare const senderDirect: (userId: Sender<"friend">["userId"], name?: Sender<"friend">["name"], sex?: Sender<"friend">["sex"], age?: Sender<"friend">["age"], uid?: Sender<"friend">["uid"], uin?: Sender<"friend">["uin"]) => Sender<"friend">;
|
|
9681
9603
|
/**
|
|
9682
|
-
*
|
|
9683
|
-
* @param options 群禁言通知事件所需参数
|
|
9604
|
+
* 构建群聊临时会话场景的`sender`
|
|
9684
9605
|
*/
|
|
9685
|
-
declare const
|
|
9606
|
+
declare const senderGroupTemp: (userId: Sender<"friend">["userId"], name?: Sender<"friend">["name"], sex?: Sender<"friend">["sex"], age?: Sender<"friend">["age"], uid?: Sender<"friend">["uid"], uin?: Sender<"friend">["uin"]) => Sender<"friend">;
|
|
9686
9607
|
/**
|
|
9687
|
-
*
|
|
9688
|
-
* @
|
|
9608
|
+
* 事件发送者构建器
|
|
9609
|
+
* @description 用于构建不同场景的事件发送者信息
|
|
9689
9610
|
*/
|
|
9690
|
-
declare const
|
|
9611
|
+
declare const sender: {
|
|
9612
|
+
/** 好友场景 */
|
|
9613
|
+
friend: (userId: Sender<"friend">["userId"], name?: Sender<"friend">["name"], sex?: Sender<"friend">["sex"], age?: Sender<"friend">["age"], uid?: Sender<"friend">["uid"], uin?: Sender<"friend">["uin"]) => Sender<"friend">;
|
|
9614
|
+
/** 群聊场景 */
|
|
9615
|
+
group: SenderGroup;
|
|
9616
|
+
/** 频道场景 */
|
|
9617
|
+
guild: (userId: Sender<"guild">["userId"], role: Sender<"guild">["role"], name: Sender<"guild">["name"] | undefined, sex: Sender<"guild">["sex"], age: Sender<"guild">["age"]) => Sender<"guild">;
|
|
9618
|
+
/** 频道私信场景 */
|
|
9619
|
+
direct: (userId: Sender<"friend">["userId"], name?: Sender<"friend">["name"], sex?: Sender<"friend">["sex"], age?: Sender<"friend">["age"], uid?: Sender<"friend">["uid"], uin?: Sender<"friend">["uin"]) => Sender<"friend">;
|
|
9620
|
+
/** 群聊临时会话场景 */
|
|
9621
|
+
groupTemp: (userId: Sender<"friend">["userId"], name?: Sender<"friend">["name"], sex?: Sender<"friend">["sex"], age?: Sender<"friend">["age"], uid?: Sender<"friend">["uid"], uin?: Sender<"friend">["uin"]) => Sender<"friend">;
|
|
9622
|
+
};
|
|
9623
|
+
|
|
9691
9624
|
/**
|
|
9692
|
-
*
|
|
9693
|
-
* @param
|
|
9625
|
+
* 构建好友事件来源
|
|
9626
|
+
* @param peer 好友ID
|
|
9627
|
+
* @param name 好友昵称 默认为空字符串
|
|
9694
9628
|
*/
|
|
9695
|
-
declare const
|
|
9629
|
+
declare const contactFriend: (peer: FriendContact["peer"], name?: FriendContact["name"]) => FriendContact;
|
|
9696
9630
|
/**
|
|
9697
|
-
*
|
|
9698
|
-
* @param
|
|
9631
|
+
* 构建群聊事件来源
|
|
9632
|
+
* @param peer 群ID
|
|
9633
|
+
* @param name 群名
|
|
9699
9634
|
*/
|
|
9700
|
-
declare const
|
|
9635
|
+
declare const contactGroup: (peer: GroupContact["peer"], name?: GroupContact["name"]) => GroupContact;
|
|
9701
9636
|
/**
|
|
9702
|
-
*
|
|
9703
|
-
* @param
|
|
9637
|
+
* 构建频道私信事件来源
|
|
9638
|
+
* @param peer 频道ID
|
|
9639
|
+
* @param subId 子频道ID
|
|
9640
|
+
* @param srcGuildId 来源频道ID
|
|
9641
|
+
* @param name 频道名称 默认为空字符串
|
|
9642
|
+
* @param subName 子频道名称 默认为空字符串
|
|
9704
9643
|
*/
|
|
9705
|
-
declare const
|
|
9644
|
+
declare const contactDirect: (peer: DirectContact["peer"], subId: DirectContact["subPeer"], name?: DirectContact["name"], subName?: DirectContact["subName"]) => DirectContact;
|
|
9706
9645
|
/**
|
|
9707
|
-
*
|
|
9708
|
-
* @param
|
|
9646
|
+
* 构建频道事件来源
|
|
9647
|
+
* @param peer 频道ID
|
|
9648
|
+
* @param subPeer 子频道ID
|
|
9649
|
+
* @param name 频道名称 默认为空字符串
|
|
9650
|
+
* @param subName 子频道名称 默认为空字符串
|
|
9709
9651
|
*/
|
|
9710
|
-
declare const
|
|
9652
|
+
declare const contactGuild: (peer: GuildContact["peer"], subPeer: GuildContact["subPeer"], name?: GuildContact["name"], subName?: GuildContact["subName"]) => GuildContact;
|
|
9711
9653
|
/**
|
|
9712
|
-
*
|
|
9713
|
-
* @param
|
|
9654
|
+
* 构建群聊临时会话事件来源
|
|
9655
|
+
* @param peer 群ID
|
|
9656
|
+
* @param subPeer 发起临时会话的用户ID
|
|
9657
|
+
* @param name 群名
|
|
9714
9658
|
*/
|
|
9715
|
-
declare const
|
|
9659
|
+
declare const contactGroupTemp: (peer: GroupTempContact["peer"], subPeer: GroupTempContact["subPeer"], name?: GroupTempContact["name"]) => GroupTempContact;
|
|
9716
9660
|
/**
|
|
9717
|
-
*
|
|
9718
|
-
* @
|
|
9661
|
+
* 事件来源构建器
|
|
9662
|
+
* @description 用于构建不同场景的事件来源信息
|
|
9719
9663
|
*/
|
|
9720
|
-
declare const
|
|
9664
|
+
declare const contact: {
|
|
9665
|
+
/** 好友场景 */
|
|
9666
|
+
friend: (peer: FriendContact["peer"], name?: FriendContact["name"]) => FriendContact;
|
|
9667
|
+
/** 群聊场景 */
|
|
9668
|
+
group: (peer: GroupContact["peer"], name?: GroupContact["name"]) => GroupContact;
|
|
9669
|
+
/** 频道场景 */
|
|
9670
|
+
guild: (peer: GuildContact["peer"], subPeer: GuildContact["subPeer"], name?: GuildContact["name"], subName?: GuildContact["subName"]) => GuildContact;
|
|
9671
|
+
/** 频道私信场景 */
|
|
9672
|
+
direct: (peer: DirectContact["peer"], subId: DirectContact["subPeer"], name?: DirectContact["name"], subName?: DirectContact["subName"]) => DirectContact;
|
|
9673
|
+
/** 群聊临时会话场景 */
|
|
9674
|
+
groupTemp: (peer: GroupTempContact["peer"], subPeer: GroupTempContact["subPeer"], name?: GroupTempContact["name"]) => GroupTempContact;
|
|
9675
|
+
};
|
|
9721
9676
|
|
|
9722
9677
|
/**
|
|
9723
9678
|
* 控制台交互适配器
|
|
@@ -9866,4 +9821,4 @@ declare const renderTpl: (options: Omit<Options, "name"> & {
|
|
|
9866
9821
|
name?: string;
|
|
9867
9822
|
};
|
|
9868
9823
|
|
|
9869
|
-
export { type Accept, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, AdapterConsole, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type AtElement, type AtSegment, type BaseContact, type BaseEventOptions, type BaseEventType, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CmdFnc, type Command, type CommandClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DiceElement, type DiceSegment, type DirectContact, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DownloadFileOptions, type DownloadFileResponse, type ElementTypes, type Elements, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, type FaceElement, type FaceSegment, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendDecreaseOptions, type FriendIncreaseOptions, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, 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, type GroupAdminChangedOptions, type GroupApplyRequestOptions, type GroupCardChangedOptions, type GroupContact, type GroupFileUploadedOptions, type GroupHlightsChangedOptions, type GroupHonorChangedOptions, type GroupInfo, type GroupInviteRequestOptions, type GroupLuckKingOptions, type GroupMemberBanOptions, type GroupMemberDecreaseOptions, type GroupMemberIncreaseOptions, type GroupMemberInfo, type GroupMemberUniqueTitleChangedOptions, type GroupMessageOptions, type GroupMessageReactionOptions, type GroupNoticeEventMap, type GroupPokeOptions, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, type GroupSignInOptions, type GroupTempContact, type GroupTempMessageOptions, type GroupTempSender, type GroupWholeBanOptions, type Groups, type GuildContact, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, 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, type MessageEventMap, type MessageEventSub, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type Notice, type NoticeAndRequest,
|
|
9824
|
+
export { type Accept, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, AdapterConsole, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, 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 CmdFnc, type Command, type CommandClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DownloadFileOptions, type DownloadFileResponse, type ElementTypes, type Elements, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, type FaceElement, type FaceSegment, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type ForwardOptions, type ForwardSegment, type FriendContact, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, 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, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, 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 GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, 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 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 OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, 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 Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginOptions, type PluginRule, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, 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, type Scene, type ScreenshotClip, type ScreenshotOptions, type Segment, 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 Task, type TextElement, type TextSegment, type UnregisterBot, type UserInfo, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, adapter, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createLogger, createPluginDir, createRawMessage, karin as default, 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, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, importModule, 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, listen, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis$1 as redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, stream, stringifyError, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, wss, yaml };
|