koishi-plugin-xsxn-vue3 1.0.16 → 1.0.18
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 +26 -2
- package/package.json +2 -3
- 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鱼岛+空格+[鱼岛名称]" }, querylike: { description: "卡池", examples: "用法:\n卡池+空格+[可为空、角色名称]" }, querytianzhu: { description: "天柱", examples: "用法:\n天柱+空格+[天柱名称或者 怪名称 奖励名称]" }, queryproductiontool: { 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设施+空格+[可升级设施名称]" }, getactivity: { description: "活动" }, queryanimal: { description: "动物" }, querytreasure: { description: "法宝" } } };
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -85,7 +85,20 @@ async function apply(ctx, cfg) {
|
|
|
85
85
|
return "参数不可为空,如:鱼岛+空格+六月";
|
|
86
86
|
return getPage(cfg.url + `/queryList?type=4&name=${name2}`, _.session);
|
|
87
87
|
});
|
|
88
|
-
ctx.command("
|
|
88
|
+
ctx.command("getActivity [name]").alias("活动").action(async () => {
|
|
89
|
+
try {
|
|
90
|
+
const res = await fetch("http://192.168.100.111:3747/api/activity");
|
|
91
|
+
const json = await res.json();
|
|
92
|
+
if (!json.success)
|
|
93
|
+
return "接口返回错误";
|
|
94
|
+
const activity = json.data;
|
|
95
|
+
return activity;
|
|
96
|
+
} catch (err) {
|
|
97
|
+
console.error(err);
|
|
98
|
+
return "请求接口失败";
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
ctx.command("queryCookBook [name]").alias("食谱").action((_, name2) => {
|
|
89
102
|
return getPage(cfg.url + `/queryCookBook?name=${name2}`, _.session);
|
|
90
103
|
});
|
|
91
104
|
ctx.command("queryLike [name]").alias("卡池").action((_, name2) => {
|
|
@@ -108,6 +121,17 @@ async function apply(ctx, cfg) {
|
|
|
108
121
|
return "参数不可为空,如:设施+空格+篝火";
|
|
109
122
|
return getPage(cfg.url + `/queryProductionTool?name=${name2}`, _.session);
|
|
110
123
|
});
|
|
124
|
+
ctx.command("queryTreasure <name>").alias("法宝").action((_, name2) => {
|
|
125
|
+
if (name2 == void 0 || name2.length == 0)
|
|
126
|
+
return "参数不可为空,如:法宝+空格+羽";
|
|
127
|
+
return getPage(cfg.url + `/queryTreasure?name=${name2}`, _.session);
|
|
128
|
+
});
|
|
129
|
+
ctx.command("queryAnimal <name>").alias("动物").action((_, name2) => {
|
|
130
|
+
if (name2 == void 0 || name2.length == 0) {
|
|
131
|
+
name2 = "";
|
|
132
|
+
}
|
|
133
|
+
return getPage(cfg.url + `/queryAnimal?name=${name2}`, _.session);
|
|
134
|
+
});
|
|
111
135
|
async function getPage(url, session) {
|
|
112
136
|
let str = `数据响应中,请稍等...
|
|
113
137
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-xsxn-vue3",
|
|
3
3
|
"description": "查询工具与后端分离,无服务端,自用版本",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.18",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"scripts": {},
|
|
13
12
|
"keywords": [
|
|
14
13
|
"chatbot",
|
|
15
14
|
"koishi",
|
|
@@ -22,7 +21,7 @@
|
|
|
22
21
|
]
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
|
-
"koishi": "^4.18.
|
|
24
|
+
"koishi": "^4.18.9"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
27
|
"koishi-plugin-cron": "^3.1.0"
|
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.18
|
|
5
|
+
- 新增法宝查询和动物查询
|
|
6
|
+
- ### 1.0.17
|
|
7
|
+
- 添加活动获取
|
|
4
8
|
- ### 1.0.16
|
|
5
9
|
- 添加回复引用
|
|
6
10
|
- ### 1.0.15
|