waengine 1.0.7 → 1.0.9

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/FEATURES.md ADDED
@@ -0,0 +1,2354 @@
1
+ # 🚀 WAEngine - Alle Features im Überblick
2
+
3
+ > Die komplette Feature-Liste der mächtigsten WhatsApp Bot Library mit vollständigem Plugin-System
4
+
5
+ ---
6
+
7
+ ## 📋 Inhaltsverzeichnis
8
+
9
+ 1. [🎯 Drei APIs in einem](#-drei-apis-in-einem)
10
+ 2. [⚡ EasyBot Features](#-easybot-features)
11
+ 3. [🔥 Multi-Device System](#-multi-device-system)
12
+ 4. [💬 Message System](#-message-system)
13
+ 5. [🎭 Typing Indicator](#-typing-indicator)
14
+ 6. [👥 Group Management](#-group-management)
15
+ 7. [🛡️ Permission System](#️-permission-system)
16
+ 8. [📊 Statistics System](#-statistics-system)
17
+ 9. [🎯 Command System](#-command-system)
18
+ 10. [📊 Poll Integration](#-poll-integration)
19
+ 11. [🎧 Event System](#-event-system)
20
+ 12. [📱 QR Code System](#-qr-code-system)
21
+ 13. [🔧 Utility Functions](#-utility-functions)
22
+ 14. [🔐 Authentication](#-authentication)
23
+ 15. [💾 Storage System](#-storage-system)
24
+ 16. [🤖 AI Integration](#-ai-integration)
25
+ 17. [🌐 HTTP Client](#-http-client)
26
+ 18. [📅 Scheduler System](#-scheduler-system)
27
+ 19. [⏰ Waiting System](#-waiting-system)
28
+ 20. [🎭 Hidetag System](#-hidetag-system)
29
+ 21. [🎨 Sticker Creation](#-sticker-creation)
30
+ 22. [🎤 Visual Recording](#-visual-recording)
31
+ 23. [🔌 Plugin System](#-plugin-system) **NEU!**
32
+
33
+ ---
34
+
35
+ ## 🎯 Drei APIs in einem
36
+
37
+ ### **🟢 EasyBot - Für Anfänger**
38
+ ```javascript
39
+ import { quickBot } from "waengine";
40
+
41
+ quickBot()
42
+ .when("hello").reply("Hi! 👋")
43
+ .start();
44
+ ```
45
+ **Was es kann:**
46
+ - 3-Zeilen Bot Creation
47
+ - Action Chaining (jQuery-Style)
48
+ - Auto-Responses
49
+ - Template System
50
+ - Conditional Logic
51
+
52
+ ### **🔵 Advanced API - Für Profis**
53
+ ```javascript
54
+ import { WhatsAppClient } from "waengine";
55
+
56
+ const client = new WhatsAppClient();
57
+ client.setPrefix('!');
58
+ client.on('message', async (msg) => {
59
+ if (msg.text === 'hello') {
60
+ await msg.simulateTyping('Hello! How can I help?');
61
+ }
62
+ });
63
+ await client.connect();
64
+ ```
65
+ **Was es kann:**
66
+ - Vollkontrolle über alle Funktionen
67
+ - Event-basierte Architektur
68
+ - Custom Message Handling
69
+ - Advanced Features
70
+
71
+ ### **🟡 Multi-Device - Für Skalierung**
72
+ ```javascript
73
+ import { MultiWhatsAppClient } from "waengine";
74
+
75
+ const multiClient = new MultiWhatsAppClient({
76
+ maxDevices: 3,
77
+ loadBalancing: 'round-robin'
78
+ });
79
+
80
+ await multiClient.addDevice('bot1');
81
+ await multiClient.addDevice('bot2');
82
+ await multiClient.connect();
83
+ ```
84
+ **Was es kann:**
85
+ - Mehrere WhatsApp Accounts gleichzeitig
86
+ - Load Balancing (Round-Robin, Random, Least-Used)
87
+ - Automatic Failover
88
+ - Health Monitoring
89
+
90
+ ---
91
+
92
+ ## ⚡ EasyBot Features
93
+
94
+ ### **Action Chaining**
95
+ ```javascript
96
+ createBot()
97
+ .when("important")
98
+ .react("⚠️") // Reaction
99
+ .type(2) // 2 Sekunden typing
100
+ .reply("Important!") // Antwort
101
+ .react("✅") // Weitere Reaction
102
+ .done() // Zurück zum Bot
103
+ ```
104
+
105
+ ### **Auto-Responses**
106
+ ```javascript
107
+ bot
108
+ .autoReply("hi", "Hello!")
109
+ .autoReply("bye", "Goodbye!")
110
+ ```
111
+
112
+ ### **Template System**
113
+ ```javascript
114
+ bot
115
+ .template("greeting", "Hello {name}! Today is {day}")
116
+ .when("welcome").useTemplate("greeting")
117
+ ```
118
+
119
+ **Verfügbare Variablen:**
120
+ - `{name}` - Sender Name
121
+ - `{sender}` - Sender JID
122
+ - `{time}` - Aktuelle Zeit
123
+ - `{date}` - Aktuelles Datum
124
+ - `{datetime}` - Datum + Zeit
125
+ - `{day}` - Wochentag
126
+ - `{chat}` - "Gruppe" oder "Privat"
127
+
128
+ ### **Conditional Logic**
129
+ ```javascript
130
+ bot
131
+ .if("is group").then("reply Hello group!")
132
+ .if("contains bot").then("react 🤖")
133
+ ```
134
+
135
+ ### **Multi-Device EasyBot**
136
+ ```javascript
137
+ multiBot(3) // 3 Devices
138
+ .when("test").reply("Multi-device test!")
139
+ .command("status", "📊 Multi-device running!")
140
+ .start();
141
+ ```
142
+
143
+ ---
144
+
145
+ ## 🔥 Multi-Device System
146
+
147
+ ### **Load Balancing Strategien**
148
+ ```javascript
149
+ // Round-robin (Standard)
150
+ multiClient.setLoadBalancingStrategy('round-robin');
151
+
152
+ // Zufällige Auswahl
153
+ multiClient.setLoadBalancingStrategy('random');
154
+
155
+ // Am wenigsten genutztes Device
156
+ multiClient.setLoadBalancingStrategy('least-used');
157
+ ```
158
+
159
+ ### **Smart Messaging**
160
+ ```javascript
161
+ // Load-balanced Sending
162
+ await multiClient.sendMessage(chatId, { text: 'Hello!' });
163
+
164
+ // Broadcast an alle Devices
165
+ await multiClient.broadcast(chatId, { text: 'Broadcast!' });
166
+
167
+ // Mit Failover (falls ein Device ausfällt)
168
+ await multiClient.sendWithFailover(chatId, { text: 'Failover!' });
169
+
170
+ // Spezifisches Device
171
+ await multiClient.sendFromDevice('bot1', chatId, { text: 'From Bot1!' });
172
+ ```
173
+
174
+ ### **Health Monitoring**
175
+ ```javascript
176
+ // Status abrufen
177
+ const status = multiClient.getStatus();
178
+ console.log(`${status.activeDevices}/${status.totalDevices} devices active`);
179
+
180
+ // Health Check
181
+ const health = multiClient.getHealthCheck();
182
+ console.log(`Health: ${health.healthPercentage}% - ${health.recommendation}`);
183
+ ```
184
+
185
+ ### **Multi-Device Events**
186
+ ```javascript
187
+ multiClient.on('message', async (msg) => {
188
+ console.log(`Message from device: ${msg.deviceId}`);
189
+
190
+ // Reply vom gleichen Device
191
+ await msg.replyFromSameDevice('Same device reply');
192
+
193
+ // Reply via Load Balancing
194
+ await msg.replyFromAnyDevice('Load balanced reply');
195
+
196
+ // Broadcast Reply
197
+ await msg.broadcastReply('Broadcast reply');
198
+ });
199
+ ```
200
+
201
+ ---
202
+
203
+ ## 💬 Message System
204
+
205
+ ### **Basic Messaging**
206
+ ```javascript
207
+ // Einfache Antwort
208
+ await msg.reply("Hello!")
209
+
210
+ // Mit Mentions
211
+ await msg.reply("Hello @user!", [userJid])
212
+ ```
213
+
214
+ ### **Media Messages**
215
+ ```javascript
216
+ // Bilder
217
+ await msg.sendImage("path/image.jpg", "Caption", [mentions])
218
+
219
+ // Videos
220
+ await msg.sendVideo("path/video.mp4", "Caption", [mentions])
221
+
222
+ // Audio
223
+ await msg.sendAudio("path/audio.mp3")
224
+
225
+ // Sticker
226
+ await msg.sendSticker("path/sticker.webp")
227
+
228
+ // Dokumente
229
+ await msg.sendDocument("path/file.pdf", "filename.pdf", [mentions])
230
+ ```
231
+
232
+ ### **Special Messages**
233
+ ```javascript
234
+ // Location
235
+ await msg.sendLocation(latitude, longitude)
236
+
237
+ // Contact
238
+ await msg.sendContact(vcard, "Display Name")
239
+
240
+ // Emoji Reaction
241
+ await msg.react("😂")
242
+
243
+ // Message löschen
244
+ await msg.delete()
245
+ ```
246
+
247
+ ### **Message Properties**
248
+ ```javascript
249
+ msg.id // Message ID
250
+ msg.from // Sender JID
251
+ msg.text // Message Text
252
+ msg.type // text, image, video, audio, etc.
253
+ msg.isGroup // true/false
254
+ msg.timestamp // Unix Timestamp
255
+ msg.raw // Raw Baileys Object
256
+ ```
257
+
258
+ ---
259
+
260
+ ## 🎭 Typing Indicator
261
+
262
+ ### **Manual Control**
263
+ ```javascript
264
+ // Start/Stop Typing
265
+ await msg.visualWrite(true) // Typing AN
266
+ await msg.visualWrite(false) // Typing AUS
267
+
268
+ // Typing für bestimmte Zeit
269
+ await msg.typeFor(3000) // 3 Sekunden typing
270
+ ```
271
+
272
+ ### **Typing + Reply Combined**
273
+ ```javascript
274
+ // Feste Zeit
275
+ await msg.typeAndReply("Message", 2000) // 2 Sekunden typing
276
+
277
+ // Realistisches Typing
278
+ await msg.simulateTyping("Long text...", {
279
+ typingSpeed: 50, // ms pro Zeichen
280
+ minTypingTime: 1000, // Minimum Zeit
281
+ maxTypingTime: 5000, // Maximum Zeit
282
+ mentions: [userJid] // Mit Mentions
283
+ })
284
+ ```
285
+
286
+ ### **Convenience Methods**
287
+ ```javascript
288
+ await msg.quickType("Text") // 1 Sekunde
289
+ await msg.normalType("Text") // 2 Sekunden
290
+ await msg.slowType("Text") // 4 Sekunden
291
+ await msg.realisticType("Text") // Basierend auf Textlänge
292
+ ```
293
+
294
+ ---
295
+
296
+ ## 👥 Group Management
297
+
298
+ ### **Group Information**
299
+ ```javascript
300
+ // Group Metadata
301
+ const metadata = await client.get.GroupMetadata(groupId)
302
+
303
+ // Alle Teilnehmer
304
+ const participants = await client.get.GroupParticipants(groupId)
305
+
306
+ // Nur Admins
307
+ const admins = await client.get.GroupAdmins(groupId)
308
+ ```
309
+
310
+ ### **User Management**
311
+ ```javascript
312
+ // User hinzufügen
313
+ await client.add.user(groupId, [userJid], [mentions])
314
+
315
+ // User entfernen
316
+ await client.kick.user(groupId, [userJid], [mentions])
317
+
318
+ // Zu Admin machen
319
+ await client.promote.user(groupId, [userJid], [mentions])
320
+
321
+ // Admin entfernen
322
+ await client.demote.user(groupId, [userJid], [mentions])
323
+ ```
324
+
325
+ ### **Mention System**
326
+ ```javascript
327
+ // Einzelne Person erwähnen
328
+ await msg.replyWithMention("Hello @user!", userJid)
329
+
330
+ // Alle in Gruppe erwähnen
331
+ await msg.mentionAll("Hello everyone!")
332
+
333
+ // Mentions aus Message abrufen
334
+ const mentions = msg.getMentions()
335
+
336
+ // Prüfen ob erwähnt
337
+ const isMentioned = msg.isMentioned(userJid)
338
+ ```
339
+
340
+ ---
341
+
342
+ ## 🛡️ Permission System
343
+
344
+ ### **Permission Checks**
345
+ ```javascript
346
+ // Admin Checks
347
+ const isAdmin = await msg.isAdmin() // Ist Sender Admin?
348
+ const isBotAdmin = await msg.isBotAdmin() // Ist Bot Admin?
349
+ const isOwner = await msg.isOwner() // Ist Sender Owner?
350
+
351
+ // Chat Type Checks
352
+ const isGroup = msg.isGroup // Ist Gruppe?
353
+ const isPrivate = msg.isPrivate() // Ist privater Chat?
354
+
355
+ // Sender Info
356
+ const senderJid = msg.getSender() // Sender JID
357
+ ```
358
+
359
+ ### **Usage in Commands**
360
+ ```javascript
361
+ client.addCommand('kick', async (msg, args) => {
362
+ if (!msg.isGroup) {
363
+ return msg.reply('❌ Nur in Gruppen!')
364
+ }
365
+
366
+ if (!(await msg.isAdmin())) {
367
+ return msg.reply('❌ Nur für Admins!')
368
+ }
369
+
370
+ if (!(await msg.isBotAdmin())) {
371
+ return msg.reply('❌ Bot braucht Admin-Rechte!')
372
+ }
373
+
374
+ // Kick Logic...
375
+ })
376
+ ```
377
+
378
+ ---
379
+
380
+ ## 📊 Statistics System
381
+
382
+ ### **Message Statistics**
383
+ ```javascript
384
+ // Message Counts
385
+ const stats = await msg.stats.getMessageCount()
386
+ // Returns: { total: 1234, today: 56, thisWeek: 234 }
387
+
388
+ // User Activity
389
+ const activity = await msg.stats.getUserActivity(userId)
390
+ // Returns: { messagesCount: 123, lastSeen: Date, isActive: true }
391
+
392
+ // Group Stats (nur Gruppen)
393
+ const groupStats = await msg.stats.getGroupStats()
394
+ // Returns: { groupName, totalMembers, admins, created, description }
395
+
396
+ // Top aktive User
397
+ const topUsers = await msg.stats.getMostActiveUsers(5)
398
+
399
+ // Messages nach Type
400
+ const messageTypes = await msg.stats.getMessagesByType()
401
+ // Returns: { text: 500, image: 100, video: 50, ... }
402
+ ```
403
+
404
+ ---
405
+
406
+ ## 🎯 Command System
407
+
408
+ ### **Prefix Setup**
409
+ ```javascript
410
+ // Global Prefix (Fallback)
411
+ const prefix = "!"
412
+ client.setPrefix(prefix)
413
+
414
+ // Chat-spezifische Prefixes (NEU in v1.0.7!)
415
+ client.setChatPrefix(chatId, "#") // Für spezifischen Chat
416
+ client.getChatPrefix(chatId) // Prefix abrufen
417
+ client.removeChatPrefix(chatId) // Prefix entfernen
418
+
419
+ // Commands registrieren
420
+ client.addCommand('help', async (msg, args) => {
421
+ await msg.reply('Help text')
422
+ })
423
+
424
+ client.addCommand('ping', async (msg, args) => {
425
+ await msg.reply('Pong! 🏓')
426
+ })
427
+ ```
428
+
429
+ ### **Chat-spezifische Prefixes (v1.0.7)**
430
+ ```javascript
431
+ // Setprefix Command (Admin only)
432
+ client.addCommand('setprefix', async (msg, args) => {
433
+ if (msg.isGroup && !(await msg.isAdmin())) {
434
+ return msg.reply('❌ Nur Admins können den Prefix ändern!');
435
+ }
436
+
437
+ const newPrefix = args[0];
438
+ client.setChatPrefix(msg.from, newPrefix);
439
+ await msg.reply(`✅ Prefix geändert zu: "${newPrefix}"`);
440
+ });
441
+
442
+ // Prefix Statistics
443
+ const stats = client.getPrefixStats();
444
+ const allPrefixes = client.getAllPrefixes();
445
+ ```
446
+
447
+ **Features:**
448
+ - ✅ **Persistent Storage** - Automatisch gespeichert in `./data/prefixes.json`
449
+ - ✅ **Admin-only Changes** - Nur Admins können Prefixes in Gruppen ändern
450
+ - ✅ **Validierung** - Max 5 Zeichen, keine Leerzeichen
451
+ - ✅ **Statistics** - Übersicht über alle verwendeten Prefixes
452
+ - ✅ **Fallback System** - Global Prefix als Standard
453
+
454
+ ### **Command Properties**
455
+ ```javascript
456
+ // In Message Events
457
+ if (msg.isCommand) {
458
+ console.log(msg.command) // "help"
459
+ console.log(msg.args) // ["arg1", "arg2"]
460
+ console.log(msg.commandText) // "help arg1 arg2"
461
+ }
462
+ ```
463
+
464
+ ### **Command Management**
465
+ ```javascript
466
+ // Commands auflisten
467
+ const commands = client.getCommands()
468
+
469
+ // Command entfernen
470
+ client.removeCommand('help')
471
+
472
+ // Prefix abrufen
473
+ const currentPrefix = client.getPrefix()
474
+ ```
475
+
476
+ ---
477
+
478
+ ## 📊 Poll Integration
479
+
480
+ ### **Polls erstellen**
481
+ ```javascript
482
+ // Einfache Poll
483
+ await msg.sendPoll('Favorite pizza?', ['Margherita', 'Pepperoni', 'Hawaiian'])
484
+
485
+ // Multi-Selection Poll
486
+ await msg.sendMultiPoll('Which colors?', ['Red', 'Blue', 'Green'], 2)
487
+ ```
488
+
489
+ ### **Fallback System**
490
+ Falls native Polls nicht funktionieren, verwendet die Library automatisch Emoji-Fallback:
491
+ ```
492
+ 📊 **Favorite pizza?**
493
+
494
+ 1️⃣ Margherita
495
+ 2️⃣ Pepperoni
496
+ 3️⃣ Hawaiian
497
+
498
+ _React with the corresponding emoji!_
499
+ ```
500
+
501
+ ---
502
+
503
+ ## 🎧 Event System
504
+
505
+ ### **Event Registration**
506
+ ```javascript
507
+ // Message Events
508
+ client.on('message', (msg) => {
509
+ console.log(`Message from ${msg.from}: ${msg.text}`)
510
+ })
511
+
512
+ // Command Events
513
+ client.on('command', (msg) => {
514
+ console.log(`Command: ${msg.command}`)
515
+ })
516
+
517
+ // Connection Events
518
+ client.on('connected', () => {
519
+ console.log('Connected!')
520
+ })
521
+
522
+ client.on('disconnected', (data) => {
523
+ console.log('Disconnected:', data.reason)
524
+ })
525
+
526
+ // Group Events
527
+ client.on('group.participants.update', (update) => {
528
+ console.log('Group changed:', update)
529
+ })
530
+
531
+ // Presence Events
532
+ client.on('presence.update', (update) => {
533
+ console.log('Status changed:', update)
534
+ })
535
+ ```
536
+
537
+ ### **Event Management**
538
+ ```javascript
539
+ // Event Handler entfernen
540
+ client.off('message', handler)
541
+
542
+ // Custom Event emittieren
543
+ client.emit('custom-event', data)
544
+ ```
545
+
546
+ ---
547
+
548
+ ## 📱 QR Code System
549
+
550
+ ### **QR Code Generation**
551
+ ```javascript
552
+ import { generateQRCode } from "waengine"
553
+
554
+ // QR Code generieren
555
+ await generateQRCode()
556
+
557
+ // QR Code mit Daten
558
+ await generateQRCode(qrData)
559
+
560
+ // Browser schließen
561
+ await closeBrowser()
562
+ ```
563
+
564
+ ### **Features**
565
+ - ✅ **Microsoft Edge Integration** - Automatisches Öffnen
566
+ - ✅ **Terminal Fallback** - QR im Terminal falls Browser fehlschlägt
567
+ - ✅ **Auto-Close** - Browser schließt automatisch nach Login
568
+
569
+ ---
570
+
571
+ ## 🔧 Utility Functions
572
+
573
+ ### **Connection Management**
574
+ ```javascript
575
+ // Verbinden
576
+ await client.connect()
577
+
578
+ // Trennen
579
+ await client.disconnect()
580
+
581
+ // Status abrufen
582
+ const state = client.getConnectionState()
583
+ // Returns: { isConnected: true, socket: true }
584
+ ```
585
+
586
+ ### **Presence Management**
587
+ ```javascript
588
+ // Global Presence
589
+ await client.setOnline()
590
+ await client.setOffline()
591
+ await client.setTyping(chatId)
592
+ await client.setRecording(chatId)
593
+ await client.setPaused(chatId)
594
+ ```
595
+
596
+ ### **Message Type Detection**
597
+ ```javascript
598
+ const type = client.getMessageType(message)
599
+ // Returns: text, image, video, audio, document, sticker, location, contact, unknown
600
+ ```
601
+
602
+ ---
603
+
604
+ ## 💾 Storage System
605
+
606
+ ### **Einfache Storage API**
607
+ ```javascript
608
+ // Schreiben
609
+ write.in("datei").data({name: "Lia", age: 25})
610
+ write.in("datei").set("key", "value")
611
+ write.in("datei").push("neuer eintrag")
612
+ write.in("datei").increment("counter", 1)
613
+
614
+ // Lesen
615
+ read.from("datei").all()
616
+ read.from("datei").get("key")
617
+ read.from("datei").keys()
618
+ read.from("datei").exists()
619
+
620
+ // Löschen
621
+ delete.from("datei").all()
622
+ delete.from("datei").key("key")
623
+ ```
624
+
625
+ ### **In Messages verfügbar**
626
+ ```javascript
627
+ client.on('message', async (msg) => {
628
+ // Direkt in Messages verwenden!
629
+ msg.write.in("users").set(msg.getSender(), "active");
630
+
631
+ const userData = msg.read.from("users").get(msg.getSender());
632
+
633
+ msg.delete.from("temp").key("old_data");
634
+ });
635
+ ```
636
+
637
+ ### **Storage Features**
638
+ - ✅ **Automatische JSON-Dateien** - Kein kompliziertes File-Handling
639
+ - ✅ **Nested Keys** - `"user.settings.theme"`
640
+ - ✅ **Array Support** - Push, Pop, Length
641
+ - ✅ **Increment/Decrement** - Counter ohne Lesen/Schreiben
642
+ - ✅ **Cache System** - Schneller Zugriff
643
+ - ✅ **Backup System** - Automatische Backups
644
+ - ✅ **Statistics** - File-Größen, Counts, etc.
645
+
646
+ ### **Beispiel-Anwendungen**
647
+ ```javascript
648
+ // User-Daten speichern
649
+ msg.write.in("users").set(`${userId}.coins`, 100);
650
+
651
+ // Counter System
652
+ msg.write.in("stats").increment("totalMessages", 1);
653
+
654
+ // Todo-Liste
655
+ msg.write.in("todos").push({
656
+ id: Date.now(),
657
+ task: "Bot fertigstellen",
658
+ user: userId
659
+ });
660
+
661
+ // Warn-System
662
+ msg.write.in("warnings").push(warnData);
663
+ msg.write.in("warn-counts").increment(userId, 1);
664
+ ```
665
+
666
+ ---
667
+
668
+ ## 🤖 AI Integration
669
+
670
+ ### **Chat Completion**
671
+ ```javascript
672
+ // Einfacher AI Chat
673
+ const answer = await client.ai.chat("Erkläre mir JavaScript");
674
+
675
+ // Mit Optionen
676
+ const response = await client.ai.chat("Schreibe ein Gedicht", {
677
+ model: 'gpt-4',
678
+ maxTokens: 300,
679
+ temperature: 0.8,
680
+ systemPrompt: 'Du bist ein kreativer Dichter'
681
+ });
682
+ ```
683
+
684
+ ### **Smart Responses**
685
+ ```javascript
686
+ // Intelligente Antworten basierend auf Kontext
687
+ const reply = await client.ai.smartReply(msg.text, {
688
+ isGroup: msg.isGroup,
689
+ userName: msg.getSender().split('@')[0]
690
+ });
691
+
692
+ await msg.reply(reply);
693
+ ```
694
+
695
+ ### **Text Analysis**
696
+ ```javascript
697
+ // Nachricht analysieren
698
+ const analysis = await client.ai.analyzeMessage(msg.text);
699
+ // Returns: { sentiment, language, category, toxicity, confidence }
700
+
701
+ if (analysis.toxicity === 'high') {
702
+ await msg.reply('⚠️ Bitte achte auf deine Sprache!');
703
+ }
704
+ ```
705
+
706
+ ### **Content Moderation**
707
+ ```javascript
708
+ // Automatische Moderation
709
+ const moderation = await client.ai.moderateContent(msg.text);
710
+
711
+ if (moderation.flagged) {
712
+ await msg.delete();
713
+ await msg.reply('❌ Nachricht wurde wegen unangemessenen Inhalts entfernt.');
714
+ }
715
+ ```
716
+
717
+ ### **Translation**
718
+ ```javascript
719
+ // Text übersetzen
720
+ const translated = await client.ai.translate("Hello World", "de");
721
+ // → "Hallo Welt"
722
+
723
+ // In Commands verwenden
724
+ client.addCommand('translate', async (msg, args) => {
725
+ const [lang, ...text] = args;
726
+ const translation = await client.ai.translate(text.join(' '), lang);
727
+ await msg.reply(`🌍 **Übersetzung:** ${translation}`);
728
+ });
729
+ ```
730
+
731
+ ### **Weitere AI Features**
732
+ ```javascript
733
+ // Text zusammenfassen
734
+ const summary = await client.ai.summarize(longText, 100);
735
+
736
+ // Fragen beantworten
737
+ const answer = await client.ai.answerQuestion("Was ist Node.js?");
738
+
739
+ // Kreativer Text
740
+ const story = await client.ai.generateText("Schreibe eine Geschichte über Roboter", "creative");
741
+ ```
742
+
743
+ ---
744
+
745
+ ## 🌐 HTTP Client
746
+
747
+ ### **Basic HTTP Methods**
748
+ ```javascript
749
+ // GET Request
750
+ const data = await client.http.get('https://api.example.com/data');
751
+
752
+ // POST Request
753
+ const result = await client.http.post('https://api.example.com/create', {
754
+ name: 'Test',
755
+ value: 123
756
+ });
757
+
758
+ // Mit Headers und Optionen
759
+ const response = await client.http.get('https://api.example.com/secure', {
760
+ headers: { 'Authorization': 'Bearer token' },
761
+ timeout: 5000
762
+ });
763
+ ```
764
+
765
+ ### **Weather API**
766
+ ```javascript
767
+ // Wetter abrufen
768
+ const weather = await client.http.getWeather("Berlin");
769
+
770
+ // Returns:
771
+ // {
772
+ // city: "Berlin",
773
+ // country: "DE",
774
+ // temperature: 15,
775
+ // description: "Bewölkt",
776
+ // humidity: 65,
777
+ // windSpeed: 3.2
778
+ // }
779
+
780
+ // In Commands verwenden
781
+ client.addCommand('wetter', async (msg, args) => {
782
+ const city = args.join(' ');
783
+ const weather = await client.http.getWeather(city);
784
+
785
+ await msg.reply(`🌤️ **${weather.city}**: ${weather.temperature}°C, ${weather.description}`);
786
+ });
787
+ ```
788
+
789
+ ### **News API**
790
+ ```javascript
791
+ // Aktuelle News
792
+ const articles = await client.http.getNews('technology');
793
+
794
+ // Returns Array:
795
+ // [
796
+ // {
797
+ // title: "News Titel",
798
+ // description: "Beschreibung...",
799
+ // url: "https://...",
800
+ // source: "Quelle",
801
+ // publishedAt: "31.1.2024"
802
+ // }
803
+ // ]
804
+ ```
805
+
806
+ ### **Crypto Prices**
807
+ ```javascript
808
+ // Kryptowährung-Preise
809
+ const price = await client.http.getCryptoPrice('bitcoin');
810
+
811
+ // Returns:
812
+ // {
813
+ // symbol: "bitcoin",
814
+ // priceEUR: 35420.50,
815
+ // priceUSD: 42150.30,
816
+ // change24h: "+2.45"
817
+ // }
818
+ ```
819
+
820
+ ### **URL Shortener**
821
+ ```javascript
822
+ // URL kürzen
823
+ const short = await client.http.shortenUrl('https://very-long-url.com');
824
+
825
+ // Returns:
826
+ // {
827
+ // shortUrl: "https://is.gd/abc123",
828
+ // longUrl: "https://very-long-url.com",
829
+ // service: "is.gd"
830
+ // }
831
+ ```
832
+
833
+ ### **Weitere HTTP Features**
834
+ ```javascript
835
+ // QR Code generieren
836
+ const qr = await client.http.generateQRCode("Hello World");
837
+
838
+ // Random Fact
839
+ const fact = await client.http.getRandomFact();
840
+
841
+ // Random Joke
842
+ const joke = await client.http.getRandomJoke();
843
+
844
+ // IP Information
845
+ const ipInfo = await client.http.getIPInfo("8.8.8.8");
846
+ ```
847
+
848
+ ---
849
+
850
+ ## 📅 Scheduler System
851
+
852
+ ### **Cron Scheduling**
853
+ ```javascript
854
+ // Cron-basierte Jobs
855
+ const jobId = client.scheduler.schedule(
856
+ '0 9 * * 1-5', // Werktags um 9:00
857
+ chatId,
858
+ 'Guten Morgen! Arbeitszeit! 💪'
859
+ );
860
+
861
+ // Mit Optionen
862
+ client.scheduler.schedule('0 18 * * *', chatId, 'Feierabend! 🎉', {
863
+ timezone: 'Europe/Berlin',
864
+ id: 'daily-reminder'
865
+ });
866
+ ```
867
+
868
+ ### **One-Time Scheduling**
869
+ ```javascript
870
+ // Einmalige Nachricht
871
+ const reminderDate = new Date('2024-12-31 23:59:00');
872
+ client.scheduler.scheduleOnce(
873
+ reminderDate,
874
+ chatId,
875
+ 'Happy New Year! 🎉'
876
+ );
877
+
878
+ // Erinnerung in X Minuten
879
+ const futureDate = new Date(Date.now() + 30 * 60 * 1000); // 30 Min
880
+ client.scheduler.scheduleOnce(futureDate, chatId, 'Erinnerung!');
881
+ ```
882
+
883
+ ### **Convenience Methods**
884
+ ```javascript
885
+ // Tägliche Nachricht
886
+ client.scheduler.daily('09:00', chatId, 'Guten Morgen! ☀️');
887
+
888
+ // Wöchentliche Nachricht
889
+ client.scheduler.weekly('monday', '18:00', chatId, 'Wochenstart! 💪');
890
+
891
+ // Monatliche Nachricht
892
+ client.scheduler.monthly(1, '12:00', chatId, 'Neuer Monat! 📅');
893
+ ```
894
+
895
+ ### **Template Variables**
896
+ ```javascript
897
+ // Nachrichten mit Variablen
898
+ client.scheduler.daily('09:00', chatId, 'Guten Morgen! Heute ist {day}, {date} um {time}');
899
+
900
+ // Verfügbare Variablen:
901
+ // {time} - Aktuelle Zeit
902
+ // {date} - Aktuelles Datum
903
+ // {datetime} - Datum + Zeit
904
+ // {day} - Wochentag
905
+ // {timestamp} - Unix Timestamp
906
+ ```
907
+
908
+ ### **Job Management**
909
+ ```javascript
910
+ // Job entfernen
911
+ client.scheduler.removeJob(jobId);
912
+
913
+ // Job pausieren/fortsetzen
914
+ client.scheduler.pauseJob(jobId);
915
+ client.scheduler.resumeJob(jobId);
916
+
917
+ // Alle Jobs auflisten
918
+ const jobs = client.scheduler.listJobs();
919
+
920
+ // Statistiken
921
+ const stats = client.scheduler.getStats();
922
+ // Returns: { activeJobs, totalJobs, cronJobs, onceJobs, totalExecuted }
923
+ ```
924
+
925
+ ### **Persistent Storage**
926
+ - ✅ **Auto-Save** - Jobs werden automatisch gespeichert
927
+ - ✅ **Auto-Restore** - Jobs werden beim Neustart wiederhergestellt
928
+ - ✅ **Cleanup** - Abgelaufene Jobs werden automatisch entfernt
929
+
930
+ ---
931
+
932
+ ## ⏰ Waiting System
933
+
934
+ ### **Die coole API die du wolltest!**
935
+ ```javascript
936
+ // In Messages verwenden
937
+ await msg.waiting.after.message(2000); // 2 Sekunden warten
938
+ await msg.reply("Nach 2 Sekunden!");
939
+
940
+ // In Commands
941
+ client.addCommand('demo', async (msg) => {
942
+ await msg.reply('Start...');
943
+ await msg.waiting.after.message(3000); // 3 Sekunden warten
944
+ await msg.reply('Nach 3 Sekunden!');
945
+ await msg.waiting.after.message(1000); // 1 Sekunde warten
946
+ await msg.reply('Fertig! 🎉');
947
+ });
948
+ ```
949
+
950
+ ### **Realistische Bot-Interaktionen**
951
+ ```javascript
952
+ client.addCommand('story', async (msg) => {
953
+ await msg.reply('📖 Ich erzähle dir eine Geschichte...');
954
+
955
+ await msg.waiting.after.message(2000);
956
+ await msg.reply('Es war einmal ein Roboter...');
957
+
958
+ await msg.waiting.after.message(3000);
959
+ await msg.reply('Der lernte, wie man WhatsApp Bots programmiert...');
960
+
961
+ await msg.waiting.after.message(2500);
962
+ await msg.reply('Und sie lebten glücklich bis ans Ende ihrer Tage! 🤖✨');
963
+ });
964
+ ```
965
+
966
+ ### **Mit Typing Indicator kombinieren**
967
+ ```javascript
968
+ client.addCommand('think', async (msg) => {
969
+ await msg.visualWrite(true); // Typing an
970
+ await msg.waiting.after.message(3000); // 3 Sekunden "denken"
971
+ await msg.visualWrite(false); // Typing aus
972
+
973
+ await msg.waiting.after.message(500); // Kurze Pause
974
+ await msg.reply('💡 Ich habe eine Idee!');
975
+ });
976
+ ```
977
+
978
+ ### **Flexible Zeitsteuerung**
979
+ ```javascript
980
+ // Verschiedene Wartezeiten
981
+ await msg.waiting.after.message(500); // 0.5 Sekunden
982
+ await msg.waiting.after.message(1000); // 1 Sekunde
983
+ await msg.waiting.after.message(5000); // 5 Sekunden
984
+ await msg.waiting.after.message(30000); // 30 Sekunden
985
+
986
+ // Dynamische Wartezeiten
987
+ const waitTime = Math.random() * 3000 + 1000; // 1-4 Sekunden
988
+ await msg.waiting.after.message(waitTime);
989
+ ```
990
+
991
+ ### **Perfekt für:**
992
+ - ✅ **Realistische Bot-Gespräche** - Menschenähnliche Pausen
993
+ - ✅ **Spannungsaufbau** - Dramatische Pausen in Geschichten
994
+ - ✅ **API-Wartezeiten** - Zeit für externe Requests
995
+ - ✅ **User Experience** - Natürliche Gesprächsrhythmen
996
+ - ✅ **Rate Limiting** - Vermeidung von Spam
997
+
998
+ ### **Persistent Authentication**
999
+ - ✅ **One-time QR Scan** → Immer auto-connect
1000
+ - ✅ **Microsoft Edge Integration** - QR Code im Browser
1001
+ - ✅ **Terminal Fallback** - QR Code im Terminal
1002
+ - ✅ **Auto-Reconnect** - Automatische Wiederverbindung
1003
+
1004
+ ```javascript
1005
+ const client = new WhatsAppClient({
1006
+ authDir: "./auth", // Auth Data Storage
1007
+ printQR: false, // QR im Browser (true = Terminal)
1008
+ logLevel: "silent" // Log Level
1009
+ });
1010
+ ```
1011
+
1012
+ ### **Session Management**
1013
+ ```javascript
1014
+ // Session Status
1015
+ const status = await client.getSessionStatus()
1016
+
1017
+ // Session Validierung
1018
+ const validation = await client.validateSession()
1019
+
1020
+ // Session bereinigen
1021
+ await client.cleanupSession()
1022
+
1023
+ // Session reparieren
1024
+ await client.repairSession()
1025
+
1026
+ // Session Backup
1027
+ await client.backupSession()
1028
+
1029
+ // Logout mit Auto-Cleanup
1030
+ await client.logout()
1031
+ ```
1032
+
1033
+ ### **Beispiel für einen Bot**
1034
+ ```javascript
1035
+ import { WhatsAppClient } from "waengine";
1036
+
1037
+ const client = new WhatsAppClient({
1038
+ printQR: true, // Sauberer Terminal QR
1039
+ logLevel: "silent" // Keine Baileys-Logs
1040
+ });
1041
+
1042
+ client.setPrefix("/");
1043
+ client.addCommand('ping', async (msg) => {
1044
+ await msg.react("🏓")
1045
+ await msg.reply('🏓 Pong!');
1046
+ });
1047
+
1048
+ await client.connect();
1049
+ // ✅ Verbunden! Sende Nachrichten zum Testen...
1050
+ ```
1051
+ ---
1052
+
1053
+ ## 🎮 Verfügbare Test Commands
1054
+
1055
+ - **`!help`** - Alle Commands anzeigen
1056
+ - **`!ping`** - Pong Response
1057
+ - **`!stats`** - Statistiken anzeigen
1058
+ - **`!kick @user`** - User kicken (nur Admin)
1059
+ - **`!debug`** - Debug Informationen
1060
+ - **`!poll "Question" "Opt1" "Opt2"`** - Poll erstellen
1061
+ - **`!demo`** - Typing Demo
1062
+ - **`!customtype 3000 "Text"`** - Custom Typing
1063
+ - **`!slowtype "Text"`** - Slow Typing
1064
+
1065
+ ---
1066
+
1067
+ ## 🔥 Feature Count: **125+ Funktionen!**
1068
+
1069
+ - **Message Functions:** 15+
1070
+ - **Group Functions:** 8+
1071
+ - **Permission Functions:** 6+
1072
+ - **Statistics Functions:** 5+
1073
+ - **Typing Functions:** 8+
1074
+ - **Command System:** 15+ ⬆️ (NEU: Chat-spezifische Prefixes)
1075
+ - **Event System:** 8+
1076
+ - **QR Functions:** 3+
1077
+ - **Utility Functions:** 15+
1078
+ - **Multi-Device System:** 20+
1079
+ - **🆕 EasyBot System:** 25+
1080
+ - **🆕 Prefix Management:** 5+ (NEU in v1.0.7)
1081
+
1082
+ ---
1083
+
1084
+ ## 🚀 Warum WAEngine wählen?
1085
+
1086
+ ### **🎯 Drei APIs in einem**
1087
+ - **EasyBot** - 3-Zeilen Bot Creation für Anfänger
1088
+ - **Advanced** - Vollkontrolle für Profis
1089
+ - **Multi-Device** - Skalierung mit mehreren Accounts
1090
+
1091
+ ### **🔥 Einzigartige Features**
1092
+ - **Multi-Device Load Balancing** - Industry First!
1093
+ - **Action Chaining** - jQuery-Style Bot Building
1094
+ - **Realistic Typing** - Menschenähnliche Interaktionen
1095
+ - **Edge QR Integration** - Nahtlose Authentifizierung
1096
+ - **Template System** - Dynamische Inhalte mit Variablen
1097
+
1098
+ ### **💪 Production Ready**
1099
+ - **Persistent Auth** - Einmalige Einrichtung
1100
+ - **Auto Reconnection** - Behandelt Verbindungsabbrüche
1101
+ - **Health Monitoring** - Device Status verfolgen
1102
+ - **Error Handling** - Graceful Failure Recovery
1103
+ - **TypeScript Support** - Vollständige Type Definitions
1104
+
1105
+ ### **📈 Skalierbare Architektur**
1106
+ - **Load Balancing** - Message Load verteilen
1107
+ - **Failover System** - Automatisches Device Switching
1108
+ - **Rate Limit Bypass** - Multiple Account Limits
1109
+ - **Plugin Ready** - Erweiterbar für v2.0
1110
+
1111
+ ---
1112
+
1113
+ *Made with ❤️ for WhatsApp Automation*
1114
+
1115
+ **Die mächtigste WhatsApp Bot Library - von 3-Zeilen-Bots bis zu Enterprise Multi-Device Systemen!**
1116
+
1117
+ ---
1118
+
1119
+ ## 🔐 Authentication
1120
+
1121
+ ### **Persistent Authentication**
1122
+ - ✅ **One-time QR Scan** → Immer auto-connect
1123
+ - ✅ **Microsoft Edge Integration** - QR Code im Browser
1124
+ - ✅ **Terminal Fallback** - QR Code im Terminal
1125
+ - ✅ **Auto-Reconnect** - Automatische Wiederverbindung
1126
+
1127
+ ```javascript
1128
+ const client = new WhatsAppClient({
1129
+ authDir: "./auth", // Auth Data Storage
1130
+ printQR: false, // QR im Browser (true = Terminal)
1131
+ logLevel: "silent" // Log Level
1132
+ });
1133
+ ```
1134
+
1135
+ ### **Session Management**
1136
+ ```javascript
1137
+ // Session Status
1138
+ const status = await client.getSessionStatus();
1139
+
1140
+ // Session Validierung
1141
+ const validation = await client.validateSession();
1142
+
1143
+ // Session bereinigen
1144
+ await client.cleanupSession();
1145
+
1146
+ // Session reparieren
1147
+ await client.repairSession();
1148
+
1149
+ // Session Backup
1150
+ await client.backupSession();
1151
+
1152
+ // Logout mit Auto-Cleanup
1153
+ await client.logout();
1154
+ ```
1155
+
1156
+ ---
1157
+
1158
+ ## 💾 Storage System
1159
+
1160
+ ### **Einfache Storage API**
1161
+ ```javascript
1162
+ // Schreiben
1163
+ write.in("datei").data({name: "Lia", age: 25})
1164
+ write.in("datei").set("key", "value")
1165
+ write.in("datei").push("neuer eintrag")
1166
+ write.in("datei").increment("counter", 1)
1167
+
1168
+ // Lesen
1169
+ read.from("datei").all()
1170
+ read.from("datei").get("key")
1171
+ read.from("datei").keys()
1172
+ read.from("datei").exists()
1173
+
1174
+ // Löschen
1175
+ delete.from("datei").all()
1176
+ delete.from("datei").key("key")
1177
+ ```
1178
+
1179
+ ### **In Messages verfügbar**
1180
+ ```javascript
1181
+ client.on('message', async (msg) => {
1182
+ // Direkt in Messages verwenden!
1183
+ msg.write.in("users").set(msg.getSender(), "active");
1184
+
1185
+ const userData = msg.read.from("users").get(msg.getSender());
1186
+
1187
+ msg.delete.from("temp").key("old_data");
1188
+ });
1189
+ ```
1190
+
1191
+ ### **Storage Features**
1192
+ - ✅ **Automatische JSON-Dateien** - Kein kompliziertes File-Handling
1193
+ - ✅ **Nested Keys** - `"user.settings.theme"`
1194
+ - ✅ **Array Support** - Push, Pop, Length
1195
+ - ✅ **Increment/Decrement** - Counter ohne Lesen/Schreiben
1196
+ - ✅ **Cache System** - Schneller Zugriff
1197
+ - ✅ **Backup System** - Automatische Backups
1198
+ - ✅ **Statistics** - File-Größen, Counts, etc.
1199
+
1200
+ ### **Beispiel-Anwendungen**
1201
+ ```javascript
1202
+ // User-Daten speichern
1203
+ msg.write.in("users").set(`${userId}.coins`, 100);
1204
+
1205
+ // Counter System
1206
+ msg.write.in("stats").increment("totalMessages", 1);
1207
+
1208
+ // Todo-Liste
1209
+ msg.write.in("todos").push({
1210
+ id: Date.now(),
1211
+ task: "Bot fertigstellen",
1212
+ user: userId
1213
+ });
1214
+
1215
+ // Warn-System
1216
+ msg.write.in("warnings").push(warnData);
1217
+ msg.write.in("warn-counts").increment(userId, 1);
1218
+ ```
1219
+
1220
+ ---
1221
+
1222
+ ## 🤖 AI Integration
1223
+
1224
+ ### **Chat Completion**
1225
+ ```javascript
1226
+ // Einfacher AI Chat
1227
+ const answer = await client.ai.chat("Erkläre mir JavaScript");
1228
+
1229
+ // Mit Optionen
1230
+ const response = await client.ai.chat("Schreibe ein Gedicht", {
1231
+ model: 'gpt-4',
1232
+ maxTokens: 300,
1233
+ temperature: 0.8,
1234
+ systemPrompt: 'Du bist ein kreativer Dichter'
1235
+ });
1236
+ ```
1237
+
1238
+ ### **Smart Responses**
1239
+ ```javascript
1240
+ // Intelligente Antworten basierend auf Kontext
1241
+ const reply = await client.ai.smartReply(msg.text, {
1242
+ isGroup: msg.isGroup,
1243
+ userName: msg.getSender().split('@')[0]
1244
+ });
1245
+
1246
+ await msg.reply(reply);
1247
+ ```
1248
+
1249
+ ### **Text Analysis**
1250
+ ```javascript
1251
+ // Nachricht analysieren
1252
+ const analysis = await client.ai.analyzeMessage(msg.text);
1253
+ // Returns: { sentiment, language, category, toxicity, confidence }
1254
+
1255
+ if (analysis.toxicity === 'high') {
1256
+ await msg.reply('⚠️ Bitte achte auf deine Sprache!');
1257
+ }
1258
+ ```
1259
+
1260
+ ### **Content Moderation**
1261
+ ```javascript
1262
+ // Automatische Moderation
1263
+ const moderation = await client.ai.moderateContent(msg.text);
1264
+
1265
+ if (moderation.flagged) {
1266
+ await msg.delete();
1267
+ await msg.reply('❌ Nachricht wurde wegen unangemessenen Inhalts entfernt.');
1268
+ }
1269
+ ```
1270
+
1271
+ ### **Translation**
1272
+ ```javascript
1273
+ // Text übersetzen
1274
+ const translated = await client.ai.translate("Hello World", "de");
1275
+ // → "Hallo Welt"
1276
+
1277
+ // In Commands verwenden
1278
+ client.addCommand('translate', async (msg, args) => {
1279
+ const [lang, ...text] = args;
1280
+ const translation = await client.ai.translate(text.join(' '), lang);
1281
+ await msg.reply(`🌍 **Übersetzung:** ${translation}`);
1282
+ });
1283
+ ```
1284
+
1285
+ ### **Weitere AI Features**
1286
+ ```javascript
1287
+ // Text zusammenfassen
1288
+ const summary = await client.ai.summarize(longText, 100);
1289
+
1290
+ // Fragen beantworten
1291
+ const answer = await client.ai.answerQuestion("Was ist Node.js?");
1292
+
1293
+ // Kreativer Text
1294
+ const story = await client.ai.generateText("Schreibe eine Geschichte über Roboter", "creative");
1295
+ ```
1296
+
1297
+ ---
1298
+
1299
+ ## 🌐 HTTP Client
1300
+
1301
+ ### **Basic HTTP Methods**
1302
+ ```javascript
1303
+ // GET Request
1304
+ const data = await client.http.get('https://api.example.com/data');
1305
+
1306
+ // POST Request
1307
+ const result = await client.http.post('https://api.example.com/create', {
1308
+ name: 'Test',
1309
+ value: 123
1310
+ });
1311
+
1312
+ // Mit Headers und Optionen
1313
+ const response = await client.http.get('https://api.example.com/secure', {
1314
+ headers: { 'Authorization': 'Bearer token' },
1315
+ timeout: 5000
1316
+ });
1317
+ ```
1318
+
1319
+ ### **Weather API**
1320
+ ```javascript
1321
+ // Wetter abrufen
1322
+ const weather = await client.http.getWeather("Berlin");
1323
+
1324
+ // Returns:
1325
+ // {
1326
+ // city: "Berlin",
1327
+ // country: "DE",
1328
+ // temperature: 15,
1329
+ // description: "Bewölkt",
1330
+ // humidity: 65,
1331
+ // windSpeed: 3.2
1332
+ // }
1333
+
1334
+ // In Commands verwenden
1335
+ client.addCommand('wetter', async (msg, args) => {
1336
+ const city = args.join(' ');
1337
+ const weather = await client.http.getWeather(city);
1338
+
1339
+ await msg.reply(`🌤️ **${weather.city}**: ${weather.temperature}°C, ${weather.description}`);
1340
+ });
1341
+ ```
1342
+
1343
+ ### **News API**
1344
+ ```javascript
1345
+ // Aktuelle News
1346
+ const articles = await client.http.getNews('technology');
1347
+
1348
+ // Returns Array:
1349
+ // [
1350
+ // {
1351
+ // title: "News Titel",
1352
+ // description: "Beschreibung...",
1353
+ // url: "https://...",
1354
+ // source: "Quelle",
1355
+ // publishedAt: "31.1.2024"
1356
+ // }
1357
+ // ]
1358
+ ```
1359
+
1360
+ ### **Crypto Prices**
1361
+ ```javascript
1362
+ // Kryptowährung-Preise
1363
+ const price = await client.http.getCryptoPrice('bitcoin');
1364
+
1365
+ // Returns:
1366
+ // {
1367
+ // symbol: "bitcoin",
1368
+ // priceEUR: 35420.50,
1369
+ // priceUSD: 42150.30,
1370
+ // change24h: "+2.45"
1371
+ // }
1372
+ ```
1373
+
1374
+ ### **URL Shortener**
1375
+ ```javascript
1376
+ // URL kürzen
1377
+ const short = await client.http.shortenUrl('https://very-long-url.com');
1378
+
1379
+ // Returns:
1380
+ // {
1381
+ // shortUrl: "https://is.gd/abc123",
1382
+ // longUrl: "https://very-long-url.com",
1383
+ // service: "is.gd"
1384
+ // }
1385
+ ```
1386
+
1387
+ ### **Weitere HTTP Features**
1388
+ ```javascript
1389
+ // QR Code generieren
1390
+ const qr = await client.http.generateQRCode("Hello World");
1391
+
1392
+ // Random Fact
1393
+ const fact = await client.http.getRandomFact();
1394
+
1395
+ // Random Joke
1396
+ const joke = await client.http.getRandomJoke();
1397
+
1398
+ // IP Information
1399
+ const ipInfo = await client.http.getIPInfo("8.8.8.8");
1400
+ ```
1401
+
1402
+ ---
1403
+
1404
+ ## 📅 Scheduler System
1405
+
1406
+ ### **Cron Scheduling**
1407
+ ```javascript
1408
+ // Cron-basierte Jobs
1409
+ const jobId = client.scheduler.schedule(
1410
+ '0 9 * * 1-5', // Werktags um 9:00
1411
+ chatId,
1412
+ 'Guten Morgen! Arbeitszeit! 💪'
1413
+ );
1414
+
1415
+ // Mit Optionen
1416
+ client.scheduler.schedule('0 18 * * *', chatId, 'Feierabend! 🎉', {
1417
+ timezone: 'Europe/Berlin',
1418
+ id: 'daily-reminder'
1419
+ });
1420
+ ```
1421
+
1422
+ ### **One-Time Scheduling**
1423
+ ```javascript
1424
+ // Einmalige Nachricht
1425
+ const reminderDate = new Date('2024-12-31 23:59:00');
1426
+ client.scheduler.scheduleOnce(
1427
+ reminderDate,
1428
+ chatId,
1429
+ 'Happy New Year! 🎉'
1430
+ );
1431
+
1432
+ // Erinnerung in X Minuten
1433
+ const futureDate = new Date(Date.now() + 30 * 60 * 1000); // 30 Min
1434
+ client.scheduler.scheduleOnce(futureDate, chatId, 'Erinnerung!');
1435
+ ```
1436
+
1437
+ ### **Convenience Methods**
1438
+ ```javascript
1439
+ // Tägliche Nachricht
1440
+ client.scheduler.daily('09:00', chatId, 'Guten Morgen! ☀️');
1441
+
1442
+ // Wöchentliche Nachricht
1443
+ client.scheduler.weekly('monday', '18:00', chatId, 'Wochenstart! 💪');
1444
+
1445
+ // Monatliche Nachricht
1446
+ client.scheduler.monthly(1, '12:00', chatId, 'Neuer Monat! 📅');
1447
+ ```
1448
+
1449
+ ### **Template Variables**
1450
+ ```javascript
1451
+ // Nachrichten mit Variablen
1452
+ client.scheduler.daily('09:00', chatId, 'Guten Morgen! Heute ist {day}, {date} um {time}');
1453
+
1454
+ // Verfügbare Variablen:
1455
+ // {time} - Aktuelle Zeit
1456
+ // {date} - Aktuelles Datum
1457
+ // {datetime} - Datum + Zeit
1458
+ // {day} - Wochentag
1459
+ // {timestamp} - Unix Timestamp
1460
+ ```
1461
+
1462
+ ### **Job Management**
1463
+ ```javascript
1464
+ // Job entfernen
1465
+ client.scheduler.removeJob(jobId);
1466
+
1467
+ // Job pausieren/fortsetzen
1468
+ client.scheduler.pauseJob(jobId);
1469
+ client.scheduler.resumeJob(jobId);
1470
+
1471
+ // Alle Jobs auflisten
1472
+ const jobs = client.scheduler.listJobs();
1473
+
1474
+ // Statistiken
1475
+ const stats = client.scheduler.getStats();
1476
+ // Returns: { activeJobs, totalJobs, cronJobs, onceJobs, totalExecuted }
1477
+ ```
1478
+
1479
+ ### **Persistent Storage**
1480
+ - ✅ **Auto-Save** - Jobs werden automatisch gespeichert
1481
+ - ✅ **Auto-Restore** - Jobs werden beim Neustart wiederhergestellt
1482
+ - ✅ **Cleanup** - Abgelaufene Jobs werden automatisch entfernt
1483
+
1484
+ ---
1485
+
1486
+ ## ⏰ Waiting System
1487
+
1488
+ ### **Die coole API die du wolltest!**
1489
+ ```javascript
1490
+ // In Messages verwenden
1491
+ await msg.waiting.after.message(2000); // 2 Sekunden warten
1492
+ await msg.reply("Nach 2 Sekunden!");
1493
+
1494
+ // In Commands
1495
+ client.addCommand('demo', async (msg) => {
1496
+ await msg.reply('Start...');
1497
+ await msg.waiting.after.message(3000); // 3 Sekunden warten
1498
+ await msg.reply('Nach 3 Sekunden!');
1499
+ await msg.waiting.after.message(1000); // 1 Sekunde warten
1500
+ await msg.reply('Fertig! 🎉');
1501
+ });
1502
+ ```
1503
+
1504
+ ### **Realistische Bot-Interaktionen**
1505
+ ```javascript
1506
+ client.addCommand('story', async (msg) => {
1507
+ await msg.reply('📖 Ich erzähle dir eine Geschichte...');
1508
+
1509
+ await msg.waiting.after.message(2000);
1510
+ await msg.reply('Es war einmal ein Roboter...');
1511
+
1512
+ await msg.waiting.after.message(3000);
1513
+ await msg.reply('Der lernte, wie man WhatsApp Bots programmiert...');
1514
+
1515
+ await msg.waiting.after.message(2500);
1516
+ await msg.reply('Und sie lebten glücklich bis ans Ende ihrer Tage! 🤖✨');
1517
+ });
1518
+ ```
1519
+
1520
+ ### **Mit Typing Indicator kombinieren**
1521
+ ```javascript
1522
+ client.addCommand('think', async (msg) => {
1523
+ await msg.visualWrite(true); // Typing an
1524
+ await msg.waiting.after.message(3000); // 3 Sekunden "denken"
1525
+ await msg.visualWrite(false); // Typing aus
1526
+
1527
+ await msg.waiting.after.message(500); // Kurze Pause
1528
+ await msg.reply('💡 Ich habe eine Idee!');
1529
+ });
1530
+ ```
1531
+
1532
+ ### **Flexible Zeitsteuerung**
1533
+ ```javascript
1534
+ // Verschiedene Wartezeiten
1535
+ await msg.waiting.after.message(500); // 0.5 Sekunden
1536
+ await msg.waiting.after.message(1000); // 1 Sekunde
1537
+ await msg.waiting.after.message(5000); // 5 Sekunden
1538
+ await msg.waiting.after.message(30000); // 30 Sekunden
1539
+
1540
+ // Dynamische Wartezeiten
1541
+ const waitTime = Math.random() * 3000 + 1000; // 1-4 Sekunden
1542
+ await msg.waiting.after.message(waitTime);
1543
+ ```
1544
+
1545
+ ### **Perfekt für:**
1546
+ - ✅ **Realistische Bot-Gespräche** - Menschenähnliche Pausen
1547
+ - ✅ **Spannungsaufbau** - Dramatische Pausen in Geschichten
1548
+ - ✅ **API-Wartezeiten** - Zeit für externe Requests
1549
+ - ✅ **User Experience** - Natürliche Gesprächsrhythmen
1550
+ - ✅ **Rate Limiting** - Vermeidung von Spam
1551
+
1552
+ ---
1553
+
1554
+ ## 🎭 Hidetag System
1555
+
1556
+ ### **Versteckte Erwähnungen - Deine coole API!**
1557
+ ```javascript
1558
+ // Alle Gruppenmitglieder erwähnen (unsichtbar)
1559
+ await msg.reply("Wichtige Nachricht für alle!", [], { hidetag: "all" });
1560
+
1561
+ // Nur den Sender erwähnen (unsichtbar)
1562
+ await msg.reply("Nur für dich!", [], { hidetag: "sender" });
1563
+
1564
+ // Spezifische Person erwähnen (unsichtbar)
1565
+ await msg.reply("Geheime Nachricht!", [], { hidetag: "1234567890@s.whatsapp.net" });
1566
+ ```
1567
+
1568
+ ### **Hidetag Features**
1569
+ - ✅ **Unsichtbare Mentions** - Erwähnungen ohne @-Anzeige
1570
+ - ✅ **Group-only** - Funktioniert nur in Gruppen (Sicherheit)
1571
+ - ✅ **Flexible Targets** - All, Sender, oder spezifische JID
1572
+ - ✅ **Kombinierbar** - Mit normalen Mentions kombinierbar
1573
+ - ✅ **Admin-Tools** - Perfekt für Moderatoren
1574
+
1575
+ ### **Praktische Anwendungen**
1576
+ ```javascript
1577
+ // Admin-Ankündigungen
1578
+ client.addCommand('announce', async (msg, args) => {
1579
+ if (!(await msg.isAdmin())) {
1580
+ return msg.reply('❌ Nur für Admins!');
1581
+ }
1582
+
1583
+ const announcement = args.join(' ');
1584
+ await msg.reply(`📢 **Ankündigung:** ${announcement}`, [], { hidetag: "all" });
1585
+ });
1586
+
1587
+ // Geheime Nachrichten
1588
+ client.addCommand('whisper', async (msg, args) => {
1589
+ const mentions = msg.getMentions();
1590
+ if (mentions.length === 0) {
1591
+ return msg.reply('❌ Erwähne einen User mit @');
1592
+ }
1593
+
1594
+ const secretMessage = args.slice(1).join(' ');
1595
+ await msg.reply(`🤫 Geheime Nachricht: ${secretMessage}`, [], { hidetag: mentions[0] });
1596
+ });
1597
+
1598
+ // Wichtige Updates
1599
+ client.addCommand('update', async (msg, args) => {
1600
+ const update = args.join(' ');
1601
+ await msg.reply(`🔄 **Update:** ${update}\n\n_Alle wurden benachrichtigt_`, [], { hidetag: "all" });
1602
+ });
1603
+ ```
1604
+
1605
+ ### **Hidetag vs. Normale Mentions**
1606
+ ```javascript
1607
+ // Normal (sichtbar): @user1 @user2 Hallo!
1608
+ await msg.reply("Hallo!", [user1, user2]);
1609
+
1610
+ // Hidetag (unsichtbar): Hallo! (aber alle bekommen Benachrichtigung)
1611
+ await msg.reply("Hallo!", [], { hidetag: "all" });
1612
+
1613
+ // Kombiniert: @user1 Hallo! (+ unsichtbare Erwähnung aller anderen)
1614
+ await msg.reply("Hallo!", [user1], { hidetag: "all" });
1615
+ ```
1616
+
1617
+ ---
1618
+
1619
+ ## 🎨 Sticker Creation
1620
+
1621
+ ### **Professionelle Sticker-Erstellung mit Sharp**
1622
+ ```javascript
1623
+ // Sticker aus URL
1624
+ await msg.create.sticker.fromUrl('https://example.com/image.jpg', {
1625
+ pack: 'Mein Pack',
1626
+ author: 'Bot',
1627
+ quality: 'high',
1628
+ crop: true
1629
+ });
1630
+
1631
+ // Sticker aus lokalem Bild
1632
+ await msg.create.sticker.fromImage('./photo.jpg', {
1633
+ pack: 'Local Stickers',
1634
+ quality: 'medium',
1635
+ width: 512,
1636
+ height: 512
1637
+ });
1638
+
1639
+ // Text-Sticker
1640
+ await msg.create.sticker.fromText('Hello World!', {
1641
+ backgroundColor: '#FF6B6B',
1642
+ textColor: '#FFFFFF',
1643
+ fontSize: 64,
1644
+ pack: 'Text Stickers'
1645
+ });
1646
+
1647
+ // Animierte Sticker aus Video/GIF
1648
+ await msg.create.sticker.fromVideo('./animation.gif', {
1649
+ animated: true,
1650
+ quality: 'high',
1651
+ duration: 6,
1652
+ fps: 15
1653
+ });
1654
+
1655
+ // Sticker aus Buffer
1656
+ const imageBuffer = fs.readFileSync('image.png');
1657
+ await msg.create.sticker.fromMedia(imageBuffer, {
1658
+ pack: 'Buffer Stickers',
1659
+ crop: true
1660
+ });
1661
+ ```
1662
+
1663
+ ### **Sticker-Optionen**
1664
+ ```javascript
1665
+ const stickerOptions = {
1666
+ // Metadaten
1667
+ pack: 'Sticker Pack Name', // Sticker-Pack Name
1668
+ author: 'Bot Name', // Autor Name
1669
+
1670
+ // Verarbeitung
1671
+ quality: 'high', // 'high', 'medium', 'low'
1672
+ crop: true, // Quadratisch croppen
1673
+ width: 512, // Ziel-Breite
1674
+ height: 512, // Ziel-Höhe
1675
+
1676
+ // Animation (für Videos/GIFs)
1677
+ animated: true, // Animierter Sticker
1678
+ duration: 6, // Max Dauer in Sekunden
1679
+ fps: 15, // Frames per Second
1680
+
1681
+ // Text-Sticker
1682
+ backgroundColor: '#FFFFFF', // Hintergrundfarbe
1683
+ textColor: '#000000', // Textfarbe
1684
+ fontSize: 64, // Schriftgröße
1685
+ fontFamily: 'Arial', // Schriftart
1686
+ padding: 50 // Text-Padding
1687
+ };
1688
+ ```
1689
+
1690
+ ### **Auto-Sticker System**
1691
+ ```javascript
1692
+ // Automatische Sticker-Erstellung aus gesendeten Bildern
1693
+ client.on('message', async (msg) => {
1694
+ if (msg.type === 'imageMessage' && msg.text?.toLowerCase() === 'sticker') {
1695
+ try {
1696
+ await msg.reply('🎨 Erstelle Sticker aus deinem Bild...');
1697
+
1698
+ // Bild-Buffer aus Message extrahieren (vereinfacht)
1699
+ const imageBuffer = await msg.downloadMedia();
1700
+
1701
+ await msg.create.sticker.fromMedia(imageBuffer, {
1702
+ pack: 'User Stickers',
1703
+ author: msg.getSender().split('@')[0],
1704
+ quality: 'high'
1705
+ });
1706
+
1707
+ await msg.reply('✅ Sticker erstellt!');
1708
+ } catch (error) {
1709
+ await msg.reply(`❌ Fehler: ${error.message}`);
1710
+ }
1711
+ }
1712
+ });
1713
+ ```
1714
+
1715
+ ### **Sticker Commands**
1716
+ ```javascript
1717
+ // URL zu Sticker
1718
+ client.addCommand('sticker', async (msg, args) => {
1719
+ if (args.length === 0) {
1720
+ return msg.reply('❌ Verwendung: !sticker <image-url>');
1721
+ }
1722
+
1723
+ const url = args[0];
1724
+ try {
1725
+ await msg.reply('🎨 Erstelle Sticker...');
1726
+ await msg.create.sticker.fromUrl(url, {
1727
+ pack: 'Bot Stickers',
1728
+ author: 'WAEngine'
1729
+ });
1730
+ await msg.reply('✅ Sticker erstellt!');
1731
+ } catch (error) {
1732
+ await msg.reply(`❌ Fehler: ${error.message}`);
1733
+ }
1734
+ });
1735
+
1736
+ // Text zu Sticker
1737
+ client.addCommand('textsticker', async (msg, args) => {
1738
+ const text = args.join(' ');
1739
+ if (!text) {
1740
+ return msg.reply('❌ Verwendung: !textsticker <text>');
1741
+ }
1742
+
1743
+ try {
1744
+ await msg.create.sticker.fromText(text, {
1745
+ pack: 'Text Stickers',
1746
+ backgroundColor: '#4ECDC4',
1747
+ textColor: '#FFFFFF',
1748
+ fontSize: 48
1749
+ });
1750
+ } catch (error) {
1751
+ await msg.reply(`❌ Fehler: ${error.message}`);
1752
+ }
1753
+ });
1754
+ ```
1755
+
1756
+ ### **Sticker Features**
1757
+ - ✅ **Sharp Integration** - Professionelle Bild-Verarbeitung
1758
+ - ✅ **WebP Optimierung** - Perfekte WhatsApp-Kompatibilität
1759
+ - ✅ **Auto-Resize** - Automatische Größenanpassung
1760
+ - ✅ **Quality Control** - High/Medium/Low Qualitäts-Stufen
1761
+ - ✅ **Text Rendering** - SVG-basierte Text-Sticker
1762
+ - ✅ **Animation Support** - GIF/Video zu animierten Stickern
1763
+ - ✅ **Batch Processing** - Mehrere Sticker gleichzeitig
1764
+ - ✅ **Error Handling** - Graceful Fallbacks
1765
+
1766
+ ---
1767
+
1768
+ ## 🎤 Visual Recording
1769
+
1770
+ ### **Recording Indicator - Wie echte Sprachnachrichten!**
1771
+ ```javascript
1772
+ // Recording an/aus
1773
+ await msg.visualRecord(true); // Recording AN
1774
+ await msg.visualRecord(false); // Recording AUS
1775
+
1776
+ // Recording für bestimmte Zeit
1777
+ await msg.simulateRecording(3000); // 3 Sekunden Recording
1778
+
1779
+ // Recording + automatische Antwort
1780
+ await msg.recordAndReply("Das ist meine Antwort!", 2500);
1781
+
1782
+ // Recording + Custom Function
1783
+ await msg.recordAndSend(async () => {
1784
+ await msg.sendImage('photo.jpg', 'Foto nach Recording!');
1785
+ }, 3000);
1786
+ ```
1787
+
1788
+ ### **Realistische Voice-Message Simulation**
1789
+ ```javascript
1790
+ client.addCommand('voice', async (msg, args) => {
1791
+ const message = args.join(' ') || 'Das ist eine simulierte Sprachnachricht!';
1792
+
1793
+ // Berechne realistische Recording-Zeit basierend auf Text-Länge
1794
+ const recordingTime = Math.max(2000, message.length * 100); // ~100ms pro Zeichen
1795
+
1796
+ await msg.recordAndReply(message, recordingTime);
1797
+ });
1798
+
1799
+ // Lange "Sprachnachricht"
1800
+ client.addCommand('longvoice', async (msg) => {
1801
+ await msg.reply('🎤 Nehme lange Sprachnachricht auf...');
1802
+
1803
+ // Starte Recording
1804
+ await msg.visualRecord(true);
1805
+
1806
+ // Simuliere lange Aufnahme (10 Sekunden)
1807
+ await new Promise(resolve => setTimeout(resolve, 10000));
1808
+
1809
+ // Stoppe Recording
1810
+ await msg.visualRecord(false);
1811
+
1812
+ await msg.reply('🎵 Hier ist meine 10-Sekunden Sprachnachricht! (simuliert)');
1813
+ });
1814
+ ```
1815
+
1816
+ ### **Recording + Typing Kombinationen**
1817
+ ```javascript
1818
+ client.addCommand('think-speak', async (msg) => {
1819
+ // Erst denken (typing)
1820
+ await msg.visualWrite(true);
1821
+ await new Promise(resolve => setTimeout(resolve, 2000));
1822
+ await msg.visualWrite(false);
1823
+
1824
+ await msg.reply('💭 Hmm, lass mich das aufnehmen...');
1825
+
1826
+ // Dann aufnehmen (recording)
1827
+ await msg.recordAndReply('🎤 Das ist meine durchdachte Antwort!', 3000);
1828
+ });
1829
+
1830
+ // Conversation Flow
1831
+ client.addCommand('conversation', async (msg) => {
1832
+ await msg.reply('👋 Hallo! Lass uns reden...');
1833
+
1834
+ await msg.waiting.after.message(1000);
1835
+ await msg.typeAndReply('Ich tippe gerade...', 2000);
1836
+
1837
+ await msg.waiting.after.message(500);
1838
+ await msg.recordAndReply('Und jetzt nehme ich eine Sprachnachricht auf!', 3000);
1839
+
1840
+ await msg.waiting.after.message(1000);
1841
+ await msg.reply('✅ Conversation Demo beendet!');
1842
+ });
1843
+ ```
1844
+
1845
+ ### **Recording Features**
1846
+ - ✅ **WhatsApp-kompatibel** - Echter Recording-Indicator
1847
+ - ✅ **Flexible Dauer** - Von 1 Sekunde bis beliebig lang
1848
+ - ✅ **Auto-Stop** - Automatisches Stoppen nach Zeit
1849
+ - ✅ **Kombinierbar** - Mit Typing und Waiting kombinierbar
1850
+ - ✅ **Realistic Timing** - Basierend auf Text-Länge
1851
+ - ✅ **Error Handling** - Fallback bei Fehlern
1852
+ - ✅ **Chain Support** - Mehrere Recordings hintereinander
1853
+
1854
+ ### **Recording vs. Typing**
1855
+ ```javascript
1856
+ // Typing (schreibt Text)
1857
+ await msg.visualWrite(true);
1858
+ await msg.waiting.after.message(2000);
1859
+ await msg.visualWrite(false);
1860
+ await msg.reply('Getippte Nachricht');
1861
+
1862
+ // Recording (nimmt Sprache auf)
1863
+ await msg.visualRecord(true);
1864
+ await msg.waiting.after.message(3000);
1865
+ await msg.visualRecord(false);
1866
+ await msg.reply('Aufgenommene Nachricht');
1867
+
1868
+ // Kombiniert für realistische Gespräche
1869
+ await msg.typeAndReply('Ich überlege...', 1500);
1870
+ await msg.waiting.after.message(500);
1871
+ await msg.recordAndReply('Hier ist meine Antwort!', 2500);
1872
+ ```
1873
+
1874
+ ---
1875
+
1876
+ ## 🔌 Plugin System
1877
+
1878
+ ### **Optionales Plugin System - 8 Plugins mit 80+ Commands!**
1879
+
1880
+ WAEngine verfügt über ein revolutionäres Plugin-System mit **optionalem Loading**. Plugins werden nur geladen, wenn explizit aufgerufen!
1881
+
1882
+ #### **🔧 Optionales Plugin Loading**
1883
+ ```javascript
1884
+ import { WhatsAppClient } from 'waengine';
1885
+
1886
+ const client = new WhatsAppClient();
1887
+
1888
+ // 🔌 OPTIONAL: Plugins nur laden wenn gewünscht
1889
+ await client.load.Plugins('economy-system'); // Economy System laden
1890
+ await client.load.Plugins('games-plugin'); // Games Plugin laden
1891
+ await client.load.Plugins('creative-plugin'); // Creative Plugin laden
1892
+ await client.load.Plugins('analytics-plugin'); // Analytics Plugin laden
1893
+
1894
+ // Oder alle auf einmal:
1895
+ await client.load.Plugins('all');
1896
+
1897
+ // Ohne diese Zeilen: KEINE Plugins geladen!
1898
+ ```
1899
+
1900
+ #### **🎯 Verfügbare Plugins (8 Plugins)**
1901
+
1902
+ **💰 Economy System Plugin**
1903
+ - `!balance` - Kontostand anzeigen
1904
+ - `!daily` - Tägliche Belohnung abholen
1905
+ - `!shop` - Shop mit Items anzeigen
1906
+ - `!work` - Arbeiten gehen für Coins
1907
+ - `!pay @user 100` - Geld überweisen
1908
+ - `!buy 1` - Item aus Shop kaufen
1909
+ - `!inventory` - Inventar anzeigen
1910
+ - `!leaderboard` - Reichste User
1911
+ - `!gamble 50` - Glücksspiel
1912
+ - `!rob @user` - User berauben
1913
+
1914
+ **🎮 Games Plugin**
1915
+ - `!dice` - Würfel werfen
1916
+ - `!rps schere` - Schere-Stein-Papier
1917
+ - `!quiz` - Quiz starten
1918
+ - `!number` - Zahlenraten-Spiel
1919
+ - `!trivia` - Trivia-Fragen
1920
+ - `!hangman` - Galgenmännchen
1921
+ - `!riddle` - Rätsel lösen
1922
+ - `!memory` - Memory-Spiel
1923
+ - `!math` - Mathe-Quiz
1924
+ - `!wordchain` - Wortkette
1925
+
1926
+ **🎵 Music Plugin**
1927
+ - `!play despacito` - Musik auf YouTube suchen
1928
+ - `!lyrics hello adele` - Songtexte finden
1929
+ - `!playlist` - Playlist verwalten
1930
+ - `!radio` - Online Radio
1931
+ - `!spotify` - Spotify Integration
1932
+ - `!soundcloud` - SoundCloud Suche
1933
+ - `!charts` - Aktuelle Charts
1934
+ - `!artist eminem` - Künstler-Info
1935
+ - `!album thriller` - Album-Info
1936
+ - `!genre rock` - Genre erkunden
1937
+
1938
+ **✈️ Travel Plugin**
1939
+ - `!weather Berlin` - Wetter abfragen
1940
+ - `!flight MUC BER` - Flüge suchen
1941
+ - `!hotel Berlin` - Hotels finden
1942
+ - `!currency EUR USD` - Währung umrechnen
1943
+ - `!translate hallo en` - Text übersetzen
1944
+ - `!timezone Berlin` - Zeitzone anzeigen
1945
+ - `!distance Berlin München` - Entfernung berechnen
1946
+ - `!country Germany` - Länder-Info
1947
+ - `!city Berlin` - Stadt-Info
1948
+ - `!map Berlin` - Karte anzeigen
1949
+
1950
+ **📚 Education Plugin**
1951
+ - `!wiki JavaScript` - Wikipedia-Suche
1952
+ - `!math 2+2*3` - Mathe-Rechner
1953
+ - `!code console.log()` - Code erklären
1954
+ - `!define programming` - Wort definieren
1955
+ - `!synonym happy` - Synonyme finden
1956
+ - `!grammar` - Grammatik-Check
1957
+ - `!spell` - Rechtschreibung
1958
+ - `!fact` - Zufällige Fakten
1959
+ - `!quote` - Inspirierende Zitate
1960
+ - `!learn javascript` - Lern-Ressourcen
1961
+
1962
+ **🛡️ Moderation Plugin**
1963
+ - `!automod on` - Auto-Moderation aktivieren
1964
+ - `!warn @user spam` - User warnen
1965
+ - `!rules` - Regeln anzeigen
1966
+ - `!mute @user 10m` - User stumm schalten
1967
+ - `!ban @user` - User bannen
1968
+ - `!kick @user` - User kicken
1969
+ - `!promote @user` - User befördern
1970
+ - `!demote @user` - Admin entfernen
1971
+ - `!antilink on` - Link-Schutz
1972
+ - `!antispam on` - Spam-Schutz
1973
+
1974
+ **🎨 Creative Plugin**
1975
+ - `!meme 1 Programmieren` - Meme erstellen
1976
+ - `!joke` - Witz erzählen
1977
+ - `!ascii heart` - ASCII-Art erstellen
1978
+ - `!qr Hello World` - QR-Code generieren
1979
+ - `!color #FF0000` - Farb-Info
1980
+ - `!logo WAEngine` - Logo erstellen
1981
+ - `!banner Welcome` - Banner erstellen
1982
+ - `!sticker` - Sticker erstellen
1983
+ - `!gif search cats` - GIF suchen
1984
+ - `!emoji 😀` - Emoji-Info
1985
+
1986
+ **📊 Analytics Plugin**
1987
+ - `!mystats` - Eigene Statistiken
1988
+ - `!topusers` - Aktivste User
1989
+ - `!heatmap` - Aktivitätsmuster
1990
+ - `!globalstats` - Globale Statistiken
1991
+ - `!commands` - Command-Statistiken
1992
+ - `!usage` - Bot-Nutzung
1993
+ - `!growth` - Wachstums-Statistiken
1994
+ - `!export` - Daten exportieren
1995
+ - `!report` - Detaillierter Report
1996
+ - `!insights` - Tiefe Einblicke
1997
+
1998
+ ### **🚀 Auto-Loading System**
1999
+ ```javascript
2000
+ import { WhatsAppClient } from "waengine";
2001
+
2002
+ const client = new WhatsAppClient();
2003
+
2004
+ // Plugins werden automatisch nach WhatsApp-Verbindung geladen!
2005
+ await client.connect();
2006
+
2007
+ // ✅ Alle 8 Plugins sind sofort verfügbar!
2008
+ ```
2009
+
2010
+ ### **📦 Verfügbare Plugins (8 Plugins)**
2011
+
2012
+ #### **💰 Economy System**
2013
+ Vollständiges Wirtschaftssystem mit Coins, Shop und Belohnungen
2014
+ ```javascript
2015
+ // Verfügbare Commands:
2016
+ !balance // Kontostand anzeigen
2017
+ !daily // Tägliche Belohnung (100-500 Coins)
2018
+ !work // Arbeiten gehen (50-200 Coins)
2019
+ !shop // Shop mit Items anzeigen
2020
+ !buy <id> // Item kaufen
2021
+ !transfer @user <amount> // Coins übertragen
2022
+ !leaderboard // Top 10 reichste User
2023
+ ```
2024
+
2025
+ #### **🎮 Games Plugin**
2026
+ Verschiedene Spiele und Unterhaltung
2027
+ ```javascript
2028
+ // Verfügbare Commands:
2029
+ !dice [seiten] // Würfel werfen (Standard: 6 Seiten)
2030
+ !flip // Münze werfen
2031
+ !rps <choice> // Schere-Stein-Papier (rock/paper/scissors)
2032
+ !quiz // Quiz mit zufälligen Fragen
2033
+ !number // Zahlenraten-Spiel (1-100)
2034
+ !8ball <frage> // Magische 8-Ball Antworten
2035
+ ```
2036
+
2037
+ #### **🎵 Music Plugin**
2038
+ Musik-Suche und YouTube Integration
2039
+ ```javascript
2040
+ // Verfügbare Commands:
2041
+ !play <song> // Musik auf YouTube suchen
2042
+ !lyrics <song> // Songtexte finden
2043
+ !playlist // Persönliche Playlist verwalten
2044
+ !playlist add <song> // Song zur Playlist hinzufügen
2045
+ !playlist show // Playlist anzeigen
2046
+ !trending // Trending Musik anzeigen
2047
+ ```
2048
+
2049
+ #### **✈️ Travel Plugin**
2050
+ Reise-Informationen und Wetter
2051
+ ```javascript
2052
+ // Verfügbare Commands:
2053
+ !weather <stadt> // Aktuelles Wetter
2054
+ !forecast <stadt> // 5-Tage Wettervorhersage
2055
+ !flight <von> <nach> // Flugsuche
2056
+ !hotel <stadt> // Hotel-Empfehlungen
2057
+ !currency <von> <nach> <betrag> // Währungsrechner
2058
+ !travel <stadt> // Reise-Tipps
2059
+ ```
2060
+
2061
+ #### **📚 Education Plugin**
2062
+ Bildungs-Tools und Lernhilfen
2063
+ ```javascript
2064
+ // Verfügbare Commands:
2065
+ !wiki <begriff> // Wikipedia-Artikel suchen
2066
+ !define <wort> // Wort-Definition
2067
+ !math <ausdruck> // Mathematische Berechnungen
2068
+ !code <code> // Code-Erklärungen
2069
+ !learn [thema] // Lernressourcen anzeigen
2070
+ !fact // Zufällige Fakten
2071
+ !study start/stop // Lernzeit tracken
2072
+ ```
2073
+
2074
+ #### **🛡️ Moderation Plugin**
2075
+ Erweiterte Moderation und Auto-Mod
2076
+ ```javascript
2077
+ // Verfügbare Commands:
2078
+ !warn @user [grund] // User warnen
2079
+ !unwarn @user // Warnung entfernen
2080
+ !warnings [@user] // Warnungen anzeigen
2081
+ !kick @user [grund] // User kicken
2082
+ !automod [on/off] // Auto-Moderation verwalten
2083
+ !modstats // Moderations-Statistiken
2084
+ !rules // Gruppenregeln anzeigen
2085
+ !setrules <regel1> | <regel2> // Regeln festlegen
2086
+ !purge <anzahl> // Nachrichten löschen (experimentell)
2087
+ ```
2088
+
2089
+ **Auto-Moderation Features:**
2090
+ - ✅ **Spam-Erkennung** - 5 Nachrichten in 10 Sekunden
2091
+ - ✅ **Verbotene Wörter Filter** - Anpassbare Wortliste
2092
+ - ✅ **Caps-Check** - Zu viele Großbuchstaben (>70%)
2093
+ - ✅ **Emoji-Limit** - Zu viele Emojis (>10)
2094
+ - ✅ **Automatische Warnungen** - 3 Strikes = Kick
2095
+
2096
+ #### **🎨 Creative Plugin**
2097
+ Kreative Tools für Memes, ASCII-Art und mehr
2098
+ ```javascript
2099
+ // Verfügbare Commands:
2100
+ !meme <nummer> <text> // Meme mit Templates erstellen
2101
+ !quote // Inspirierende Zitate
2102
+ !ascii <typ> // ASCII-Art (heart, star, smile, cat, dog)
2103
+ !textart <text> // Großer Text-Art
2104
+ !colortext <text> [stil] // Bunter Text (rainbow, fire, ocean, nature, space)
2105
+ !fact // Unglaubliche Fakten
2106
+ !joke // Lustige Witze
2107
+ !story // Story-Prompt Generator
2108
+ !inspire // Zufällige Inspiration
2109
+ !creative // Plugin-Übersicht
2110
+ ```
2111
+
2112
+ #### **📊 Analytics Plugin**
2113
+ Detaillierte Statistiken und Analytics
2114
+ ```javascript
2115
+ // Verfügbare Commands:
2116
+ !stats [@user] // User-Statistiken anzeigen
2117
+ !mystats // Eigene Statistiken
2118
+ !groupstats // Gruppen-Statistiken
2119
+ !globalstats // Globale Statistiken
2120
+ !topusers [anzahl] // Top User nach Nachrichten
2121
+ !topgroups [anzahl] // Top Gruppen
2122
+ !topcommands [anzahl] // Meist genutzte Commands
2123
+ !heatmap [me/group] // Aktivitäts-Heatmap
2124
+ !analytics // Plugin-Übersicht
2125
+ !export // Persönliche Daten exportieren
2126
+ ```
2127
+
2128
+ **Tracking Features:**
2129
+ - ✅ **Nachrichten-Tracking** - Anzahl und Zeichen
2130
+ - ✅ **Aktivitätsmuster** - Stunden- und Tages-Heatmaps
2131
+ - ✅ **Command-Statistiken** - Meist genutzte Commands
2132
+ - ✅ **Gruppen-Analytics** - Top User pro Gruppe
2133
+ - ✅ **Automatisches Tracking** - Läuft im Hintergrund
2134
+
2135
+ ### **🔧 Plugin Manager**
2136
+ ```javascript
2137
+ // Plugin Status abrufen
2138
+ const stats = client.pluginManager.getStats();
2139
+ console.log(`${stats.loaded}/${stats.available} Plugins geladen`);
2140
+
2141
+ // Einzelnes Plugin laden
2142
+ await client.pluginManager.load('economy-system');
2143
+
2144
+ // Alle Plugins laden
2145
+ await client.pluginManager.loadAllPlugins();
2146
+
2147
+ // Plugin-Liste
2148
+ const plugins = client.pluginManager.list();
2149
+ ```
2150
+
2151
+ ### **💾 Plugin Storage Integration**
2152
+ Jedes Plugin nutzt das WAEngine Storage System:
2153
+ ```javascript
2154
+ // In Plugins verfügbar:
2155
+ this.client.storage.write.in('economy').set(`${userId}.coins`, 1000);
2156
+ const coins = this.client.storage.read.from('economy').get(`${userId}.coins`) || 0;
2157
+ this.client.storage.write.in('analytics').increment('totalMessages', 1);
2158
+ ```
2159
+
2160
+ ### **🎮 Plugin Test Commands**
2161
+ ```javascript
2162
+ // Plugin System testen
2163
+ !plugin-test // Alle 80+ Plugin Commands anzeigen
2164
+ !plugins // Plugin Status und Statistiken
2165
+
2166
+ // Einzelne Plugin Tests
2167
+ !test-economy // Economy System testen
2168
+ !test-games // Games Plugin testen
2169
+ !test-creative // Creative Plugin testen
2170
+ !test-analytics // Analytics Plugin testen
2171
+ !test-all // Alle Plugins nacheinander testen
2172
+ ```
2173
+
2174
+ ### **📁 Plugin Struktur**
2175
+ ```
2176
+ plugins/
2177
+ ├── economy-system/
2178
+ │ ├── index.js # Plugin-Klasse
2179
+ │ └── config.json # Plugin-Konfiguration
2180
+ ├── games-plugin/
2181
+ ├── music-plugin/
2182
+ ├── travel-plugin/
2183
+ ├── education-plugin/
2184
+ ├── moderation-plugin/
2185
+ ├── creative-plugin/
2186
+ └── analytics-plugin/
2187
+ ```
2188
+
2189
+ ### **🚀 Plugin Features**
2190
+ - ✅ **Auto-Loading** - Alle Plugins laden automatisch nach WhatsApp-Verbindung
2191
+ - ✅ **80+ Commands** - Über 80 verschiedene Commands verfügbar
2192
+ - ✅ **Persistent Storage** - Jedes Plugin hat eigene Datenspeicherung
2193
+ - ✅ **Event Integration** - Plugins können auf Messages und Events reagieren
2194
+ - ✅ **Admin-Schutz** - Admin-only Commands automatisch geschützt
2195
+ - ✅ **Error Handling** - Graceful Fallbacks bei Plugin-Fehlern
2196
+ - ✅ **Windows-kompatibel** - Funktioniert perfekt auf Windows
2197
+ - ✅ **Modular** - Jedes Plugin ist unabhängig und erweiterbar
2198
+
2199
+ ### **🎯 Plugin Kategorien**
2200
+ - **💰 Economy** - Wirtschaftssystem, Coins, Shop
2201
+ - **🎮 Games** - Spiele, Unterhaltung, Quiz
2202
+ - **🎵 Music** - Musik-Suche, Playlists, YouTube
2203
+ - **✈️ Travel** - Wetter, Reisen, Währungen
2204
+ - **📚 Education** - Lernen, Wikipedia, Mathe
2205
+ - **🛡️ Moderation** - Auto-Mod, Warnungen, Regeln
2206
+ - **🎨 Creative** - Memes, ASCII-Art, Witze
2207
+ - **📊 Analytics** - Statistiken, Heatmaps, Tracking
2208
+
2209
+ ---
2210
+
2211
+ ## 🔥 Feature Count: **245+ Funktionen!**
2212
+
2213
+ - **Message Functions:** 15+
2214
+ - **Group Functions:** 8+
2215
+ - **Permission Functions:** 6+
2216
+ - **Statistics Functions:** 5+
2217
+ - **Typing Functions:** 8+
2218
+ - **Command System:** 15+ (Chat-spezifische Prefixes)
2219
+ - **Event System:** 8+
2220
+ - **QR Functions:** 3+
2221
+ - **Utility Functions:** 15+
2222
+ - **Multi-Device System:** 20+
2223
+ - **🆕 EasyBot System:** 25+
2224
+ - **🆕 Storage System:** 15+ (NEU in v1.0.7)
2225
+ - **🆕 AI Integration:** 10+ (NEU in v1.0.8)
2226
+ - **🆕 HTTP Client:** 12+ (NEU in v1.0.8)
2227
+ - **🆕 Scheduler System:** 8+ (NEU in v1.0.8)
2228
+ - **🆕 Waiting System:** 5+ (NEU in v1.0.8)
2229
+ - **🆕 Hidetag System:** 5+ (NEU in v1.0.8)
2230
+ - **🆕 Sticker Creation:** 8+ (NEU in v1.0.8)
2231
+ - **🆕 Visual Recording:** 7+ (NEU in v1.0.8)
2232
+ - **🔥 Plugin System:** 80+ (NEU in v1.0.9) **OPTIONAL LOADING!**
2233
+
2234
+ ---
2235
+
2236
+ ## 🚀 Warum WAEngine wählen?
2237
+
2238
+ ### **🎯 Drei APIs in einem**
2239
+ - **EasyBot** - 3-Zeilen Bot Creation für Anfänger
2240
+ - **Advanced** - Vollkontrolle für Profis
2241
+ - **Multi-Device** - Skalierung mit mehreren Accounts
2242
+
2243
+ ### **🔥 Einzigartige Features**
2244
+ - **Multi-Device Load Balancing** - Industry First!
2245
+ - **Action Chaining** - jQuery-Style Bot Building
2246
+ - **Realistic Typing** - Menschenähnliche Interaktionen
2247
+ - **Edge QR Integration** - Nahtlose Authentifizierung
2248
+ - **Template System** - Dynamische Inhalte mit Variablen
2249
+ - **🆕 AI Integration** - ChatGPT/Claude Support
2250
+ - **🆕 Storage System** - `write.in("file").set(key, value)`
2251
+ - **🆕 HTTP Client** - Weather, News, Crypto APIs
2252
+ - **🆕 Scheduler System** - Cron + One-time Jobs
2253
+ - **🆕 Waiting System** - `await msg.waiting.after.message(ms)`
2254
+ - **🆕 Hidetag System** - `msg.reply("text", [], { hidetag: "all" })`
2255
+ - **🆕 Sticker Creation** - `msg.create.sticker.fromMedia()` mit Sharp
2256
+ - **🆕 Visual Recording** - `msg.visualRecord()`, `msg.recordAndReply()`
2257
+ - **🔥 Plugin System** - 8 Optionale Plugins mit 80+ Commands **OPTIONAL LOADING!**
2258
+
2259
+ ### **💪 Production Ready**
2260
+ - **Persistent Auth** - Einmalige Einrichtung
2261
+ - **Auto Reconnection** - Behandelt Verbindungsabbrüche
2262
+ - **Health Monitoring** - Device Status verfolgen
2263
+ - **Error Handling** - Graceful Failure Recovery
2264
+ - **TypeScript Support** - Vollständige Type Definitions
2265
+ - **🆕 Persistent Storage** - Automatische JSON-Dateien
2266
+ - **🆕 Job Scheduling** - Überlebt Neustarts
2267
+ - **🆕 AI Moderation** - Automatische Content-Filterung
2268
+ - **🔥 Plugin Architecture** - Modulares System mit Auto-Loading
2269
+
2270
+ ### **📈 Skalierbare Architektur**
2271
+ - **Load Balancing** - Message Load verteilen
2272
+ - **Failover System** - Automatisches Device Switching
2273
+ - **Rate Limit Bypass** - Multiple Account Limits
2274
+ - **Plugin Ready** - Erweiterbar für v2.0
2275
+ - **🆕 Microservices Ready** - HTTP Client für externe APIs
2276
+ - **🆕 Event-Driven** - Scheduler + Waiting System
2277
+ - **🆕 AI-Powered** - Intelligente Responses
2278
+ - **🔥 Plugin Ecosystem** - 8 Plugins mit 80+ Commands sofort verfügbar
2279
+
2280
+ ---
2281
+
2282
+ ## 🎮 Verfügbare Test Commands
2283
+
2284
+ ### **Basic Commands**
2285
+ - **`!help`** - Alle Commands anzeigen
2286
+ - **`!ping`** - Pong Response
2287
+ - **`!stats`** - Statistiken anzeigen
2288
+
2289
+ ### **Admin Commands**
2290
+ - **`!kick @user`** - User kicken (nur Admin)
2291
+ - **`!warn @user <reason>`** - User warnen (nur Admin)
2292
+ - **`!setprefix <prefix>`** - Prefix ändern (nur Admin)
2293
+
2294
+ ### **🆕 AI Commands**
2295
+ - **`!ai <frage>`** - AI Chat
2296
+ - **`!translate <sprache> <text>`** - Text übersetzen
2297
+ - **`!moderate <text>`** - Content moderieren
2298
+
2299
+ ### **🆕 HTTP Commands**
2300
+ - **`!wetter <stadt>`** - Wetter abrufen
2301
+ - **`!news [kategorie]`** - Aktuelle News
2302
+ - **`!crypto [symbol]`** - Crypto-Preise
2303
+ - **`!short <url>`** - URL kürzen
2304
+
2305
+ ### **🆕 Scheduler Commands**
2306
+ - **`!remind <minuten> <text>`** - Erinnerung erstellen
2307
+ - **`!daily <zeit> <text>`** - Tägliche Nachricht
2308
+ - **`!jobs`** - Scheduler Statistiken
2309
+
2310
+ ### **🆕 Storage Commands**
2311
+ - **`!setdata <key> <value>`** - Daten speichern
2312
+ - **`!getdata <key>`** - Daten abrufen
2313
+ - **`!count up/down [name]`** - Counter System
2314
+
2315
+ ### **🆕 Hidetag Commands**
2316
+ - **`!hidetag <text>`** - Alle erwähnen (unsichtbar)
2317
+ - **`!announce <text>`** - Admin-Ankündigung mit Hidetag
2318
+ - **`!whisper @user <text>`** - Geheime Nachricht
2319
+
2320
+ ### **🆕 Sticker Commands**
2321
+ - **`!sticker <url>`** - Sticker aus URL
2322
+ - **`!textsticker <text>`** - Text-Sticker
2323
+ - **Sende Bild mit "sticker"** - Auto-Sticker
2324
+
2325
+ ### **🆕 Plugin Commands**
2326
+ - **`!plugin-test`** - Alle 80+ Plugin Commands anzeigen
2327
+ - **`!plugins`** - Plugin Status und Statistiken
2328
+ - **`!balance`** - Economy: Kontostand anzeigen
2329
+ - **`!daily`** - Economy: Tägliche Belohnung
2330
+ - **`!dice`** - Games: Würfel werfen
2331
+ - **`!quiz`** - Games: Quiz starten
2332
+ - **`!play <song>`** - Music: Musik suchen
2333
+ - **`!weather <stadt>`** - Travel: Wetter abrufen
2334
+ - **`!wiki <begriff>`** - Education: Wikipedia suchen
2335
+ - **`!warn @user`** - Moderation: User warnen (Admin)
2336
+ - **`!automod on`** - Moderation: Auto-Mod aktivieren (Admin)
2337
+ - **`!meme 1 <text>`** - Creative: Meme erstellen
2338
+ - **`!joke`** - Creative: Witz erzählen
2339
+ - **`!mystats`** - Analytics: Eigene Statistiken
2340
+ - **`!topusers`** - Analytics: Top User anzeigen
2341
+ - **`!heatmap`** - Analytics: Aktivitätsmuster
2342
+
2343
+ ### **🆕 Plugin Test Commands**
2344
+ - **`!test-economy`** - Economy System testen
2345
+ - **`!test-games`** - Games Plugin testen
2346
+ - **`!test-creative`** - Creative Plugin testen
2347
+ - **`!test-analytics`** - Analytics Plugin testen
2348
+ - **`!test-all`** - Alle Plugins nacheinander testen
2349
+
2350
+ ---
2351
+
2352
+ *Made with ❤️ for WhatsApp Automation*
2353
+
2354
+ **Die mächtigste WhatsApp Bot Library - von 3-Zeilen-Bots bis zu KI-gestützten Enterprise Multi-Device Systemen mit vollständigem Plugin-Ecosystem (8 Plugins, 80+ Commands), Hidetag, Sticker Creation und Visual Recording!**