@nerxa/socketon 1.21.0 → 1.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +38 -13
- package/src/Socket/index.js +40 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nerxa/socketon",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "Nerxa socket / modded Baileys — interactive message, album, messageBuilder, newsletter, VoIP",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"@hapi/boom": "^9.1.3",
|
|
60
60
|
"@rexxhayanasi/wangcap-id-bridge": "^1.0.0",
|
|
61
61
|
"async-mutex": "^0.5.0",
|
|
62
|
+
"chalk": "^5.6.2",
|
|
62
63
|
"fflate": "^0.8.2",
|
|
63
64
|
"libsignal": "^6.0.0",
|
|
64
65
|
"lru-cache": "^11.2.6",
|
|
@@ -86,17 +87,41 @@
|
|
|
86
87
|
"sharp": "^0.35.0"
|
|
87
88
|
},
|
|
88
89
|
"peerDependenciesMeta": {
|
|
89
|
-
"@napi-rs/image": {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
"@napi-rs/image": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"@nekodb/client": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"audio-decode": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"better-sqlite3": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"fluent-ffmpeg": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"ioredis": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
108
|
+
"jimp": {
|
|
109
|
+
"optional": true
|
|
110
|
+
},
|
|
111
|
+
"link-preview-js": {
|
|
112
|
+
"optional": true
|
|
113
|
+
},
|
|
114
|
+
"mongodb": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"mysql2": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"pg": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"sharp": {
|
|
124
|
+
"optional": true
|
|
125
|
+
}
|
|
101
126
|
}
|
|
102
127
|
}
|
package/src/Socket/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
1
2
|
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults/index.js';
|
|
2
3
|
import { prepareModernMessageContent } from '../Utils/modern-messages.js';
|
|
3
4
|
import { makeNewsletterStatusFetcher, makeNewsletterStatusUpdatesFetcher, makeNewsletterStatusReactionSender, makeNewsletterStatusRevokeSender, makeNewsletterStatusSender } from '../Utils/newsletter-status.js';
|
|
@@ -6,7 +7,46 @@ import { makeCommunitiesSocket } from './communities.js';
|
|
|
6
7
|
import { makeEmailCoordinator } from './email.js';
|
|
7
8
|
import { makeMobileCoordinator } from './mobile.js';
|
|
8
9
|
|
|
10
|
+
|
|
11
|
+
let arrivalShown = false;
|
|
12
|
+
|
|
13
|
+
const showArrivalBanner = () => {
|
|
14
|
+
if (arrivalShown) return;
|
|
15
|
+
arrivalShown = true;
|
|
16
|
+
|
|
17
|
+
const printBanner = () => {
|
|
18
|
+
console.log(chalk.cyanBright('╔══════════════════════════════════════╗'));
|
|
19
|
+
console.log(chalk.cyanBright('║') + chalk.yellowBright.bold(' M A R C H E L ') + chalk.cyanBright('║'));
|
|
20
|
+
console.log(chalk.cyanBright('║') + chalk.yellowBright.bold(' T E C H ') + chalk.cyanBright('║'));
|
|
21
|
+
console.log(chalk.cyanBright('╚══════════════════════════════════════╝'));
|
|
22
|
+
console.log(chalk.blueBright(' ⎻͞⎼⎽͞᚜𒁂 WhatsApp Api ready 𒁂᚜⎽͞⎼⎻͞'));
|
|
23
|
+
console.log(chalk.gray(' ────────────────────────────────────'));
|
|
24
|
+
console.log(chalk.magentaBright(' Thankyou for using this baileys'));
|
|
25
|
+
console.log(chalk.redBright(' Developer : ') + chalk.whiteBright('Marchel Tech'));
|
|
26
|
+
console.log(chalk.greenBright(' Contact : ') + chalk.whiteBright('+44 7536 649895'));
|
|
27
|
+
console.log(chalk.gray('────────────────────────────────────────\\n'));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
if (!process.stdout?.isTTY) {
|
|
31
|
+
printBanner();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const frames = ['[ ]', '[██ ]', '[████ ]', '[██████ ]', '[████████ ]', '[██████████]'];
|
|
36
|
+
let frame = 0;
|
|
37
|
+
const timer = setInterval(() => {
|
|
38
|
+
process.stdout.write('\\r' + chalk.cyanBright(' Initializing Marchel Tech ' + frames[frame]));
|
|
39
|
+
frame += 1;
|
|
40
|
+
if (frame >= frames.length) {
|
|
41
|
+
clearInterval(timer);
|
|
42
|
+
process.stdout.write('\\n');
|
|
43
|
+
printBanner();
|
|
44
|
+
}
|
|
45
|
+
}, 90);
|
|
46
|
+
};
|
|
47
|
+
|
|
9
48
|
const makeWASocket = (config) => {
|
|
49
|
+
showArrivalBanner();
|
|
10
50
|
const newConfig = {
|
|
11
51
|
...DEFAULT_CONNECTION_CONFIG,
|
|
12
52
|
...config
|