diff --git a/bin/io-bot.js b/bin/io-bot.js index 9155fe538f744d0ec0dfd54c2d0d8d3fc310ba2c..1c4f8b0bf3844ce130819ee85379dec4f39c43f5 100644 --- a/bin/io-bot.js +++ b/bin/io-bot.js @@ -26,13 +26,7 @@ const bot = new Wechaty({ profile: 'io-bot' }) bot .on('login' , user => log.info('Bot', `${user.name()} logined`)) .on('logout' , user => log.info('Bot', `${user.name()} logouted`)) -.on('scan', ({url, code}) => { - if (!/201|200/.test(code)) { - let loginUrl = url.replace(/\/qrcode\//, '/l/') - require('qrcode-terminal').generate(loginUrl) - } - console.log(`${url}\n[${code}] Scan QR Code in above url to login: `) -}) +.on('scan' , ({url, code}) => console.log(`${url}\n[${code}] Scan QR Code in above url to login: `)) .on('message', m => { m.ready() .then(msg => log.info('Bot', 'recv: %s', msg.toStringEx()))