zalojs
v2.0.15
Published
This is an API to control Zalo over the DevTools Protocol which is allow you to make a Client bot
Downloads
18
Readme
About The Project
ZaloJS is a unstable , unreliable , high-level scraping API designed for accessing data from Zalo, a popular messaging platform in Vietnam. This versatile tool provides developers with the means to extract various types of data from Zalo, enabling them to build applications, gather insights, and automate tasks effectively.
Use Cases
Chatbot Development: Develop chatbots capable of interacting with Zalo users, responding to messages, providing information, and executing tasks.
Automated Workflows: Streamline repetitive tasks by automating actions within the Zalo client, such as sending notifications or gathering data.
Example Use
$ npm i zalojs@latest
const { init } = require("zalojs");
const config = require("./config.json");
const Client = require("zalojs").default;
const prefix = "!";
(async () => {
const { browser, page } = await init({
groupName: config.gname,
groupSelector: config.gselector,
headless: config.headless,
});
const client = new Client(page);
client.on("message", (message) => {
message.forEach(async (element) => {
if (element.content === "Zalo") {
client.send({
message: "rac",
});
}
});
});
client.once("ready", () => {
console.log(`Bot is ready! ${client.user.name}`);
});
})();