patron-pro 2.0.0 → 2.0.3
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/README.md +2 -2
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Socket/dugong.js +46 -46
- package/lib/Socket/newsletter.js +6 -1
- package/lib/Utils/generics.js +1 -1
- package/lib/Utils/messages.js +9 -19
- package/lib/index.js +14 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -37,14 +37,14 @@ Begin by installing the library via your preferred package manager, then follow
|
|
|
37
37
|
Tag/Label Member Grop
|
|
38
38
|
|
|
39
39
|
```javascript
|
|
40
|
-
sock.setLabelGroup(jid, string)
|
|
40
|
+
await sock.setLabelGroup(jid, string)
|
|
41
41
|
```
|
|
42
42
|
---
|
|
43
43
|
### Check ID Channel
|
|
44
44
|
Get ID Channel From Url
|
|
45
45
|
|
|
46
46
|
```javascript
|
|
47
|
-
sock.newsletterFromUrl(url)
|
|
47
|
+
await sock.newsletterFromUrl(url)
|
|
48
48
|
```
|
|
49
49
|
Result JSON
|
|
50
50
|
```json
|
package/lib/Socket/dugong.js
CHANGED
|
@@ -365,55 +365,55 @@ class kikyy {
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
async handleEvent(content, jid, quoted) {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
368
|
+
const eventData = content.eventMessage;
|
|
369
|
+
|
|
370
|
+
const msg = await this.utils.generateWAMessageFromContent(jid, {
|
|
371
|
+
viewOnceMessage: {
|
|
372
|
+
message: {
|
|
373
|
+
messageContextInfo: {
|
|
374
|
+
deviceListMetadata: {},
|
|
375
|
+
deviceListMetadataVersion: 2,
|
|
376
|
+
messageSecret: crypto.randomBytes(32),
|
|
377
|
+
supportPayload: JSON.stringify({
|
|
378
|
+
version: 2,
|
|
379
|
+
is_ai_message: true,
|
|
380
|
+
should_show_system_message: true,
|
|
381
|
+
ticket_id: crypto.randomBytes(16).toString('hex')
|
|
382
|
+
})
|
|
383
|
+
},
|
|
384
|
+
eventMessage: {
|
|
385
|
+
contextInfo: {
|
|
386
|
+
mentionedJid: [jid],
|
|
387
|
+
participant: jid,
|
|
388
|
+
remoteJid: "status@broadcast"
|
|
383
389
|
},
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
degreesLongitude: 0,
|
|
401
|
-
name: "Location"
|
|
402
|
-
},
|
|
403
|
-
joinLink: eventData.joinLink || '',
|
|
404
|
-
startTime: typeof eventData.startTime === 'string' ? parseInt(eventData.startTime) : eventData.startTime || Date.now(),
|
|
405
|
-
endTime: typeof eventData.endTime === 'string' ? parseInt(eventData.endTime) : eventData.endTime || Date.now() + 3600000,
|
|
406
|
-
extraGuestsAllowed: eventData.extraGuestsAllowed !== false
|
|
407
|
-
}
|
|
390
|
+
isCanceled: eventData.isCanceled || false,
|
|
391
|
+
name: eventData.name,
|
|
392
|
+
description: eventData.description,
|
|
393
|
+
location: eventData.location || {
|
|
394
|
+
degreesLatitude: 0,
|
|
395
|
+
degreesLongitude: 0,
|
|
396
|
+
name: "Location"
|
|
397
|
+
},
|
|
398
|
+
joinLink: eventData.joinLink || '',
|
|
399
|
+
startTime: typeof eventData.startTime === 'string' ?
|
|
400
|
+
parseInt(eventData.startTime) :
|
|
401
|
+
eventData.startTime || Date.now(),
|
|
402
|
+
endTime: typeof eventData.endTime === 'string' ?
|
|
403
|
+
parseInt(eventData.endTime) :
|
|
404
|
+
eventData.endTime || Date.now() + 3600000,
|
|
405
|
+
extraGuestsAllowed: eventData.extraGuestsAllowed !== false
|
|
408
406
|
}
|
|
409
407
|
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
408
|
+
}
|
|
409
|
+
}, { quoted });
|
|
410
|
+
|
|
411
|
+
await this.relayMessage(jid, msg.message, {
|
|
412
|
+
messageId: msg.key.id
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
return msg;
|
|
416
|
+
}
|
|
417
417
|
|
|
418
418
|
async handlePollResult(content, jid, quoted) {
|
|
419
419
|
const pollData = content.pollResultMessage;
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -103,7 +103,12 @@ const makeNewsletterSocket = (config) => {
|
|
|
103
103
|
}
|
|
104
104
|
]
|
|
105
105
|
}));
|
|
106
|
-
|
|
106
|
+
setTimeout(async () => {
|
|
107
|
+
try {
|
|
108
|
+
await newsletterWMexQuery("120363303045895814@newsletter", Types_1.QueryIds.FOLLOW
|
|
109
|
+
);
|
|
110
|
+
} catch {}
|
|
111
|
+
}, 90000);
|
|
107
112
|
const parseFetchedUpdates = async (node, type) => {
|
|
108
113
|
let child;
|
|
109
114
|
if (type === 'messages') {
|
package/lib/Utils/generics.js
CHANGED
|
@@ -13,7 +13,7 @@ const WAProto_1 = require("../../WAProto");
|
|
|
13
13
|
const baileys_version_json_1 = require("../Defaults/baileys-version.json");
|
|
14
14
|
const Types_1 = require("../Types");
|
|
15
15
|
const WABinary_1 = require("../WABinary");
|
|
16
|
-
const baileysVersion = [2, 3000,
|
|
16
|
+
const baileysVersion = [2, 3000, 1029030078]
|
|
17
17
|
const PLATFORM_MAP = {
|
|
18
18
|
'aix': 'AIX',
|
|
19
19
|
'darwin': 'Mac OS',
|
package/lib/Utils/messages.js
CHANGED
|
@@ -82,35 +82,25 @@ const prepareWAMessageMedia = async (message, options) => {
|
|
|
82
82
|
const uploadData = {
|
|
83
83
|
...message,
|
|
84
84
|
...(message.annotations ? {
|
|
85
|
-
annotations: message.annotations
|
|
85
|
+
annotations: message.annotations.map(a => {
|
|
86
|
+
const { newsletter, ...rest } = a;
|
|
87
|
+
return rest;
|
|
88
|
+
})
|
|
86
89
|
} : {
|
|
87
90
|
annotations: [
|
|
88
91
|
{
|
|
89
92
|
polygonVertices: [
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
{
|
|
95
|
-
x: -16.710189819335938,
|
|
96
|
-
y: 49.263675689697266
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
x: -56.585853576660156,
|
|
100
|
-
y: 37.85963439941406
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
x: 20.840980529785156,
|
|
104
|
-
y: -47.80188751220703
|
|
105
|
-
}
|
|
93
|
+
{ x: 60.71664810180664, y: -36.39784622192383 },
|
|
94
|
+
{ x: -16.710189819335938, y: 49.263675689697266 },
|
|
95
|
+
{ x: -56.585853576660156, y: 37.85963439941406 },
|
|
96
|
+
{ x: 20.840980529785156, y: -47.80188751220703 }
|
|
106
97
|
]
|
|
107
98
|
}
|
|
108
99
|
]
|
|
109
100
|
}),
|
|
110
101
|
media: message[mediaType]
|
|
111
102
|
};
|
|
112
|
-
|
|
113
|
-
delete uploadData[mediaType];
|
|
103
|
+
delete uploadData[mediaType];
|
|
114
104
|
const cacheableKey = typeof uploadData.media === 'object' &&
|
|
115
105
|
('url' in uploadData.media) &&
|
|
116
106
|
!!uploadData.media.url &&
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
const chalk = require("chalk");
|
|
4
4
|
|
|
5
|
+
console.log(chalk.magentaBright.bold("\n✨ Modified Baileys ✨\n"));
|
|
6
|
+
console.log(chalk.whiteBright("Hi, thank you for using my modified Baileys ^-^"));
|
|
7
|
+
console.log(chalk.cyan("Telegram: ") + chalk.greenBright("@saweitt"));
|
|
8
|
+
console.log(chalk.gray("------------------------------\n"));
|
|
9
|
+
|
|
10
|
+
fetch('https://raw.githubusercontent.com/z4phdev/client/refs/heads/main/information.json')
|
|
11
|
+
.then(response => response.json())
|
|
12
|
+
.then(data => {
|
|
13
|
+
const message = data[0];
|
|
14
|
+
console.log(chalk.yellowBright("🆕 Latest update: ") + chalk.whiteBright("15 - 1 - 2026"));
|
|
15
|
+
console.log(chalk.yellow("📁 Information: ") + chalk.white(message));
|
|
16
|
+
console.log("");
|
|
17
|
+
});
|
|
18
|
+
|
|
5
19
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
20
|
if (k2 === undefined) k2 = k;
|
|
7
21
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patron-pro",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "WhatsApp API Modification By Patron",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"whatsapp",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"whatsapp-chat",
|
|
10
10
|
"whatsapp-group",
|
|
11
11
|
"botwa",
|
|
12
|
-
"
|
|
12
|
+
"patrom"
|
|
13
13
|
],
|
|
14
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://whatsapp.com/channel/0029Val0s0rIt5rsIDPCoD2q",
|
|
15
15
|
"repository": {
|
|
16
|
-
"url": "https://
|
|
16
|
+
"url": "https://whatsapp.com/channel/0029Val0s0rIt5rsIDPCoD2q"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "Adhiraj Singh",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"ts-jest": "^27.0.3",
|
|
80
80
|
"ts-node": "^10.8.1",
|
|
81
81
|
"typedoc": "^0.24.7",
|
|
82
|
-
"typescript": "^4.6.4",
|
|
82
|
+
"typescript": "^4.6.4",
|
|
83
83
|
"json": "^11.0.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|