-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathqr.js
76 lines (64 loc) · 1.82 KB
/
qr.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* Copyright (C) 2021 Queen Amdi.
Licensed under the GPL-3.0 License;
you may not use this file except in compliance with the License.
Queen Amdi - Black Amda
*/
const chalk = require('chalk');
const {WAConnection} = require('@adiwajshing/baileys');
const {StringSession} = require('./queenamdi/');
const fs = require('fs');
async function queenAmdi () {
const conn = new WAConnection();
const Session = new StringSession();
conn.version = [2, 2126, 14]
conn.logger.level = 'warn';
conn.regenerateQRIntervalMs = 50000;
conn.on('🔄 connecting', async () => {
console.log(`${chalk.green.bold('Queen')}${chalk.blue.bold(' Amdi')}
${chalk.white.italic('Queen Amdi Sting session')}
${chalk.blue.italic('ℹ️ Connecting to Whatsapp... Please Wait.')}`);
});
conn.on('open', async () => {
console.log(
chalk.green.bold('Queen Amdi QR Code: '),
'AMDI;;;' +
Buffer.from(JSON.stringify(conn.base64EncodedAuthInfo())).toString(
'base64'
)
);
await conn.sendMessage(
conn.user.jid,
'AMDI;;;' +
Buffer.from(JSON.stringify(conn.base64EncodedAuthInfo())).toString(
'base64'
),
MessageType.text
);
if (conn.user.jid.startsWith('94')) {
await conn.sendMessage(
conn.user.jid,
'*⚠️ Meka denna epa katawath ' + conn.user.name + '* ⚠️',
MessageType.text
);
} else {
await conn.sendMessage(
conn.user.jid,
'*⚠️ Please Do Not Share This Code With Anyone ' +
conn.user.name +
'* ⚠️',
MessageType.text
);
}
console.log(
chalk.green.bold(
"Meka copy karanna bari nm whatsapp eke athi bn code eka awith!\n"
),
chalk.green.bold(
'IF YOU CANNOT COPY THE MESSAGE, PLEASE CHECK WHATSAPP. QR CODE SENT TO YOUR OWN NUMBER!'
)
);
process.exit(0);
});
await conn.connect();
}
queenAmdi()