@kotori-bot/kotori-plugin-adapter-onebot 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +166 -0
- package/README.md +78 -19
- package/lib/adapter.d.ts +15 -9
- package/lib/adapter.js +98 -77
- package/lib/api.d.ts +84 -47
- package/lib/api.js +218 -66
- package/lib/elements.d.ts +5 -7
- package/lib/elements.js +37 -25
- package/lib/index.d.ts +4 -0
- package/lib/index.js +20 -10
- package/lib/types.d.ts +10 -10
- package/lib/types.js +8 -10
- package/package.json +13 -6
- package/LICENSE +0 -674
package/lib/types.d.ts
CHANGED
|
@@ -163,13 +163,13 @@ export interface EventStatType {
|
|
|
163
163
|
last_message_time: number;
|
|
164
164
|
}
|
|
165
165
|
export type EventDataType = {
|
|
166
|
-
post_type
|
|
167
|
-
message_type
|
|
168
|
-
sub_type
|
|
169
|
-
request_type
|
|
170
|
-
notice_type
|
|
171
|
-
notice_notify_subtype
|
|
172
|
-
meta_event_type
|
|
166
|
+
post_type?: EventPostType;
|
|
167
|
+
message_type?: EventMessageType;
|
|
168
|
+
sub_type?: EventSubType;
|
|
169
|
+
request_type?: EventRequestType;
|
|
170
|
+
notice_type?: EventNoticeType;
|
|
171
|
+
notice_notify_subtype?: EventNoticeNotifySubType;
|
|
172
|
+
meta_event_type?: EventMetaEventsList;
|
|
173
173
|
time: number;
|
|
174
174
|
self_id: number;
|
|
175
175
|
message_: Message;
|
|
@@ -182,9 +182,9 @@ export type EventDataType = {
|
|
|
182
182
|
target_id?: number;
|
|
183
183
|
duration?: number;
|
|
184
184
|
sender: EventSenderType;
|
|
185
|
+
comment?: string;
|
|
186
|
+
flag?: string;
|
|
185
187
|
status: EventStatusType;
|
|
186
188
|
font: number | 0;
|
|
187
|
-
data?:
|
|
188
|
-
message_id?: number;
|
|
189
|
-
};
|
|
189
|
+
data?: Omit<EventDataType, 'data'>;
|
|
190
190
|
};
|
package/lib/types.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
* @Package @kotori-bot/kotori-plugin-adapter-onebot
|
|
3
|
+
* @Version 2.1.1
|
|
4
|
+
* @Author Hotaru <me@hotaru.icu>
|
|
5
|
+
* @Copyright 2024-2025 Hotaru. All rights reserved.
|
|
6
|
+
* @License BAN-ZHINESE-USING
|
|
7
|
+
* @Link https://github.com/kotorijs/kotori
|
|
8
|
+
* @Date 16:14:08
|
|
9
|
+
*/
|
|
12
10
|
"use strict";
|
|
13
11
|
var __defProp = Object.defineProperty;
|
|
14
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/package.json
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kotori-bot/kotori-plugin-adapter-onebot",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Adapter For Onebot
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "Adapter For Onebot 11",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"kotori",
|
|
8
8
|
"chatbot",
|
|
9
|
-
"kotori-plugin"
|
|
9
|
+
"kotori-plugin",
|
|
10
|
+
"onebot",
|
|
11
|
+
"onebot11",
|
|
12
|
+
"qq",
|
|
13
|
+
"liteloader",
|
|
14
|
+
"LiteLoaderNTQQ",
|
|
15
|
+
"NapCat",
|
|
16
|
+
"go-cqhttp"
|
|
10
17
|
],
|
|
11
|
-
"license": "
|
|
18
|
+
"license": "BAN-ZHINESE-USING",
|
|
12
19
|
"files": [
|
|
13
20
|
"lib",
|
|
14
21
|
"locales",
|
|
15
22
|
"LICENSE",
|
|
16
23
|
"README.md"
|
|
17
24
|
],
|
|
18
|
-
"author": "Hotaru <
|
|
25
|
+
"author": "Hotaru <me@hotaru.icu>",
|
|
19
26
|
"peerDependencies": {
|
|
20
|
-
"kotori-bot": "^1.
|
|
27
|
+
"kotori-bot": "^1.7.0"
|
|
21
28
|
},
|
|
22
29
|
"dependencies": {
|
|
23
30
|
"@types/ws": "^8.5.8",
|