koishi-plugin-oni-wiki-qq 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/lib/index.js +2 -20
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -92,7 +92,7 @@ function apply(ctx, config) {
92
92
  await (0, import_koishi.sleep)(500);
93
93
  const res = await getWiki(config.api);
94
94
  if (res.length == 0) {
95
- return `在Wiki里没找到或API查询超时或....`;
95
+ return `在Wiki里没找到或API查询超时,如有需要,请按照游戏内名称重新发起查询....`;
96
96
  }
97
97
  const title = [...res[0]];
98
98
  let itemUrl = [...res[1]];
@@ -105,25 +105,7 @@ function apply(ctx, config) {
105
105
  return `截图发生错误.请稍后重试..`;
106
106
  }
107
107
  } else {
108
- let [one = "萌新的骨头汤", two = "托德的女装", three = "鮟鱇鱼"] = title;
109
- session.send(
110
- `wiki里没有找到,你可以看看底下有没有你需要的,有,回复数字序号,没有,请等待查询超时减轻服务器压力.
111
- 1.${one}
112
- 2.${two}
113
- 3.${three}`
114
- );
115
- const awlist = [1, 2, 3];
116
- const awser = +(await session.prompt(50 * 1e3))?.replace(/\s+/g, "")?.slice(-1) || NaN;
117
- if (awlist.includes(awser)) {
118
- let res2 = await screenShot(itemUrl[awser - 1]);
119
- if (res2) {
120
- return (0, import_koishi.h)("img", { src: `${encodeURI(urlPath)}` });
121
- } else {
122
- return `截图发生错误.请稍后重试..`;
123
- }
124
- } else if (Number.isNaN(awser)) {
125
- return `您输入的选项有误,已完结本轮查询,如有需要,请重新发起查询.`;
126
- }
108
+ return `没有在wiki内找到${itemName},如有需要,请按照游戏内名称重新发起查询`;
127
109
  }
128
110
  async function getWiki(api) {
129
111
  return await ctx.http.get(api, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-oni-wiki-qq",
3
3
  "description": "缺氧wiki查询",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -15,6 +15,6 @@
15
15
  "plugin"
16
16
  ],
17
17
  "peerDependencies": {
18
- "koishi": "^4.17.10"
18
+ "koishi": "^4.17.11"
19
19
  }
20
20
  }