koishi-plugin-oni-wiki-qq 0.3.3 → 0.3.4
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.d.ts +2 -1
- package/lib/index.js +8 -4
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Schema } from "koishi";
|
|
2
2
|
export declare const name = "oni-wiki-qq";
|
|
3
|
-
export declare const usage = "\n - 0.3.
|
|
3
|
+
export declare const usage = "\n - 0.3.4 \u6DFB\u52A0\u706B\u7BAD\u8BA1\u7B97\u5668\u5730\u5740\n - 0.3.3 \u6240\u6709\u7F51\u5740\u5904\u7406\n - 0.3.0 \u79FB\u9664\u8017\u5185\u5B58\u7684\u622A\u56FE\u90E8\u5206,\u4F7F\u7528\u955C\u50CF\u7AD9\u70B9\u7F51\u9875\n - 0.2.0 \u5C1D\u8BD5\u6DFB\u52A0 MWN \u5E93\n";
|
|
4
4
|
export interface Config {
|
|
5
5
|
api: string;
|
|
6
6
|
originalUrl: string;
|
|
@@ -8,6 +8,7 @@ export interface Config {
|
|
|
8
8
|
docUrl: string;
|
|
9
9
|
userName: string;
|
|
10
10
|
password: string;
|
|
11
|
+
Rocket_Calculator: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const Config: Schema<Config>;
|
|
13
14
|
export declare function apply(ctx: Context, config: Config): void;
|
package/lib/index.js
CHANGED
|
@@ -30,9 +30,8 @@ var import_koishi = require("koishi");
|
|
|
30
30
|
var import_mwn = require("mwn");
|
|
31
31
|
var name = "oni-wiki-qq";
|
|
32
32
|
var usage = `
|
|
33
|
+
- 0.3.4 添加火箭计算器地址
|
|
33
34
|
- 0.3.3 所有网址处理
|
|
34
|
-
- 0.3.2 网址加白处理
|
|
35
|
-
- 0.3.1 错别字修改
|
|
36
35
|
- 0.3.0 移除耗内存的截图部分,使用镜像站点网页
|
|
37
36
|
- 0.2.0 尝试添加 MWN 库
|
|
38
37
|
`;
|
|
@@ -42,7 +41,8 @@ var Config = import_koishi.Schema.object({
|
|
|
42
41
|
mirrorUrl: import_koishi.Schema.string().default("https://klei.vip/oni/usiz6d/").description("镜像站点网址"),
|
|
43
42
|
docUrl: import_koishi.Schema.string().default("klei.vip/oni/926f8b").description("大叔的文档地址"),
|
|
44
43
|
userName: import_koishi.Schema.string().description("机器人用户名"),
|
|
45
|
-
password: import_koishi.Schema.string().description("机器人密码")
|
|
44
|
+
password: import_koishi.Schema.string().description("机器人密码"),
|
|
45
|
+
Rocket_Calculator: import_koishi.Schema.string().description("火箭计算器地址").default("https://klei.vip/oni/t93o56")
|
|
46
46
|
});
|
|
47
47
|
function apply(ctx, config) {
|
|
48
48
|
const logger = ctx.logger;
|
|
@@ -55,7 +55,7 @@ function apply(ctx, config) {
|
|
|
55
55
|
return `请点击链接前往站点查看:
|
|
56
56
|
原站点: ${res.replace(
|
|
57
57
|
config.originalUrl,
|
|
58
|
-
"
|
|
58
|
+
"http://oni.wiki/"
|
|
59
59
|
)}
|
|
60
60
|
镜像站: ${res.replace(config.originalUrl, config.mirrorUrl)}`;
|
|
61
61
|
});
|
|
@@ -92,6 +92,10 @@ function apply(ctx, config) {
|
|
|
92
92
|
return `大叔的文档链接:
|
|
93
93
|
${config.docUrl}`;
|
|
94
94
|
});
|
|
95
|
+
ctx.command("RocketCalculator", "火箭计算器").alias("火箭计算器").action(async () => {
|
|
96
|
+
return `火箭计算器链接:
|
|
97
|
+
${config.Rocket_Calculator}`;
|
|
98
|
+
});
|
|
95
99
|
}
|
|
96
100
|
__name(apply, "apply");
|
|
97
101
|
// Annotate the CommonJS export names for ESM import in node:
|