onebots 0.2.1 → 0.2.3
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/lib/service/V11/action/friend.d.ts +2 -2
- package/lib/service/V11/action/friend.js +2 -2
- package/lib/service/V11/action/group.d.ts +17 -0
- package/lib/service/V11/action/group.js +21 -0
- package/lib/service/V12/action/friend.d.ts +6 -0
- package/lib/service/V12/action/friend.js +8 -0
- package/lib/service/V12/action/group.d.ts +7 -0
- package/lib/service/V12/action/group.js +7 -0
- package/lib/service/V12/index.js +1 -1
- package/package.json +2 -4
|
@@ -32,9 +32,9 @@ export declare class FriendAction {
|
|
|
32
32
|
area: string;
|
|
33
33
|
}>;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* 为指定用户点赞
|
|
36
36
|
* @param user_id {number} 用户id
|
|
37
37
|
* @param times 点赞次数
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
sendUserLike(this: OneBot<'V11'>, user_id: number, times?: number): Promise<boolean>;
|
|
40
40
|
}
|
|
@@ -43,11 +43,11 @@ class FriendAction {
|
|
|
43
43
|
return await this.client.getStrangerInfo(user_id);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* 为指定用户点赞
|
|
47
47
|
* @param user_id {number} 用户id
|
|
48
48
|
* @param times 点赞次数
|
|
49
49
|
*/
|
|
50
|
-
async
|
|
50
|
+
async sendUserLike(user_id, times) {
|
|
51
51
|
return this.client.sendLike(user_id, times);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -55,6 +55,23 @@ export declare class GroupAction {
|
|
|
55
55
|
* @param card {string} 名片信息,不传或传空串则为 删除名片
|
|
56
56
|
*/
|
|
57
57
|
setGroupCard(this: V11, group_id: number, user_id: number, card?: string): Promise<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* 设置群精华
|
|
60
|
+
* @param message_id 消息id
|
|
61
|
+
*/
|
|
62
|
+
setEssenceMessage(this: V11, message_id: string): Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* 群打卡
|
|
65
|
+
* @param group_id 群id
|
|
66
|
+
*/
|
|
67
|
+
sendGroupSign(this: V11, group_id: number): Promise<{
|
|
68
|
+
result: number;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* 移除群精华
|
|
72
|
+
* @param message_id
|
|
73
|
+
*/
|
|
74
|
+
deleteEssenceMessage(this: V11, message_id: string): Promise<string>;
|
|
58
75
|
/**
|
|
59
76
|
* 设置群名
|
|
60
77
|
* @param group_id {number} 群id
|
|
@@ -81,6 +81,27 @@ class GroupAction {
|
|
|
81
81
|
setGroupCard(group_id, user_id, card) {
|
|
82
82
|
return this.client.setGroupCard(group_id, user_id, card);
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* 设置群精华
|
|
86
|
+
* @param message_id 消息id
|
|
87
|
+
*/
|
|
88
|
+
setEssenceMessage(message_id) {
|
|
89
|
+
return this.client.setEssenceMessage(message_id);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 群打卡
|
|
93
|
+
* @param group_id 群id
|
|
94
|
+
*/
|
|
95
|
+
sendGroupSign(group_id) {
|
|
96
|
+
return this.client.pickGroup(group_id).sign();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 移除群精华
|
|
100
|
+
* @param message_id
|
|
101
|
+
*/
|
|
102
|
+
deleteEssenceMessage(message_id) {
|
|
103
|
+
return this.client.removeEssenceMessage(message_id);
|
|
104
|
+
}
|
|
84
105
|
/**
|
|
85
106
|
* 设置群名
|
|
86
107
|
* @param group_id {number} 群id
|
|
@@ -18,4 +18,10 @@ export declare class FriendAction {
|
|
|
18
18
|
message_id: string;
|
|
19
19
|
message: V12.Sendable;
|
|
20
20
|
}>;
|
|
21
|
+
/**
|
|
22
|
+
* 为指定用户点赞
|
|
23
|
+
* @param user_id {number} 用户id
|
|
24
|
+
* @param times 点赞次数
|
|
25
|
+
*/
|
|
26
|
+
sendUserLike(this: V12, user_id: number, times?: number): Promise<boolean>;
|
|
21
27
|
}
|
|
@@ -32,5 +32,13 @@ class FriendAction {
|
|
|
32
32
|
}
|
|
33
33
|
return await this.client.sendPrivateMsg(user_id, element, quote ? await this.client.getMsg(quote.data.message_id) : undefined);
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* 为指定用户点赞
|
|
37
|
+
* @param user_id {number} 用户id
|
|
38
|
+
* @param times 点赞次数
|
|
39
|
+
*/
|
|
40
|
+
async sendUserLike(user_id, times) {
|
|
41
|
+
return this.client.sendLike(user_id, times);
|
|
42
|
+
}
|
|
35
43
|
}
|
|
36
44
|
exports.FriendAction = FriendAction;
|
|
@@ -27,6 +27,13 @@ export declare class GroupAction {
|
|
|
27
27
|
* @param message_id
|
|
28
28
|
*/
|
|
29
29
|
deleteEssenceMessage(this: V12, message_id: string): Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* 群打卡
|
|
32
|
+
* @param group_id 群id
|
|
33
|
+
*/
|
|
34
|
+
sendGroupSign(this: V12, group_id: number): Promise<{
|
|
35
|
+
result: number;
|
|
36
|
+
}>;
|
|
30
37
|
/**
|
|
31
38
|
* 群禁言指定人
|
|
32
39
|
* @param group_id {number} 群id
|
|
@@ -49,6 +49,13 @@ class GroupAction {
|
|
|
49
49
|
deleteEssenceMessage(message_id) {
|
|
50
50
|
return this.client.removeEssenceMessage(message_id);
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* 群打卡
|
|
54
|
+
* @param group_id 群id
|
|
55
|
+
*/
|
|
56
|
+
sendGroupSign(group_id) {
|
|
57
|
+
return this.client.pickGroup(group_id).sign();
|
|
58
|
+
}
|
|
52
59
|
/**
|
|
53
60
|
* 群禁言指定人
|
|
54
61
|
* @param group_id {number} 群id
|
package/lib/service/V12/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onebots",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "基于icqq的多例oneBot实现",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16"
|
|
@@ -48,11 +48,9 @@
|
|
|
48
48
|
"/lib/*.yaml",
|
|
49
49
|
"/**/LICENSE"
|
|
50
50
|
],
|
|
51
|
-
"peerDependencies": {
|
|
52
|
-
"icqq": "latest"
|
|
53
|
-
},
|
|
54
51
|
"dependencies": {
|
|
55
52
|
"@koa/router": "^10.1.1",
|
|
53
|
+
"icqq": "^0.2.0",
|
|
56
54
|
"icqq-cq-enable": "^1.0.0",
|
|
57
55
|
"js-yaml": "^4.1.0",
|
|
58
56
|
"koa": "^2.13.4",
|