For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/sapi/runtime/type-aliases/CommandEntry.md.
  • English
  • Type Alias: CommandEntry

    type CommandEntry = {
      callback: Function;
      permission: number | string;
      description: string;
      moduleId?: string;
      cost?: CommandCost;
      options?: CommandOptions;
    };

    Defined in: sapi/runtime/command.ts:123

    已注册指令的元数据与回调。

    Properties

    PropertyTypeDescriptionDefined in
    callbackFunction指令执行回调。sapi/runtime/command.ts:125
    permissionnumber | string所需权限等级(数字)或权限名(字符串)。sapi/runtime/command.ts:127
    descriptionstring指令说明(/c:help 展示)。sapi/runtime/command.ts:129
    moduleId?string所属模块 id;用于 moduleGuard 拦截已禁用模块。sapi/runtime/command.ts:131
    cost?CommandCost可选执行费用。sapi/runtime/command.ts:133
    options?CommandOptions原生命令别名与参数选项。sapi/runtime/command.ts:135