fix(qqbot): require auth for bot-approve

This commit is contained in:
Vincent Koc
2026-04-23 10:43:22 -07:00
parent 604ce85ce0
commit 9694a4501f
3 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";
import { getFrameworkCommands } from "./slash-commands-impl.js";
describe("QQBot framework slash commands", () => {
it("routes bot-approve through the auth-gated framework registry", () => {
expect(getFrameworkCommands().map((command) => command.name)).toContain("bot-approve");
});
});

View File

@@ -746,6 +746,7 @@ export function registerApproveRuntimeGetter(
registerCommand({
name: "bot-approve",
description: "管理命令执行审批配置",
requireAuth: true,
usage: [
`/bot-approve 查看操作指引`,
`/bot-approve on 开启审批(白名单模式,推荐)`,