Browse Source

🐞 fix: 修复绑定未查重的问题

Pchen. 1 month ago
parent
commit
1afa37582e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/Lepao/Mcp.js

+ 6 - 0
lib/Lepao/Mcp.js

@@ -39,6 +39,12 @@ class Mcp {
                 return '缺少参数'
 
             this.logger.info(`MCP接收绑定账号请求:${sender},绑定码:${bind_code}`)
+            let selectSql = 'SELECT bot_account FROM lepao_extra WHERE bot_account = ?'
+            let selectRows = await db.query(selectSql, [sender])
+            if(!selectRows) return '系统出错,请稍后再试'
+            if(selectRows.length !== 0) return '您已绑定其他账号,请先解绑'
+
+
             let umo = `QQ2749761853:FriendMessage:${sender}`
             let sql = `
                 SELECT