node-karin 1.14.2 → 1.14.4
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 +14 -0
- package/dist/index.d.ts +108 -12
- package/dist/index.mjs +395 -4077
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.14.4](https://github.com/KarinJS/Karin/compare/core-v1.14.3...core-v1.14.4) (2026-02-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* close [#615](https://github.com/KarinJS/Karin/issues/615); 适配合并转发的外显参数 ([#616](https://github.com/KarinJS/Karin/issues/616)) ([f1129c9](https://github.com/KarinJS/Karin/commit/f1129c94317102b213148474afbdc1222b4170c5))
|
|
9
|
+
|
|
10
|
+
## [1.14.3](https://github.com/KarinJS/Karin/compare/core-v1.14.2...core-v1.14.3) (2026-02-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 🐛 Bug Fixes
|
|
14
|
+
|
|
15
|
+
* 修复pokeUser参数错误的问题close [#576](https://github.com/KarinJS/Karin/issues/576) ([#609](https://github.com/KarinJS/Karin/issues/609)) ([5853366](https://github.com/KarinJS/Karin/commit/5853366236226b340f60d560fab84ac8c2d20d2d))
|
|
16
|
+
|
|
3
17
|
## [1.14.2](https://github.com/KarinJS/Karin/compare/core-v1.14.1...core-v1.14.2) (2026-01-30)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1502,9 +1502,10 @@ interface AdapterType<T = any> {
|
|
|
1502
1502
|
/**
|
|
1503
1503
|
* 戳一戳用户 支持群聊和私聊
|
|
1504
1504
|
* @param contact 目标信息
|
|
1505
|
+
* @param targetId 被戳用户 ID
|
|
1505
1506
|
* @param count 戳一戳次数 默认为1
|
|
1506
1507
|
*/
|
|
1507
|
-
pokeUser(contact: Contact, count?: number): Promise<boolean>;
|
|
1508
|
+
pokeUser(contact: Contact, targetId: string, count?: number): Promise<boolean>;
|
|
1508
1509
|
/**
|
|
1509
1510
|
* 获取 Cookies
|
|
1510
1511
|
* @param domain The domain to get cookies from
|
|
@@ -3438,9 +3439,10 @@ declare abstract class AdapterBase<T = any> implements AdapterType<T> {
|
|
|
3438
3439
|
/**
|
|
3439
3440
|
* 戳一戳用户 支持群聊和私聊
|
|
3440
3441
|
* @param _contact 目标信息
|
|
3442
|
+
* @param _targetId 被戳用户 ID
|
|
3441
3443
|
* @param _count 戳一戳次数 默认为1
|
|
3442
3444
|
*/
|
|
3443
|
-
pokeUser(_contact: Contact, _count?: number): Promise<boolean>;
|
|
3445
|
+
pokeUser(_contact: Contact, _targetId: string, _count?: number): Promise<boolean>;
|
|
3444
3446
|
/**
|
|
3445
3447
|
* 获取 Cookies
|
|
3446
3448
|
* @param _domain The domain to get cookies from
|
|
@@ -10975,6 +10977,10 @@ interface NodeCustomMessage extends MessageBase {
|
|
|
10975
10977
|
user_id: string;
|
|
10976
10978
|
nickname: string;
|
|
10977
10979
|
content: OneBotMessage[];
|
|
10980
|
+
/** napcat拓展: 小卡片中间的外显 */
|
|
10981
|
+
news?: Array<{
|
|
10982
|
+
text: string;
|
|
10983
|
+
}>;
|
|
10978
10984
|
/** napcat拓展: 消息列表的外显 */
|
|
10979
10985
|
prompt?: string;
|
|
10980
10986
|
/** napcat拓展: 小卡片底下文本: 查看1条转发消息 */
|
|
@@ -12001,6 +12007,16 @@ interface OneBotMessageApi {
|
|
|
12001
12007
|
action: 'send_forward_msg';
|
|
12002
12008
|
params: {
|
|
12003
12009
|
messages: NodeMessage[];
|
|
12010
|
+
/** napcat拓展: 小卡片中间的外显 */
|
|
12011
|
+
news?: Array<{
|
|
12012
|
+
text: string;
|
|
12013
|
+
}>;
|
|
12014
|
+
/** napcat拓展: 消息列表的外显 */
|
|
12015
|
+
prompt?: string;
|
|
12016
|
+
/** napcat拓展: 小卡片底下文本: 查看1条转发消息 */
|
|
12017
|
+
summary?: string;
|
|
12018
|
+
/** napcat拓展: 小卡片标题 */
|
|
12019
|
+
source?: string;
|
|
12004
12020
|
};
|
|
12005
12021
|
response: {
|
|
12006
12022
|
message_id: string;
|
|
@@ -12015,6 +12031,16 @@ interface OneBotMessageApi {
|
|
|
12015
12031
|
params: {
|
|
12016
12032
|
group_id: number;
|
|
12017
12033
|
messages: NodeMessage[];
|
|
12034
|
+
/** napcat拓展: 小卡片中间的外显 */
|
|
12035
|
+
news?: Array<{
|
|
12036
|
+
text: string;
|
|
12037
|
+
}>;
|
|
12038
|
+
/** napcat拓展: 消息列表的外显 */
|
|
12039
|
+
prompt?: string;
|
|
12040
|
+
/** napcat拓展: 小卡片底下文本: 查看1条转发消息 */
|
|
12041
|
+
summary?: string;
|
|
12042
|
+
/** napcat拓展: 小卡片标题 */
|
|
12043
|
+
source?: string;
|
|
12018
12044
|
};
|
|
12019
12045
|
response: {
|
|
12020
12046
|
message_id: string;
|
|
@@ -12029,6 +12055,16 @@ interface OneBotMessageApi {
|
|
|
12029
12055
|
params: {
|
|
12030
12056
|
user_id: number;
|
|
12031
12057
|
messages: NodeMessage[];
|
|
12058
|
+
/** napcat拓展: 小卡片中间的外显 */
|
|
12059
|
+
news?: Array<{
|
|
12060
|
+
text: string;
|
|
12061
|
+
}>;
|
|
12062
|
+
/** napcat拓展: 消息列表的外显 */
|
|
12063
|
+
prompt?: string;
|
|
12064
|
+
/** napcat拓展: 小卡片底下文本: 查看1条转发消息 */
|
|
12065
|
+
summary?: string;
|
|
12066
|
+
/** napcat拓展: 小卡片标题 */
|
|
12067
|
+
source?: string;
|
|
12032
12068
|
};
|
|
12033
12069
|
response: {
|
|
12034
12070
|
message_id: string;
|
|
@@ -12212,7 +12248,8 @@ declare enum OneBotFriendApiAction {
|
|
|
12212
12248
|
nc_getFriendsWithCategory = "nc_get_friends_with_category",
|
|
12213
12249
|
nc_getDoubtFriendsAddRequest = "nc_get_doubt_friends_add_request",
|
|
12214
12250
|
nc_setDoubtFriendsAddRequest = "nc_set_doubt_friends_add_request",
|
|
12215
|
-
nc_friendPoke = "nc_friend_poke"
|
|
12251
|
+
nc_friendPoke = "nc_friend_poke",
|
|
12252
|
+
lgl_friendPoke = "lgl_friend_poke"
|
|
12216
12253
|
}
|
|
12217
12254
|
/**
|
|
12218
12255
|
* 好友相关 API
|
|
@@ -12452,6 +12489,15 @@ interface OneBotFriendApi {
|
|
|
12452
12489
|
};
|
|
12453
12490
|
response: null;
|
|
12454
12491
|
};
|
|
12492
|
+
/** Lagrange扩展: 好友戳一戳 */
|
|
12493
|
+
[OneBotFriendApiAction.lgl_friendPoke]: {
|
|
12494
|
+
action: 'friend_poke';
|
|
12495
|
+
params: {
|
|
12496
|
+
user_id?: number;
|
|
12497
|
+
target_id?: number;
|
|
12498
|
+
};
|
|
12499
|
+
response: null;
|
|
12500
|
+
};
|
|
12455
12501
|
}
|
|
12456
12502
|
|
|
12457
12503
|
declare enum OneBotGroupApiAction {
|
|
@@ -12465,6 +12511,7 @@ declare enum OneBotGroupApiAction {
|
|
|
12465
12511
|
setGroupName = "set_group_name",
|
|
12466
12512
|
setGroupLeave = "set_group_leave",
|
|
12467
12513
|
lgl_setGroupLeave = "lgl_set_group_leave",
|
|
12514
|
+
lgl_groupPoke = "group_poke",
|
|
12468
12515
|
setGroupSpecialTitle = "set_group_special_title",
|
|
12469
12516
|
getGroupInfo = "get_group_info",
|
|
12470
12517
|
getGroupList = "get_group_list",
|
|
@@ -12948,6 +12995,15 @@ interface OneBotGroupApi {
|
|
|
12948
12995
|
};
|
|
12949
12996
|
response: null;
|
|
12950
12997
|
};
|
|
12998
|
+
/** Lagrange拓展: 群内戳一戳 */
|
|
12999
|
+
[OneBotGroupApiAction.lgl_groupPoke]: {
|
|
13000
|
+
action: 'group_poke';
|
|
13001
|
+
params: {
|
|
13002
|
+
group_id: number;
|
|
13003
|
+
user_id: number;
|
|
13004
|
+
};
|
|
13005
|
+
response: null;
|
|
13006
|
+
};
|
|
12951
13007
|
/** NapCat拓展: 获取群信息扩展 */
|
|
12952
13008
|
[OneBotGroupApiAction.nc_getGroupInfoEx]: {
|
|
12953
13009
|
action: 'get_group_info_ex';
|
|
@@ -14388,9 +14444,17 @@ declare abstract class OneBotCore extends EventEmitter$1 {
|
|
|
14388
14444
|
/**
|
|
14389
14445
|
* GoCQ扩展: 发送合并转发消息
|
|
14390
14446
|
* @param messages - 消息节点列表
|
|
14447
|
+
* @param options - 外显参数
|
|
14391
14448
|
* @returns 消息ID
|
|
14392
14449
|
*/
|
|
14393
|
-
sendForwardMsg(messages: NodeMessage[]
|
|
14450
|
+
sendForwardMsg(messages: NodeMessage[], options?: {
|
|
14451
|
+
news?: Array<{
|
|
14452
|
+
text: string;
|
|
14453
|
+
}>;
|
|
14454
|
+
prompt?: string;
|
|
14455
|
+
summary?: string;
|
|
14456
|
+
source?: string;
|
|
14457
|
+
}): Promise<{
|
|
14394
14458
|
message_id: string;
|
|
14395
14459
|
forward_id: string;
|
|
14396
14460
|
res_id?: string;
|
|
@@ -14399,9 +14463,17 @@ declare abstract class OneBotCore extends EventEmitter$1 {
|
|
|
14399
14463
|
* GoCQ扩展: 发送合并转发(群聊)
|
|
14400
14464
|
* @param group_id - 群ID
|
|
14401
14465
|
* @param messages - 消息节点列表
|
|
14466
|
+
* @param options - 外显参数
|
|
14402
14467
|
* @returns 消息ID
|
|
14403
14468
|
*/
|
|
14404
|
-
sendGroupForwardMsg(group_id: number, messages: NodeMessage[]
|
|
14469
|
+
sendGroupForwardMsg(group_id: number, messages: NodeMessage[], options?: {
|
|
14470
|
+
news?: Array<{
|
|
14471
|
+
text: string;
|
|
14472
|
+
}>;
|
|
14473
|
+
prompt?: string;
|
|
14474
|
+
summary?: string;
|
|
14475
|
+
source?: string;
|
|
14476
|
+
}): Promise<{
|
|
14405
14477
|
message_id: string;
|
|
14406
14478
|
forward_id: string;
|
|
14407
14479
|
res_id?: string;
|
|
@@ -14410,9 +14482,17 @@ declare abstract class OneBotCore extends EventEmitter$1 {
|
|
|
14410
14482
|
* GoCQ扩展: 发送合并转发(好友)
|
|
14411
14483
|
* @param user_id - 用户ID
|
|
14412
14484
|
* @param messages - 消息节点列表
|
|
14485
|
+
* @param options - 外显参数
|
|
14413
14486
|
* @returns 消息ID
|
|
14414
14487
|
*/
|
|
14415
|
-
sendPrivateForwardMsg(user_id: number, messages: NodeMessage[]
|
|
14488
|
+
sendPrivateForwardMsg(user_id: number, messages: NodeMessage[], options?: {
|
|
14489
|
+
news?: Array<{
|
|
14490
|
+
text: string;
|
|
14491
|
+
}>;
|
|
14492
|
+
prompt?: string;
|
|
14493
|
+
summary?: string;
|
|
14494
|
+
source?: string;
|
|
14495
|
+
}): Promise<{
|
|
14416
14496
|
message_id: string;
|
|
14417
14497
|
forward_id: string;
|
|
14418
14498
|
res_id?: string;
|
|
@@ -14736,6 +14816,11 @@ declare abstract class OneBotCore extends EventEmitter$1 {
|
|
|
14736
14816
|
* @param target_id - 目标ID
|
|
14737
14817
|
*/
|
|
14738
14818
|
nc_friendPoke(user_id?: number, target_id?: number): Promise<null>;
|
|
14819
|
+
/** Lagrange扩展: 好友戳一戳
|
|
14820
|
+
* @param user_id - 用户ID
|
|
14821
|
+
* @param target_id - 目标ID
|
|
14822
|
+
*/
|
|
14823
|
+
lgl_friendPoke(user_id?: number, target_id?: number): Promise<null>;
|
|
14739
14824
|
/**
|
|
14740
14825
|
* 群组踢人
|
|
14741
14826
|
* @param group_id - 群ID
|
|
@@ -15085,6 +15170,11 @@ declare abstract class OneBotCore extends EventEmitter$1 {
|
|
|
15085
15170
|
* @param user_id - 用户ID
|
|
15086
15171
|
*/
|
|
15087
15172
|
nc_groupPoke(group_id: number, user_id: number): Promise<null>;
|
|
15173
|
+
/** Lagrange拓展: 群内戳一戳
|
|
15174
|
+
* @param group_id - 群ID
|
|
15175
|
+
* @param user_id - 用户ID
|
|
15176
|
+
*/
|
|
15177
|
+
lgl_groupPoke(group_id: number, user_id: number): Promise<null>;
|
|
15088
15178
|
/**
|
|
15089
15179
|
* NapCat拓展: 获取群信息扩展
|
|
15090
15180
|
* @param group_id - 群ID
|
|
@@ -16758,7 +16848,13 @@ declare class AdapterOneBot<T extends OneBotType> extends AdapterBase {
|
|
|
16758
16848
|
* @param create true为添加精华消息,false为删除精华消息 默认为true
|
|
16759
16849
|
*/
|
|
16760
16850
|
setGroupHighlights(_: string, messageId: string, create: boolean): Promise<void>;
|
|
16761
|
-
|
|
16851
|
+
/**
|
|
16852
|
+
* 戳一戳用户
|
|
16853
|
+
* @param _contact 事件来源
|
|
16854
|
+
* @param _targetId 被戳目标ID
|
|
16855
|
+
* @param _count 戳一戳次数,默认1
|
|
16856
|
+
*/
|
|
16857
|
+
pokeUser(_contact: Contact, _targetId: string, _count?: number): Promise<boolean>;
|
|
16762
16858
|
/**
|
|
16763
16859
|
* 设置好友请求结果
|
|
16764
16860
|
* @param requestId 请求事件ID
|
|
@@ -16783,11 +16879,11 @@ declare class AdapterOneBot<T extends OneBotType> extends AdapterBase {
|
|
|
16783
16879
|
*/
|
|
16784
16880
|
setInvitedJoinGroupResult(requestId: string, isApprove: boolean): Promise<void>;
|
|
16785
16881
|
/**
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16882
|
+
* 合并转发 karin -> adapter
|
|
16883
|
+
* @param elements 消息元素
|
|
16884
|
+
* @param options 首层小卡片外显参数
|
|
16885
|
+
* @returns 适配器消息元素
|
|
16886
|
+
*/
|
|
16791
16887
|
forwardKarinConvertAdapter(elements: Array<NodeElement>, options?: ForwardOptions): Array<NodeMessage>;
|
|
16792
16888
|
/**
|
|
16793
16889
|
* 发送合并转发消息
|