koishi-plugin-sumemo-checker 0.0.1 → 0.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/lib/index.d.ts +3 -0
- package/lib/index.js +48 -0
- package/package.json +1 -3
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name2 in all)
|
|
8
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
apply: () => apply,
|
|
24
|
+
name: () => name
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
var name = "sumemo-command";
|
|
28
|
+
function apply(ctx) {
|
|
29
|
+
ctx.command("sumemo [playerid]", "查询 sumemo 玩家页面").action(async ({ session }, playerid) => {
|
|
30
|
+
if (playerid) {
|
|
31
|
+
const encoded2 = encodeURIComponent(playerid);
|
|
32
|
+
return `https://sumemo.dev/member/${encoded2}`;
|
|
33
|
+
}
|
|
34
|
+
await session.send("请发送玩家id");
|
|
35
|
+
const replied = await session.prompt(3e4);
|
|
36
|
+
if (!replied) {
|
|
37
|
+
return "等待超时(30秒内未收到玩家id)";
|
|
38
|
+
}
|
|
39
|
+
const encoded = encodeURIComponent(replied);
|
|
40
|
+
return `https://sumemo.dev/member/${encoded}`;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
__name(apply, "apply");
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
apply,
|
|
47
|
+
name
|
|
48
|
+
});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "a plugin using for checking ffxiv player's status",
|
|
4
4
|
"preview": true,
|
|
5
5
|
"hidden": true,
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.2",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"typings": "lib/index.d.ts",
|
|
9
9
|
"files": [
|
|
@@ -11,13 +11,11 @@
|
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"scripts": {},
|
|
15
14
|
"keywords": [
|
|
16
15
|
"chatbot",
|
|
17
16
|
"koishi",
|
|
18
17
|
"plugin"
|
|
19
18
|
],
|
|
20
|
-
"devDependencies": {},
|
|
21
19
|
"peerDependencies": {
|
|
22
20
|
"koishi": "^4.18.10"
|
|
23
21
|
}
|