@onedevil405/baileys 1.5.0 → 1.7.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/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,84 @@
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
+ ```bash
24
+
25
+
26
+ import makeWASocket from '@onedevil405/baileys';
27
+
28
+ const sock = makeWASocket({
29
+ printQRInTerminal: true, // QR-Code direkt in der Konsole
30
+ auth: { creds: {} } // Auth-Daten oder session.json
31
+ });
32
+
33
+ const onConnectionUpdate = (update) => {
34
+ console.log(update);
35
+ };
36
+
37
+ const onMessagesUpsert = ({ messages }) => {
38
+ console.log('Neue Nachricht:', messages[0].message);
39
+ };
40
+
41
+ sock.ev.on('connection.update', onConnectionUpdate);
42
+ sock.ev.on('messages.upsert', onMessagesUpsert);
43
+
44
+ Nachrichten versenden
45
+
46
+ await sock.sendMessage(from, { text });
47
+ await sendReaction(from, msg, '✅');
48
+ ```
49
+
50
+ #📝 Features
51
+
52
+ WhatsApp Web Socket – Voll kompatibel mit WhatsApp Web
53
+
54
+ Automatischer Update-Check – Zeigt in der Konsole, wenn eine neue Version auf NPM verfügbar ist
55
+
56
+ Session-Kasten-Logo – Schöner Konsolen-Output mit chalk
57
+
58
+ Event-basiert – messages.upsert, connection.update usw.
59
+
60
+ Einfacher Einstieg – Nur importieren und starten
61
+
62
+ Eigene Message ID: 3A5STORMxxxxxxxV2
63
+
64
+
65
+ #💡 NPM Update Check
66
+
67
+ Beim Laden des Moduls prüft Baileys automatisch, ob eine neue Version auf NPM verfügbar ist.
68
+
69
+ Gelber Kasten für Updates
70
+
71
+ Rote Meldungen bei Fehlern
72
+
73
+ Wird direkt beim Import angezeigt
74
+
75
+ ╔════════════════════════════════════════════════════════╗
76
+ ║ UPDATE AVAILABLE! ║
77
+ ║ Aktuell: 1.0.0, Neu auf NPM: 1.1.0 ║
78
+ ╚════════════════════════════════════════════════════════╝
79
+
80
+ #⚠️ Hinweise
81
+
82
+ Benötigt Node.js >=16
83
+
84
+ 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.3",
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",