@onedevil405/baileys 1.5.0 → 1.7.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.
package/LICENSE CHANGED
@@ -1,4 +1,11 @@
1
+
2
+
1
3
  MIT License
2
4
 
3
- Copyright (c) 2026 717DEVTEAM
5
+ Copyright (c) 2026 @onedevil405
6
+
7
+ Hiermit wird jeder Person, die eine Kopie dieser Software und der zugehörigen Dokumentationen erhält, die Erlaubnis erteilt, uneingeschränkt zu nutzen, kopieren, ändern, zusammenzuführen, veröffentlichen, verbreiten, unterlizenzieren und/oder zu verkaufen, unter den folgenden Bedingungen:
8
+
9
+ - Der obige Urheberrechtshinweis und dieser Erlaubnishinweis müssen in allen Kopien oder wesentlichen Teilen der Software enthalten sein.
4
10
 
11
+ DIE SOFTWARE WIRD OHNE JEGLICHE GARANTIE, AUSDRÜCKLICH ODER STILLSCHWEIGEND, BEREITGESTELLT, EINSCHLIEßLICH DER GARANTIEN DER MARKTGÄNGIGKEIT, EIGNUNG FÜR EINEN BESTIMMTEN ZWECK UND NICHTVERLETZUNG. IN KEINEM FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER FÜR ANSPRÜCHE, SCHÄDEN ODER ANDERE HAFTUNGEN VERANTWORTLICH, OB IN EINER KLAGE AUS VERTRAG, DELIKT ODER ANDERWEITIG, DIE AUS, DURCH ODER IN VERBINDUNG MIT DER SOFTWARE ENTSTEHEN.
package/README.md CHANGED
@@ -1 +1,83 @@
1
- Welcome to Baileys
1
+ # @onedevil405/baileys – Forked WhatsApp Web Socket
2
+
3
+
4
+
5
+ Ein **angepasster Fork** von Baileys – ein schnelles, stabiles Node.js WhatsApp Web Socket Modul, jetzt mit:
6
+
7
+ - Automatischem **NPM-Update-Check** beim Import
8
+ - Konsolen-Kasten-Logo für Sessions
9
+ - Voller TypeScript-Unterstützung
10
+ - Optimiert für eigene Bots
11
+
12
+ ---
13
+
14
+ ## 📦 Installation
15
+
16
+ ```bash
17
+ npm install @onedevil405/baileys
18
+ # oder
19
+ yarn add @onedevil405/baileys
20
+
21
+
22
+ Schnellstart
23
+
24
+
25
+ import makeWASocket from '@onedevil405/baileys';
26
+
27
+ const sock = makeWASocket({
28
+ printQRInTerminal: true, // QR-Code direkt in der Konsole
29
+ auth: { creds: {} } // Auth-Daten oder session.json
30
+ });
31
+
32
+ const onConnectionUpdate = (update) => {
33
+ console.log(update);
34
+ };
35
+
36
+ const onMessagesUpsert = ({ messages }) => {
37
+ console.log('Neue Nachricht:', messages[0].message);
38
+ };
39
+
40
+ sock.ev.on('connection.update', onConnectionUpdate);
41
+ sock.ev.on('messages.upsert', onMessagesUpsert);
42
+
43
+ Nachrichten versenden
44
+
45
+ await sock.sendMessage(from, { text });
46
+ await sendReaction(from, msg, '✅');
47
+ ```
48
+
49
+ #📝 Features
50
+
51
+ WhatsApp Web Socket – Voll kompatibel mit WhatsApp Web
52
+
53
+ Automatischer Update-Check – Zeigt in der Konsole, wenn eine neue Version auf NPM verfügbar ist
54
+
55
+ Session-Kasten-Logo – Schöner Konsolen-Output mit chalk
56
+
57
+ Event-basiert – messages.upsert, connection.update usw.
58
+
59
+ Einfacher Einstieg – Nur importieren und starten
60
+
61
+ Eigene Message ID: 3A5STORMxxxxxxxV2
62
+
63
+
64
+ #💡 NPM Update Check
65
+
66
+ Beim Laden des Moduls prüft Baileys automatisch, ob eine neue Version auf NPM verfügbar ist.
67
+
68
+ Gelber Kasten für Updates
69
+
70
+ Rote Meldungen bei Fehlern
71
+
72
+ Wird direkt beim Import angezeigt
73
+
74
+ ╔════════════════════════════════════════════════════════╗
75
+ ║ UPDATE AVAILABLE! ║
76
+ ║ Aktuell: 1.0.0, Neu auf NPM: 1.1.0 ║
77
+ ╚════════════════════════════════════════════════════════╝
78
+
79
+ #⚠️ Hinweise
80
+
81
+ Benötigt Node.js >=16
82
+
83
+ chalk ist Pflicht für den Update-Log (npm install chalk)
package/lib/index.js CHANGED
@@ -8,4 +8,51 @@ export * from './WAM/index.js';
8
8
  export * from './WAUSync/index.js';
