-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
二维码签到,只解析,不签到 #45
Labels
bug
Something isn't working
Comments
这看起来是另一种二维码签到,需要研究 |
照着这么改就ok了 diff --git a/handlers/attachGroupMessageHandler.ts b/handlers/attachGroupMessageHandler.ts
index a525bce..afd926e 100644
--- a/handlers/attachGroupMessageHandler.ts
+++ b/handlers/attachGroupMessageHandler.ts
@@ -29,7 +29,7 @@ export default (bot: Client) => bot.on('message.group', async data => {
const dec = await decodeQrCode(buf)
let message = '二维码解码:\n' + dec + '\n'
//解析签到参数
- const REGEX_ENC = /SIGNIN:.*aid=(\d+)&.*&enc=([\dA-F]+)/
+ const REGEX_ENC = /e\?.*id=(\d+)&.*&enc=([\dA-F]+)/
if (REGEX_ENC.test(dec)) {
const exec = REGEX_ENC.exec(dec)
message += `aid: ${exec[1]}\nenc: ${exec[2]}\n正在执行签到...`
@@ -48,7 +48,7 @@ export default (bot: Client) => bot.on('message.group', async data => {
else
data.reply(message)
} catch (e) {
- // data.reply(`二维码解码失败:${e}`)
+ data.reply(`二维码解码失败:${e}`)
}
}
else { |
应该是更新了一个格式
你可以发送 pr
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: