koishi-plugin-xsxn-vue3 1.0.7 → 1.0.9
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 -2
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.js
CHANGED
|
@@ -88,9 +88,13 @@ async function apply(ctx, cfg) {
|
|
|
88
88
|
ctx.command("queryCookBook [name]").alias("食谱大全").alias("食谱").action((_, name2) => {
|
|
89
89
|
return getPage(cfg.url + `/queryCookBook?name=${name2}`, _.session);
|
|
90
90
|
});
|
|
91
|
-
ctx.command("queryLike [name]").alias("喜好").alias("
|
|
91
|
+
ctx.command("queryLike [name]").alias("喜好").alias("卡池").action((_, name2) => {
|
|
92
|
+
const specialChars = ["每", "与", ".", "增", "加", "等", "级", "的", "得", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "%", "$", "#", "@", "!", "&", "*", "(", ")", "+", "=", "<", ">", "{", "}", "[", "]", "|", "\\", "/"];
|
|
92
93
|
if (name2 == void 0 || name2.length == 0)
|
|
93
|
-
return "
|
|
94
|
+
return "参数不可为空,如:卡池+空格+六月";
|
|
95
|
+
if (name2.match(new RegExp(`[${specialChars.join("")}]`)))
|
|
96
|
+
return "兄弟,不要搞这种";
|
|
97
|
+
_.session.send("后续指令更新为·卡池·");
|
|
94
98
|
return getPage(cfg.url + `/queryCompanion?name=${name2}`, _.session);
|
|
95
99
|
});
|
|
96
100
|
ctx.command("queryTianzhu <name>").alias("天柱").action((_, name2) => {
|
package/package.json
CHANGED