-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbot.js
37 lines (30 loc) · 1.09 KB
/
bot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"use strict"
const { createClient } = require("icqq")
const account = 0
const password = ""
const client = createClient({platform:3})
client.on("system.login.slider", () => {
console.log("输入ticket:")
process.stdin.once("data", (res) => client.submitSlider(res.toString().trim()))
})
client.on("system.login.qrcode", () => {
console.log("扫码完成后回车继续:")
process.stdin.once("data", () => client.login())
})
client.on("system.login.device", (e) => {
console.log("请选择验证方式:(1:短信验证 其他:扫码验证)")
process.stdin.once("data", (data) => {
if (data.toString().trim() === "1") {
client.sendSmsCode()
console.log("请输入手机收到的短信验证码:")
process.stdin.once("data", (res) => client.submitSmsCode(res.toString().trim()))
} else {
console.log("扫码完成后回车继续:" + e.url)
process.stdin.once("data", () => client.login())
}
})
})
client.login(account, password)
exports.client = client
require("./plugins/hello")
require("./plugins/online")