koishi-plugin-starfx-bot 0.16.1 → 0.16.2
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 +1 -0
- package/lib/index.js +2 -1
- package/package.json +1 -1
- package/readme.md +1 -0
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare let assetsDir: string;
|
|
|
5
5
|
export declare const starfxLogger: Logger;
|
|
6
6
|
export declare const repeatContextMap: Map<string, [string, number]>;
|
|
7
7
|
interface sendLocalImageConfigItem {
|
|
8
|
+
hiddenInHelp: boolean;
|
|
8
9
|
imgPath: string;
|
|
9
10
|
}
|
|
10
11
|
interface sendLocalImageConfigDict {
|
package/lib/index.js
CHANGED
|
@@ -582,6 +582,7 @@ var Config2 = import_koishi2.Schema.intersect([
|
|
|
582
582
|
}).description("特定回应功能"),
|
|
583
583
|
import_koishi2.Schema.object({
|
|
584
584
|
sendLocalImage: import_koishi2.Schema.dict(import_koishi2.Schema.object({
|
|
585
|
+
hiddenInHelp: import_koishi2.Schema.boolean(),
|
|
585
586
|
imgPath: import_koishi2.Schema.string()
|
|
586
587
|
})).role("table").description("特定指令发送本地图片功能,其中键是指令名称,imgPath是图片文件的绝对路径")
|
|
587
588
|
}),
|
|
@@ -694,7 +695,7 @@ function apply(ctx, cfg) {
|
|
|
694
695
|
});
|
|
695
696
|
}
|
|
696
697
|
for (const key in cfg.sendLocalImage) {
|
|
697
|
-
ctx.command(key).action(async ({ session }) => {
|
|
698
|
+
ctx.command(key, { hidden: cfg.sendLocalImage[key].hiddenInHelp }).action(async ({ session }) => {
|
|
698
699
|
if (detectControl(controlJson, session.guildId, "sendLocalImage") && detectControl(controlJson, session.guildId, key))
|
|
699
700
|
return import_koishi2.h.image(safeQuote(cfg.sendLocalImage[key].imgPath, false));
|
|
700
701
|
});
|
package/package.json
CHANGED
package/readme.md
CHANGED