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 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
@@ -4,7 +4,7 @@
4
4
  "contributors": [
5
5
  "StarFreedomX <starfreedomx@outlook.com>"
6
6
  ],
7
- "version": "0.16.1",
7
+ "version": "0.16.2",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
10
10
  "files": [
package/readme.md CHANGED
@@ -100,3 +100,4 @@ StarFreedomX机器人的小功能,自用
100
100
  | `0.15.0` | 自用rss获取推特原图 |
101
101
  | `0.16.0` | 新增自定义指令发送本地图片功能(其实网络图片也行) |
102
102
  | `0.16.1` | 删除无用的配置构型 |
103
+ | `0.16.2` | 互动发图功能允许在帮助菜单中隐藏自定义的指令 |