(text, event = null)
| 3252 | } |
| 3253 | |
| 3254 | async function executeIMessageCommand(text, event = null) { |
| 3255 | const command = String(text || "").trim().replace(/^\/+/, ""); |
| 3256 | const normalized = command.replace(/\s+/g, "").toLowerCase(); |
| 3257 | const remoteExecutionResult = await executeRemoteExecutionCommand(command, normalized); |
| 3258 | if (remoteExecutionResult) return remoteExecutionResult; |
| 3259 | if (/^(帮助|help|指令)$/.test(normalized)) { |
| 3260 | return { ok: true, summary: "Help sent", reply: [ |
| 3261 | "可用命令:", |
| 3262 | "/状态", |
| 3263 | "/私聊模型 模型名", |
| 3264 | "/私聊智能等级 low|medium|high|xhigh", |
| 3265 | "/QQ模型 模型名", |
| 3266 | "/QQ智能等级 low|medium|high|xhigh", |
| 3267 | "/额度", |
| 3268 | "/刷新额度", |
| 3269 | "/启动Codex", |
| 3270 | "/前台Codex", |
| 3271 | "/退出Codex", |
| 3272 | "/维护", |
| 3273 | "/记忆", |
| 3274 | "/交接", |
| 3275 | "/统一记忆状态", |
| 3276 | "/清除统一记忆", |
| 3277 | "/开启QQ", |
| 3278 | "/关闭QQ", |
| 3279 | "/开启iMessage", |
| 3280 | "/关闭iMessage", |
| 3281 | "/清空QQ记忆", |
| 3282 | "/清除记忆", |
| 3283 | "/白名单", |
| 3284 | "/加群 群号", |
| 3285 | "/删群 群号", |
| 3286 | "/联网开", |
| 3287 | "/联网关", |
| 3288 | "/代理状态", |
| 3289 | "/代理开", |
| 3290 | "/代理关", |
| 3291 | "/当前节点", |
| 3292 | "/节点列表 [关键词]", |
| 3293 | "/入口测速 [关键词]", |
| 3294 | "/节点检查", |
| 3295 | "/切换节点 目标", |
| 3296 | "/关闭背光", |
| 3297 | "/恢复背光", |
| 3298 | "/休眠", |
| 3299 | "/远程执行", |
| 3300 | "/确认", |
| 3301 | "/取消", |
| 3302 | "QQ群内:/关闭qq、/ban @用户、/unban @用户", |
| 3303 | "/帮助" |
| 3304 | ].join("\n") }; |
| 3305 | } |
| 3306 | if (/(开启|打开|启动)qq/.test(normalized)) { |
| 3307 | state.channels.qq = true; |
| 3308 | return { ok: true, summary: "QQ channel enabled", reply: "QQ 已开启。" }; |
| 3309 | } |
| 3310 | if (/(关闭|关掉|切断|停止).*(qq|qq群|监听qq)/.test(normalized) || /(qq|qq群|监听qq).*(关闭|关掉|切断|停止)/.test(normalized)) { |
| 3311 | state.channels.qq = false; |
no test coverage detected