-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
22 lines (18 loc) · 835 Bytes
/
app.js
File metadata and controls
22 lines (18 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const Zalo = require("zca-js").Zalo
const fs = require("fs")
const path = require("path");
const { MessageType } = require("zca-js");
async function startBot() {
const zalo = new Zalo();
const api = await zalo.login({
cookie: JSON.parse(fs.readFileSync(path.resolve("./cookies.json"), "utf-8")),
imei: "<imei>", //localStorage.getItem('sh_z_uuid')
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0",
}, {
selfListen: false, // mặc định false, lắng nghe sự kiện của bản thân
checkUpdate: true // mặc định true, kiểm tra update
});
const listener = api
listener.findUser("<phone>").then(res=>console.log(res)).catch(e=>console.log(e))
}
startBot()