koishi-plugin-xsxn-vue3 1.0.19 → 1.0.22
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.js +6 -25
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
23
23
|
// src/locales/zh-CN.yml
|
|
24
24
|
var require_zh_CN = __commonJS({
|
|
25
25
|
"src/locales/zh-CN.yml"(exports, module2) {
|
|
26
|
-
module2.exports = { commands: { querycrop: { description: "作物", examples: "作物 <作物名称>" }, querycookbook: { description: "食谱", examples: "用法:\n食谱+空格+[可为空、食谱名称、食材]" }, querydispatch: { description: "派遣" }, queryinsect: { description: "虫", examples: "用法:\n虫+空格+[
|
|
26
|
+
module2.exports = { commands: { querycrop: { description: "作物", examples: "作物 <作物名称>" }, querycookbook: { description: "食谱", examples: "用法:\n食谱+空格+[可为空、食谱名称、食材]" }, querydispatch: { description: "派遣" }, queryinsect: { description: "虫", examples: "用法:\n虫+空格+[虫名称、虫品质、时间、地点]+[可选排序参数0、1,排序默认为0 对应岛图鉴]" }, queryfish: { description: "鱼", examples: "用法:\n鱼+空格+[鱼名称、鱼品质、时间、地点] +[可选排序参数0、1,排序默认为0 对应岛图鉴]" }, querylike: { description: "卡池", examples: "用法:\n卡池+空格+[角色名称、描述]" }, querytianzhu: { description: "天柱", examples: "用法:\n天柱+空格+[天柱名称或者 怪名称 奖励名称]" }, queryproductiontool: { description: "设施", examples: "用法:\n设施+空格+[可升级设施名称、生产物品]" }, getactivity: { description: "活动", examples: "用法:\n直接发送指令 获取活动信息" }, queryanimal: { description: "动物", examples: "用法:\n动物+空格+[名称、产物]" }, querytreasure: { description: "法宝", examples: "用法:\n法宝+空格+[名称]" }, querybird: { description: "鸟", examples: "用法:\n直接发送指令 获取活动信息" } } };
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -60,34 +60,18 @@ async function apply(ctx, cfg) {
|
|
|
60
60
|
6.天柱 电母
|
|
61
61
|
7.设施 篝火`;
|
|
62
62
|
});
|
|
63
|
-
ctx.command("queryCrop
|
|
64
|
-
if (name2 == void 0 || name2.length == 0)
|
|
65
|
-
return "参数不可为空,如:作物+空格+西";
|
|
63
|
+
ctx.command("queryCrop [name]").alias("作物").action((_, name2) => {
|
|
66
64
|
return getPage(cfg.url + `/queryList?type=0&name=${name2}`, _.session);
|
|
67
65
|
});
|
|
68
|
-
ctx.command("queryInsect
|
|
69
|
-
|
|
70
|
-
return "参数不可为空,如:虫+空格+菜粉蝶、查虫+空格+传说";
|
|
71
|
-
return getPage(cfg.url + `/queryList?type=1&name=${name2}`, _.session);
|
|
66
|
+
ctx.command("queryInsect [name] [isSort]").alias("虫").action((_, name2, isSort) => {
|
|
67
|
+
return getPage(cfg.url + `/queryList?type=1&name=${name2}&isSort=${isSort}`, _.session);
|
|
72
68
|
});
|
|
73
|
-
ctx.command("queryFish
|
|
74
|
-
|
|
75
|
-
return "参数不可为空,如:鱼+空格+鲲、查虫+空格+传说";
|
|
76
|
-
return getPage(cfg.url + `/queryList?type=2&name=${name2}`, _.session);
|
|
69
|
+
ctx.command("queryFish [name] [isSort]").alias("鱼").action((_, name2, isSort) => {
|
|
70
|
+
return getPage(cfg.url + `/queryList?type=2&name=${name2}&isSort=${isSort}`, _.session);
|
|
77
71
|
});
|
|
78
72
|
ctx.command("queryBird [name]").alias("鸟").action((_, name2) => {
|
|
79
73
|
return getPage(cfg.url + `/queryBird?name=${name2}`, _.session);
|
|
80
74
|
});
|
|
81
|
-
ctx.command("queryInsectIsLand <name>").alias("虫岛").action((_, name2) => {
|
|
82
|
-
if (name2 == void 0 || name2.length == 0)
|
|
83
|
-
return "参数不可为空,如:虫岛+空格+六月";
|
|
84
|
-
return getPage(cfg.url + `/queryList?type=3&name=${name2}`, _.session);
|
|
85
|
-
});
|
|
86
|
-
ctx.command("queryFishIsLand <name>").alias("鱼岛").action((_, name2) => {
|
|
87
|
-
if (name2 == void 0 || name2.length == 0)
|
|
88
|
-
return "参数不可为空,如:鱼岛+空格+六月";
|
|
89
|
-
return getPage(cfg.url + `/queryList?type=4&name=${name2}`, _.session);
|
|
90
|
-
});
|
|
91
75
|
ctx.command("getActivity [name]").alias("活动").action(async () => {
|
|
92
76
|
try {
|
|
93
77
|
const res = await fetch("http://192.168.100.111:3747/api/activity");
|
|
@@ -105,11 +89,8 @@ async function apply(ctx, cfg) {
|
|
|
105
89
|
return getPage(cfg.url + `/queryCookBook?name=${name2}`, _.session);
|
|
106
90
|
});
|
|
107
91
|
ctx.command("queryLike [name]").alias("卡池").action((_, name2) => {
|
|
108
|
-
const specialChars = ["每", "与", ".", "增", "加", "等", "级", "的", "得", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "%", "$", "#", "@", "!", "&", "*", "(", ")", "+", "=", "<", ">", "{", "}", "[", "]", "|", "\\", "/"];
|
|
109
92
|
if (name2 == void 0 || name2.length == 0)
|
|
110
93
|
return "参数不可为空,如:卡池+空格+贡献";
|
|
111
|
-
if (name2.match(new RegExp(`[${specialChars.join("")}]`)))
|
|
112
|
-
return "兄弟,不要搞这种";
|
|
113
94
|
return getPage(cfg.url + `/queryCompanion?name=${name2}`, _.session);
|
|
114
95
|
});
|
|
115
96
|
ctx.command("queryTianzhu <name>").alias("天柱").action((_, name2) => {
|
package/package.json
CHANGED
package/readme.md
CHANGED