提交 a5829316 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

get rid of qrcode-generator in io-bot

上级 d539214c
......@@ -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()))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册