-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (27 loc) · 729 Bytes
/
index.js
File metadata and controls
31 lines (27 loc) · 729 Bytes
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
const qrcode = require("qrcode-terminal");
const { Client, LocalAuth } = require("whatsapp-web.js");
const client = new Client({
puppeteer: {
headless: true,
args: ["--no-sandbox", "--disable-setuid-sandbox"],
},
authStrategy: new LocalAuth(),
webVersionCache: {
type: "remote",
remotePath:
"https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2412.54.html",
},
});
client.on("qr", (qr) => {
qrcode.generate(qr, { small: true });
});
client.on("ready", () => {
console.log("Sistem Aktif!");
});
client.on("message", (message) => {
const msg = message.body.toLocaleLowerCase();
if (msg.startsWith(".test")) {
message.reply("Test");
}
});
client.initialize();