惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

M
MIT News - Artificial intelligence
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
博客园 - Franky
腾讯CDC
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
V
V2EX
N
Netflix TechBlog - Medium
量子位
Jina AI
Jina AI
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
爱范儿
爱范儿
博客园 - 叶小钗
D
Docker
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(qqbot): unify slash command auth, c2cOnly gating, and...
cxyhhhhh · 2026-04-30 · via Recent Commits to openclaw:main

@@ -4,9 +4,40 @@ import { getPluginVersionString, resolveRuntimeServiceVersion } from "./state.js

44

const QQBOT_PLUGIN_GITHUB_URL = "https://github.com/openclaw/openclaw/tree/main/extensions/qqbot";

55

const QQBOT_UPGRADE_GUIDE_URL = "https://q.qq.com/qqbot/openclaw/upgrade.html";

667-

const GROUP_EXCLUDED = new Set(["bot-upgrade", "bot-clear-storage", "bot-streaming"]);

8-97

export function registerBasicBotCommands(registry: SlashCommandRegistry): void {

8+

registry.register({

9+

name: "bot-help",

10+

description: "查看所有内置命令",

11+

usage: [

12+

`/bot-help`,

13+

``,

14+

`查看所有可用的 QQBot 内置命令及其简要说明。`,

15+

`在命令后追加 ? 可查看详细用法。`,

16+

].join("\n"),

17+

handler: (ctx) => {

18+

const isGroup = ctx.type === "group";

19+

const lines = [`### QQBot 内置命令`, ``];

20+

for (const [name, cmd] of registry.getAllCommands()) {

21+

if (isGroup && cmd.c2cOnly) {

22+

continue;

23+

}

24+

lines.push(`<qqbot-cmd-input text="/${name}" show="/${name}"/> ${cmd.description}`);

25+

}

26+

lines.push(``, `> 插件版本 v${getPluginVersionString()}`);

27+

return lines.join("\n");

28+

},

29+

});

30+31+

registry.register({

32+

name: "bot-me",

33+

description: "查看当前发送者的账号ID",

34+

c2cOnly: true,

35+

usage: [`/bot-me`, ``, `显示当前发送者的账号ID`].join("\n"),

36+

handler: (ctx) => {

37+

return `你的账号ID:\`${ctx.senderId}\``;

38+

},

39+

});

40+1041

registry.register({

1142

name: "bot-ping",

1243

description: "测试 OpenClaw 与 QQ 之间的网络延迟",

@@ -39,6 +70,7 @@ export function registerBasicBotCommands(registry: SlashCommandRegistry): void {

3970

registry.register({

4071

name: "bot-version",

4172

description: "查看 QQBot 插件版本和 OpenClaw 框架版本",

73+

c2cOnly: true,

4274

usage: [`/bot-version`, ``, `查看当前 QQBot 插件版本和 OpenClaw 框架版本。`].join("\n"),

4375

handler: async () => {

4476

const frameworkVersion = resolveRuntimeServiceVersion();

@@ -55,31 +87,9 @@ export function registerBasicBotCommands(registry: SlashCommandRegistry): void {

5587

registry.register({

5688

name: "bot-upgrade",

5789

description: "查看 QQBot 升级指引",

90+

c2cOnly: true,

5891

usage: [`/bot-upgrade`, ``, `查看 QQBot 升级说明。`].join("\n"),

5992

handler: () =>

6093

[`📘 QQBot 升级指引:`, `[点击查看升级说明](${QQBOT_UPGRADE_GUIDE_URL})`].join("\n"),

6194

});

62-63-

registry.register({

64-

name: "bot-help",

65-

description: "查看所有内置命令",

66-

usage: [

67-

`/bot-help`,

68-

``,

69-

`查看所有可用的 QQBot 内置命令及其简要说明。`,

70-

`在命令后追加 ? 可查看详细用法。`,

71-

].join("\n"),

72-

handler: (ctx) => {

73-

const isGroup = ctx.type === "group";

74-

const lines = [`### QQBot 内置命令`, ``];

75-

for (const [name, cmd] of registry.getAllCommands()) {

76-

if (isGroup && GROUP_EXCLUDED.has(name)) {

77-

continue;

78-

}

79-

lines.push(`<qqbot-cmd-input text="/${name}" show="/${name}"/> ${cmd.description}`);

80-

}

81-

lines.push(``, `> 插件版本 v${getPluginVersionString()}`);

82-

return lines.join("\n");

83-

},

84-

});

8595

}