Ver Fonte

refactor: 移除 Command 接口中的 paramdata 字段

移除 Command 接口及其相关实现中的 paramdata 字段,以简化代码结构并减少不必要的元数据传递
枫林 há 3 meses atrás
pai
commit
7ee06c4ce7
3 ficheiros alterados com 0 adições e 3 exclusões
  1. 0 1
      src/interface/plugin.ts
  2. 0 1
      src/lib/Plugins.ts
  3. 0 1
      src/lib/decorators.ts

+ 0 - 1
src/interface/plugin.ts

@@ -39,7 +39,6 @@ export interface Command {
         sendText: boolean;  // 是否发送文本
         [key: string]: any; // 其他模板配置
     };
-    paramdata?: ParamMetadata[]; // 参数元数据
 }
 // 参数元数据接口
 export interface ParamMetadata {

+ 0 - 1
src/lib/Plugins.ts

@@ -603,7 +603,6 @@ export function runcod(cmd: string | string[], desc: string): MethodDecorator {
                 enabled: false,
                 sendText: true
             },
-            paramdata: paramMetadata.get(target.constructor.prototype[propertyKey]) || []
         };
 
         plugin.commands.push(command);

+ 0 - 1
src/lib/decorators.ts

@@ -226,7 +226,6 @@ export function runcod(cmd: string | string[], desc: string, config: CommandConf
                         sendText: IsTest, // 默认不发送文本,
                         ...(config.template || {})
                     },
-                    paramdata: paramMetadata.get(target.constructor.prototype[propertyKey]) || [],
                 };
 
                 plugin.commands.push(command);