koishi-plugin-xsxn-vue3 1.0.5 → 1.0.7

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 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鱼岛+空格+[鱼岛名称] " }, querylike: { 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)
@@ -91,6 +93,18 @@ async function apply(ctx, cfg) {
91
93
  return "参数不可为空,如:喜好+空格+六月";
92
94
  return getPage(cfg.url + `/queryCompanion?name=${name2}`, _.session);
93
95
  });
96
+ ctx.command("queryTianzhu <name>").alias("天柱").action((_, name2) => {
97
+ if (name2 == void 0 || name2.length <= 1)
98
+ return "参数不可为空,如:天柱+空格+电母";
99
+ if (name2 == "铜币" || name2 == "灵石")
100
+ return "兄弟,不要搞这种";
101
+ return getPage(cfg.url + `/queryTianzhu?name=${name2}`, _.session);
102
+ });
103
+ ctx.command("queryProductionTool <name>").alias("设施").action((_, name2) => {
104
+ if (name2 == void 0 || name2.length <= 1)
105
+ return "参数不可为空,如:设施+空格+篝火";
106
+ return getPage(cfg.url + `/queryProductionTool?name=${name2}`, _.session);
107
+ });
94
108
  async function getPage(url, session) {
95
109
  let str = `数据响应中,请稍等...
96
110
  `;
@@ -100,8 +114,8 @@ async function apply(ctx, cfg) {
100
114
  }
101
115
  session.send(str);
102
116
  const page = await ctx.puppeteer.page();
103
- await page.goto(url, {
104
- waitUntil: "domcontentloaded"
117
+ await page.goto(`${url}&_t=${Date.now()}`, {
118
+ waitUntil: "networkidle0"
105
119
  // 等待页面加载完成
106
120
  });
107
121
  const element = await page.$(".body");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-xsxn-vue3",
3
3
  "description": "查询工具与后端分离,无服务端,自用版本",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # koishi-plugin-xsxn-vue3
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/koishi-plugin-xsxn-vue3?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-xsxn-vue3)
4
+ - ### 1.0.7
5
+ - 新增天柱查询、设施升级查询
4
6
  - ### 1.0.5
5
7
  - 优化无数据返回
6
8
  - ### 1.0.3