9
9
  export { makeWASocket };
10
10
  export default makeWASocket;
11
- //# sourceMappingURL=index.js.map
11
+
12
+ import https from 'https';
13
+ import { createRequire } from 'module';
14
+ import chalk from 'chalk';
15
+ const require = createRequire(import.meta.url);
16
+
17
+ // --- NPM Update Check im Kasten ---
18
+ (() => {
19
+ try {
20
+ const pkg = require('../package.json'); // Paket info
21
+ const localVersion = pkg.version;
22
+ const packageName = pkg.name;
23
+
24
+ https.get(`https://registry.npmjs.org/${packageName}/latest`, res => {
25
+ let data = '';
26
+ res.on('data', chunk => data += chunk);
27
+ res.on('end', () => {
28
+ try {
29
+ const latestVersion = JSON.parse(data).version;
30
+
31
+ const width = 60;
32
+ const topBottom = '═'.repeat(width);
33
+ let message;
34
+
35
+ if (latestVersion !== localVersion) {
36
+ message = `UPDATE AVAILABLE! Aktuell: ${localVersion}, Neu: ${latestVersion}`;
37
+ } else {
38
+ message = `Du nutzt die aktuelle Version: ${localVersion}`;
39
+ }
40
+
41
+ const paddedMsg = message.padStart((width + message.length)/2).padEnd(width);
42
+
43
+ console.log(chalk.yellow(`╔${topBottom}╗`));
44
+ console.log(chalk.yellow(`║${' '.repeat(width)}║`));
45
+ console.log(chalk.yellow(`║${chalk.bold.white(paddedMsg)}║`));
46
+ console.log(chalk.yellow(`║${' '.repeat(width)}║`));
47
+ console.log(chalk.yellow(`╚${topBottom}╝`));
48
+
49
+ } catch (err) {
50
+ console.error(chalk.red('Fehler beim Prüfen der NPM-Version:'), err);
51
+ }
52
+ });
53
+ }).on('error', err => console.error(chalk.red('NPM Request Fehler:'), err));
54
+
55
+ } catch (err) {
56
+ console.error(chalk.red('Fehler beim Laden der package.json vom Modul:'), err.message);
57
+ }
58
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onedevil405/baileys",
3
- "version": "1.5.0",
3
+ "version": "1.7.2",
4
4
  "type": "module",
5
5
  "description": "WebSocket Bibliothek für Whatsapp Automatisierungen",
6
6
  "keywords": ["whatsapp", "automation", "baileys"],
@@ -22,6 +22,7 @@
22
22
  "@cacheable/node-cache": "^1.4.0",
23
23
  "@hapi/boom": "^9.1.3",
24
24
  "async-mutex": "^0.5.0",
25
+ "chalk": "^4.1.2",
25
26
  "axios": "^1.6.0",
26
27
  "libsignal": "git+https://github.com/whiskeysockets/libsignal-node",
27
28
  "lru-cache": "^11.1.0",