mioki 0.1.1 → 0.1.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/dist/index.cjs +2 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
- package/readme.md +6 -0
package/dist/index.cjs
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
let napcat_sdk = require("napcat-sdk");
|
|
2
1
|
|
|
3
2
|
//#region src/index.ts
|
|
4
|
-
|
|
5
|
-
const napcat = new napcat_sdk.NapCat({ token: "cdc93b212524c0c0a0a162f1edec347a" });
|
|
6
|
-
napcat.on("ws.open", async () => {
|
|
7
|
-
console.log("ws opened");
|
|
8
|
-
const group = await napcat.pickGroup(608391254);
|
|
9
|
-
console.log("group info:", group);
|
|
10
|
-
const friend = await napcat.pickFriend(1141284758);
|
|
11
|
-
console.log("friend info:", friend);
|
|
12
|
-
});
|
|
13
|
-
napcat.on("message.group", async (e) => {
|
|
14
|
-
console.log("[message]", JSON.stringify(e));
|
|
15
|
-
if (e.raw_message === "ping") return await e.reply("pong", true);
|
|
16
|
-
if (e.raw_message === "reaction") return e.addReaction("66");
|
|
17
|
-
if (e.raw_message === "recall") return await e.recall();
|
|
18
|
-
if (e.raw_message === "hi") await e.reply(napcat.segment.face(14));
|
|
19
|
-
});
|
|
20
|
-
await napcat.bootstrap();
|
|
21
|
-
}
|
|
3
|
+
function start() {}
|
|
22
4
|
|
|
23
5
|
//#endregion
|
|
24
|
-
exports.
|
|
6
|
+
exports.start = start;
|
|
25
7
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["export function start(): void {}\n"],"mappings":";;AAAA,SAAgB,QAAc"}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import { NapCat } from "napcat-sdk";
|
|
2
|
-
|
|
3
1
|
//#region src/index.ts
|
|
4
|
-
|
|
5
|
-
const napcat = new NapCat({ token: "cdc93b212524c0c0a0a162f1edec347a" });
|
|
6
|
-
napcat.on("ws.open", async () => {
|
|
7
|
-
console.log("ws opened");
|
|
8
|
-
const group = await napcat.pickGroup(608391254);
|
|
9
|
-
console.log("group info:", group);
|
|
10
|
-
const friend = await napcat.pickFriend(1141284758);
|
|
11
|
-
console.log("friend info:", friend);
|
|
12
|
-
});
|
|
13
|
-
napcat.on("message.group", async (e) => {
|
|
14
|
-
console.log("[message]", JSON.stringify(e));
|
|
15
|
-
if (e.raw_message === "ping") return await e.reply("pong", true);
|
|
16
|
-
if (e.raw_message === "reaction") return e.addReaction("66");
|
|
17
|
-
if (e.raw_message === "recall") return await e.recall();
|
|
18
|
-
if (e.raw_message === "hi") await e.reply(napcat.segment.face(14));
|
|
19
|
-
});
|
|
20
|
-
await napcat.bootstrap();
|
|
21
|
-
}
|
|
2
|
+
function start() {}
|
|
22
3
|
|
|
23
4
|
//#endregion
|
|
24
|
-
export {
|
|
5
|
+
export { start };
|
|
25
6
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["export function start(): void {}\n"],"mappings":";AAAA,SAAgB,QAAc"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mioki",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"description": "A simple NapCat OneBot v11 framework.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"onebot",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
26
|
"require": "./dist/index.cjs",
|
|
27
|
-
"import": "./dist/index.mjs"
|
|
28
|
-
"types": "./dist/index.d.ts"
|
|
27
|
+
"import": "./dist/index.mjs"
|
|
29
28
|
},
|
|
30
29
|
"./package.json": "./package.json"
|
|
31
30
|
},
|
|
@@ -34,7 +33,7 @@
|
|
|
34
33
|
"dependencies": {
|
|
35
34
|
"pino": "^10.1.0",
|
|
36
35
|
"pino-pretty": "^13.1.3",
|
|
37
|
-
"napcat-sdk": "0.1.
|
|
36
|
+
"napcat-sdk": "0.1.2"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
39
|
"tsdown": "^0.18.0",
|