From 179d3701fc45f55c806290d39609af739e6cee7c Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Wed, 30 Oct 2024 11:39:17 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20michat=E5=8E=BB=E9=99=A4group=20agent?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/bot/eventMsg.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/routes/bot/eventMsg.ts b/routes/bot/eventMsg.ts index c116863..3c796f8 100644 --- a/routes/bot/eventMsg.ts +++ b/routes/bot/eventMsg.ts @@ -121,6 +121,7 @@ const manageCMDMsg = (ctx: Context.Data) => { larkBody: { msgText, chatId }, } = ctx logger.info(`bot req text: ${msgText}`) + // 处理命令消息 if (msgText.trim() === "/id") { logger.info(`bot command is /id, chatId: ${chatId}`) @@ -128,13 +129,6 @@ const manageCMDMsg = (ctx: Context.Data) => { return } - // 选择群组信息 - if (msgText.trim().startsWith("/g")) { - logger.info(`bot command is /groupchat, chatId: ${chatId}`) - groupAgent(ctx) - return - } - // michat专属功能 if (app === "michat") { // 帮助 @@ -172,6 +166,13 @@ const manageCMDMsg = (ctx: Context.Data) => { return } + // 选择群组信息 + if (msgText.trim().startsWith("/g")) { + logger.info(`bot command is /groupchat, chatId: ${chatId}`) + groupAgent(ctx) + return + } + // 帮助 if (msgText.trim() === "/help") { logger.info(`bot command is /help, chatId: ${chatId}`)