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}`)