koishi-plugin-xsxn-vue3 1.0.5 → 1.0.8
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 +23 -6
- package/package.json +1 -1
- package/readme.md +4 -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虫+空格+[虫名称、虫品质]" }, queryfish: { description: "鱼", examples: "用法:\n鱼+空格+[鱼名称、鱼品质]" }, queryinsectisland: { description: "虫岛", examples: "用法:\n虫岛+空格+[虫岛名称]" }, queryfishisland: { description: "鱼岛", examples: "用法:\n鱼岛+空格+[鱼岛名称]
|
|
26
|
+
module2.exports = { commands: { querycrop: { description: "作物", examples: "作物 <作物名称>" }, querycookbook: { description: "食谱", examples: "用法:\n食谱+空格+[可为空、食谱名称、食材]" }, querydispatch: { description: "派遣" }, queryinsect: { description: "虫", examples: "用法:\n虫+空格+[虫名称、虫品质]" }, queryfish: { description: "鱼", examples: "用法:\n鱼+空格+[鱼名称、鱼品质]" }, queryinsectisland: { description: "虫岛", examples: "用法:\n虫岛+空格+[虫岛名称]" }, queryfishisland: { description: "鱼岛", examples: "用法:\n鱼岛+空格+[鱼岛名称]" }, querylike: { description: "喜好", examples: "用法:\n喜好+空格+[可为空、角色名称]" }, querytianzhu: { description: "天柱", examples: "用法:\n天柱+空格+[天柱名称或者 怪名称 奖励名称]" }, queryproductiontool: { description: "设施", examples: "用法:\n设施+空格+[可升级设施名称]" } } };
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -56,7 +56,9 @@ async function apply(ctx, cfg) {
|
|
|
56
56
|
2.作物 西
|
|
57
57
|
3.鱼岛 七月
|
|
58
58
|
4.食谱 传说
|
|
59
|
-
5
|
|
59
|
+
5.喜好 杨戬
|
|
60
|
+
6.天柱 电母
|
|
61
|
+
7.设施 篝火`;
|
|
60
62
|
});
|
|
61
63
|
ctx.command("queryCrop <name>").alias("查作物").alias("作物").action((_, name2) => {
|
|
62
64
|
if (name2 == void 0 || name2.length == 0)
|
|
@@ -86,11 +88,26 @@ async function apply(ctx, cfg) {
|
|
|
86
88
|
ctx.command("queryCookBook [name]").alias("食谱大全").alias("食谱").action((_, name2) => {
|
|
87
89
|
return getPage(cfg.url + `/queryCookBook?name=${name2}`, _.session);
|
|
88
90
|
});
|
|
89
|
-
ctx.command("queryLike [name]").alias("喜好").alias("
|
|
91
|
+
ctx.command("queryLike [name]").alias("喜好").alias("卡池").action((_, name2) => {
|
|
90
92
|
if (name2 == void 0 || name2.length == 0)
|
|
91
|
-
return "
|
|
93
|
+
return "参数不可为空,如:卡池+空格+六月";
|
|
94
|
+
if (name2.match(/[0-9%]/))
|
|
95
|
+
return "兄弟,不要搞这种";
|
|
96
|
+
_.session.send("后续指令更新为·卡池·");
|
|
92
97
|
return getPage(cfg.url + `/queryCompanion?name=${name2}`, _.session);
|
|
93
98
|
});
|
|
99
|
+
ctx.command("queryTianzhu <name>").alias("天柱").action((_, name2) => {
|
|
100
|
+
if (name2 == void 0 || name2.length <= 1)
|
|
101
|
+
return "参数不可为空,如:天柱+空格+电母";
|
|
102
|
+
if (name2 == "铜币" || name2 == "灵石")
|
|
103
|
+
return "兄弟,不要搞这种";
|
|
104
|
+
return getPage(cfg.url + `/queryTianzhu?name=${name2}`, _.session);
|
|
105
|
+
});
|
|
106
|
+
ctx.command("queryProductionTool <name>").alias("设施").action((_, name2) => {
|
|
107
|
+
if (name2 == void 0 || name2.length <= 1)
|
|
108
|
+
return "参数不可为空,如:设施+空格+篝火";
|
|
109
|
+
return getPage(cfg.url + `/queryProductionTool?name=${name2}`, _.session);
|
|
110
|
+
});
|
|
94
111
|
async function getPage(url, session) {
|
|
95
112
|
let str = `数据响应中,请稍等...
|
|
96
113
|
`;
|
|
@@ -100,8 +117,8 @@ async function apply(ctx, cfg) {
|
|
|
100
117
|
}
|
|
101
118
|
session.send(str);
|
|
102
119
|
const page = await ctx.puppeteer.page();
|
|
103
|
-
await page.goto(url
|
|
104
|
-
waitUntil: "
|
|
120
|
+
await page.goto(`${url}&_t=${Date.now()}`, {
|
|
121
|
+
waitUntil: "networkidle0"
|
|
105
122
|
// 等待页面加载完成
|
|
106
123
|
});
|
|
107
124
|
const element = await page.$(".body");
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# koishi-plugin-xsxn-vue3
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/koishi-plugin-xsxn-vue3)
|
|
4
|
+
- ### 1.0.8
|
|
5
|
+
- 控制同伴搜索条件
|
|
6
|
+
- ### 1.0.7
|
|
7
|
+
- 新增天柱查询、设施升级查询
|
|
4
8
|
- ### 1.0.5
|
|
5
9
|
- 优化无数据返回
|
|
6
10
|
- ### 1.0.3
|