fix: 修复Openclaw命令处理逻辑

This commit is contained in:
sliverp
2026-02-05 19:42:01 +08:00
parent 15ea067d8d
commit 6c0b8058ff
2 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@sliverp/qqbot",
"version": "1.3.7",
"version": "1.3.8",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -575,10 +575,15 @@ openclaw cron add \\
}
const userContent = event.content + attachmentInfo;
const messageBody = `【系统提示】\n${systemPrompts.join("\n")}\n\n【用户输入】\n${userContent}`;
let messageBody = `【系统提示】\n${systemPrompts.join("\n")}\n\n【用户输入】\n${userContent}`;
if(userContent.startsWith("/")){ // 保留Openclaw原始命令
messageBody = userContent
}
log?.info(`[qqbot:${account.accountId}] messageBody: ${messageBody}`);
const body = pluginRuntime.channel.reply.formatInboundEnvelope({
channel: "QQBot",
channel: "qqbot",
from: event.senderName ?? event.senderId,
timestamp: new Date(event.timestamp).getTime(),
body: messageBody,