koishi-plugin-sumemo-checker 0.0.1 → 0.0.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/index.d.ts +3 -0
- package/lib/index.js +50 -0
- package/package.json +1 -3
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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 链接").usage(
|
|
30
|
+
"输入玩家ID@区服,生成 sumemo.dev 的用户链接。此步骤不包含检测,信息不全时请前往 https://sumemo.dev/ 自行搜索"
|
|
31
|
+
).example("sumemo 丝瓜卡夫卡@拂晓之间").action(async ({ session }, playerid) => {
|
|
32
|
+
if (playerid) {
|
|
33
|
+
const encoded2 = encodeURIComponent(playerid);
|
|
34
|
+
return `https://sumemo.dev/member/${encoded2}`;
|
|
35
|
+
}
|
|
36
|
+
await session.send("请发送玩家id@区服");
|
|
37
|
+
const replied = await session.prompt(3e4);
|
|
38
|
+
if (!replied) {
|
|
39
|
+
return "等待超时(30秒内未收到回复)";
|
|
40
|
+
}
|
|
41
|
+
const encoded = encodeURIComponent(replied);
|
|
42
|
+
return `https://sumemo.dev/member/${encoded}`;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
__name(apply, "apply");
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
apply,
|
|
49
|
+
name
|
|
50
|
+
});
|
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.3",
|
|
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
|
}
|