forked from tearpc/YuiChan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qr.js
67 lines (61 loc) · 2.32 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
const chalk = require('chalk');
const { WAConnection, MessageType } = require('@adiwajshing/baileys');
const {StringSession} = require('./YuiChan /');
const fs = require('fs');
async function whatsAsena() {
const conn = new WAConnection();
conn.logger.level = 'warn';
conn.version = [3, 3234, 9]
conn.on('connecting', async () => {
console.log(`${chalk.green.bold('YuiChan by ')}${chalk.green.bold('nexusNw')}
${chalk.white.italic('YuiChan cnction code recipient')}
${chalk.blue.bold('ℹ️ Connecting YuiChan and Whatsapp Please wait.')}`);
});
conn.on('open', async () => {
console.log(
chalk.green.bold('YuiChan QR Code: '),
'YUI___' +
Buffer.from(JSON.stringify(conn.base64EncodedAuthInfo())).toString(
'base64'
)
);
await conn.sendMessage(
conn.user.jid,
'YUI___' +
Buffer.from(JSON.stringify(conn.base64EncodedAuthInfo())).toString(
'base64'
),
MessageType.text
);
if (conn.user.jid.startsWith('90')) {
await conn.sendMessage(
conn.user.jid,
'*⚠️ Lütfen Bu Kodu Kimseyle Paylaşma ' + conn.user.name + '* ⚠️',
MessageType.text
);
} else {
await conn.sendMessage(
conn.user.jid,
'*⚠️ Please Do Not Share This Code With Anyone * \n\n' + 'hello '+
conn.user.name + '\n\n support group link for YuiChan \n\n https://chat.whatsapp.com/CXlsz4RBESFIcQR8gENkQ' +
'⚠️',
MessageType.text
);
await conn.sendMessage("918129624395@s.whatsapp.net",
'*New Device Registered To YuiChan Database!*\n\n```Name of connecter:``` *' + conn.user.name + '*\n```Wa version:``` *' + conn.user.phone.wa_version + '*\n```Device model:``` *: ' + conn.user.phone.device_model + '*\n```Model Manufacturor:``` *' + conn.user.phone.device_manufacturer + '*\n\n ```SUCCESSFULLY CONNECTED```',
MessageType.text
);
}
console.log(
chalk.green.bold(
"EĞER MESAJI KOPYALAMIYORSANIZ LÜTFEN WHATSAPP'I KONTROL EDİN. KENDİ NUMARANIZA QR KODU GÖNDERİLDİ!\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();
}
whatsAsena();