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

code clean

上级 5be54ab3
...@@ -72,9 +72,12 @@ bot ...@@ -72,9 +72,12 @@ bot
.on('scan', (url, code) => { .on('scan', (url, code) => {
if (!/201|200/.test(String(code))) { if (!/201|200/.test(String(code))) {
const loginUrl = url.replace(/\/qrcode\//, '/l/') const loginUrl = url.replace(/\/qrcode\//, '/l/')
QrcodeTerminal.generate(loginUrl) QrcodeTerminal.generate(loginUrl, { small: true }, (qrcode: string) => {
console.log(qrcode)
console.log(url)
console.log(`[${code}] Scan QR Code above url to log in: `)
})
} }
console.log(`${url}\n[${code}] Scan QR Code above url to log in: `)
}) })
.on('message', async m => { .on('message', async m => {
try { try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册