waengine
v1.7.4
Published
๐ WAEngine - The most powerful WhatsApp Bot Library with 400+ Advanced Features, Multi-Device Support & EasyBot API
Maintainers
Readme
๐ WAEngine v1.7.4 - Session Authentication Fix Edition
The most powerful WhatsApp Bot Library with 400+ Advanced Features
๐ Universal Cross-Platform - Works on ALL devices and platforms
๐ฏ Sequential Multi-Device - Professional QR scanning, one at a time
๐งน Clean Terminal - Anti-spam QR system, professional output
โก 3-Line Bot Creation - From beginners to enterprise
๐ 400+ Advanced Features โฌ๏ธ FIXED in v1.7.4
๐ Plugin System 2.0 - 8 built-in plugins with hot-loading
๐ต Advanced Media - Voice, Video, GIFs, Thumbnails
๐ฌ Rich Content - Buttons, Lists, Templates, Carousels
๐ฅ Group Management - Settings, Invites, Admin Tools
๐ Privacy & Security - Block/Unblock, Privacy Settings
๐ Analytics - Online Status, Delivery Tracking
๐ผ๏ธ Profile Pictures - Get/Send Profile Pictures
โก Quick Start (3 Lines!)
import { quickBot } from "waengine";
quickBot()
.when("hello").reply("Hi! ๐")
.when("voice test").voice("./audio.ogg") // NEW: Voice Messages!
.when("buttons").buttons("Choose:", [{ id: "1", text: "Option 1" }]) // NEW: Rich Content!
.start();That's it! Your advanced WhatsApp bot is running with 400+ features! ๐
๐ฆ Installation
npm install waengineRequirements:
- Node.js 16+
- A WhatsApp account for the bot
๐ What's New in v1.7.4 - Session Authentication Fix Edition
๐จ Critical Authentication Fixes
- FIXED: "Successfully connected" messages before QR-code scan
- FIXED: "Device erfolgreich authentifiziert" without authentication
- FIXED: Premature success messages with socket-only connection
- FIXED: Missing distinction between socket vs authenticated state
๐ฑ Enhanced QR-Code System
- FIXED: Multiple QR-codes (Single Device Mode default)
- FIXED: QR-code size issues (always small/extra-small)
- FIXED: QR-code showing with existing valid session
- ROBUST: Auth folder existence validation
๐ New Authentication Events
// NEW: Only fires after real authentication
client.on('truly_connected', (data) => {
console.log(`๐ Authenticated as: ${data.userId}`);
});๐ฏ Perfect Authentication Flow
- Socket connects โ "Socket verbunden - warte auf Authentifizierung..."
- QR-code displayed โ User scans QR-code
- Authentication happens โ
creds.updateevent - Success messages โ Only after
creds.me?.idexists - Bot ready โ
truly_connectedevent fired
๐ Previous Features (v1.7.3)
๐ต Advanced Media Features
- Voice Messages - Send voice notes with
msg.sendVoiceMessage() - Video Messages - Send video notes with
msg.sendVideoMessage() - GIF Support - Send animated GIFs with
msg.sendGif() - Thumbnails - Add thumbnails to videos and images
๐ฌ Advanced Message Features
- Forward Messages - Forward to mentions, sender, or specific chats
- Edit Messages - Edit sent messages with
msg.edit() - Pin Messages - Pin important messages in groups
- Star Messages - Star/bookmark messages
- Quote Messages - Quote and reply to messages
๐จ Rich Content Features
- Button Messages - Interactive buttons with callbacks
- List Messages - Organized lists with sections
- Template Messages - Reusable message templates
- Carousel Messages - Swipeable card carousels
๐ฅ Advanced Group Features
- Group Settings - Control who can send messages
- Group Description - Update group descriptions
- Invite Links - Generate and manage invite links
- Group Pictures - Update group profile pictures
๐ Privacy & Security Features
- Block/Unblock Users - Manage blocked contacts
- Privacy Settings - Control last seen, profile pic visibility
- Read Receipts - Mark messages as read/unread
๐ Analytics & Monitoring
- Online Status - Check if users are online
- Delivery Status - Track message delivery
- Archive Chats - Archive/unarchive conversations
- Mute Chats - Mute notifications for specific chats
๐ข Advanced Status Features
- Status Updates - Send text, image, video status
- Status Views - Track who viewed your status
- User Status - Get user's current status
๐ผ Business Features
- Business Profile - Set up business information
- Product Messages - Send product catalogs
- Payment Requests - Request payments from users
โ๏ธ System Features
- Backup & Restore - Backup chat data and settings
- Export Chats - Export chat history
- Device Management - Manage linked devices
- Sync with Phone - Sync with main WhatsApp
๐ผ๏ธ Profile Picture Features
- Get Profile Pictures - Retrieve user profile pictures
- Send Profile Pictures - Send profile pics in chat
- Commands:
!profilpic @userand!meinprofil
๐ Universal Cross-Platform QR System
- Works everywhere - Windows, macOS, Linux, Docker, Raspberry Pi, Android
- Intelligent browser detection - Edge, Chrome, Firefox, Safari auto-detection
- Smart fallback system - Playwright โ HTTP Server โ Terminal QR
- ES Module fixes - No more
require is not definederrors
๐ฏ Sequential Multi-Device Setup
- One QR at a time - No more confusion with multiple QR codes
- Progress indicators - Clear 1/3, 2/3, 3/3 progress
- Smart pauses - 3 seconds between devices for preparation
- Error handling - Continue on failure, robust setup
๐งน Clean QR System (Anti-Spam)
- No terminal spam - Max 3 QR displays, 30s intervals
- Multiple modes - Clean, Terminal Only, Browser Only, Silent
- Professional output - Terminal clearing, clean display
- Configurable - Customize intervals, max displays, modes
// v1.5.0 - Works on ALL platforms!
import { quickBot } from "waengine";
quickBot()
.when("hello").reply("Hi! ๐")
.start();
// โ
QR-Code automatically optimized for your platform!๐ฏ Choose Your API
๐ข EasyBot - For Beginners
Perfect for quick bots and learning:
import { createBot } from "waengine";
createBot()
.when("ping").reply("Pong! ๐")
.when("hello").reply("Hi there! ๐")
.command("time", () => new Date().toLocaleString())
.start();๐ง Advanced API - For Professionals
Full control and customization:
import { WhatsAppClient } from "waengine";
const client = new WhatsAppClient();
client.setPrefix('!');
// NEW: Ignore offline messages to prevent spam
client.ignore.message.offline(true);
client.on('message', async (msg) => {
if (msg.text === 'hello') {
await msg.simulateTyping('Hello! How can I help?');
}
});
await client.connect();๐ก Multi-Device - For Scale
Run multiple WhatsApp accounts simultaneously:
import { MultiWhatsAppClient } from "waengine";
const multiClient = new MultiWhatsAppClient({
maxDevices: 3,
loadBalancing: 'round-robin'
});
await multiClient.addDevice('bot1');
await multiClient.addDevice('bot2');
await multiClient.connect();
// Messages automatically load-balanced across devices!
await multiClient.sendMessage(chatId, { text: 'Hello from multi-device!' });โก EasyBot - For Beginners
Super Simple API
Create WhatsApp bots in minutes, not hours!
import { quickBot } from "waengine";
quickBot()
.when("hello").reply("Hi! ๐")
.start();๐ Enhanced Action Chaining v1.1.0
createBot()
.when("demo")
.react("๐ฌ")
.type(2)
.reply("Starting demo...")
.wait(1000)
.sendImage("demo.jpg", "Demo image")
.slowTypeWithMention("Hello @user! This is for you! ๐")
.aiReply("Explain this demo")
.saveData("demos", "count", 1)
.done()
.start();๐ New Mention Actions
bot
.when("hello").slowTypeWithMention("Hello @user! ๐")
.when("quick").quickTypeWithMention("Hey @user! โก")
.when("normal").normalTypeWithMention("Hi @user! ๐")
.when("mention").mentionSender("Thanks @user!")
.when("all").mentionAll("Hello everyone! ๐ฅ");EasyBot Features
const bot = createBot()
// Simple responses
.when("hello").reply("Hi! ๐")
.when("ping").reply("Pong! ๐")
// Auto-responses
.autoReply("hi", "Hello!")
.autoReply("bye", "Goodbye!")
// Commands
.command("help", "I can help you!")
.command("time", () => new Date().toLocaleString())
// Templates with variables
.template("greeting", "Hello {name}! Today is {day}")
.when("welcome").useTemplate("greeting")
// Conditional logic
.if("is group").then("reply Hello group!")
.if("contains bot").then("react ๐ค")
// Multi-device (optional)
.enableMultiDevice(2)
.start();EasyBot Multi-Device
import { multiBot } from "waengine";
multiBot(3) // 3 devices
.when("test").reply("Multi-device test!")
.command("status", "๐ Multi-device running!")
.start();Template System
bot
.template("info", "Hello {name}! Time: {time}, Date: {date}")
.template("status", "Chat: {chat} | Day: {day}")
.when("info").useTemplate("info")
.when("status").useTemplate("status");
// Available variables:
// {name} - Sender name
// {sender} - Sender JID
// {time} - Current time
// {date} - Current date
// {datetime} - Date + time
// {day} - Weekday
// {chat} - "Group" or "Private"๐ฅ Multi-Device Support
Multi-Device System
Run 2-3 WhatsApp accounts simultaneously for higher availability and load balancing!
import { MultiWhatsAppClient } from "waengine";
const multiClient = new MultiWhatsAppClient({
maxDevices: 3,
loadBalancing: 'round-robin' // round-robin, random, least-used, failover
});
// Add devices
await multiClient.addDevice('bot1');
await multiClient.addDevice('bot2');
await multiClient.addDevice('bot3');
// Connect all
await multiClient.connect();Load Balancing Strategies
// Round-robin (default)
multiClient.setLoadBalancingStrategy('round-robin');
// Random selection
multiClient.setLoadBalancingStrategy('random');
// Least used device
multiClient.setLoadBalancingStrategy('least-used');Smart Messaging
// Load-balanced sending
await multiClient.sendMessage(chatId, { text: 'Hello!' });
// Broadcast to all devices
await multiClient.broadcast(chatId, { text: 'Broadcast!' });
// With failover (if one device fails)
await multiClient.sendWithFailover(chatId, { text: 'Failover!' });
// Specific device
await multiClient.sendFromDevice('bot1', chatId, { text: 'From Bot1!' });Multi-Device Events
multiClient.on('message', async (msg) => {
console.log(`Message from device: ${msg.deviceId}`);
// Reply from same device
await msg.replyFromSameDevice('Same device reply');
// Reply via load balancing
await msg.replyFromAnyDevice('Load balanced reply');
// Broadcast reply
await msg.broadcastReply('Broadcast reply');
});
// Device status events
multiClient.on('device.connected', (data) => {
console.log(`โ
Device ${data.deviceId} connected`);
});
multiClient.on('device.disconnected', (data) => {
console.log(`๐ด Device ${data.deviceId} disconnected`);
});Health Monitoring
// Get status
const status = multiClient.getStatus();
console.log(`${status.activeDevices}/${status.totalDevices} devices active`);
// Health check
const health = multiClient.getHealthCheck();
console.log(`Health: ${health.healthPercentage}% - ${health.recommendation}`);
// Device stats
const stats = multiClient.getDeviceStats();Multi-Device Benefits:
โ
Higher availability - If one account gets banned, others continue
โ
Load distribution - Spread messages across multiple accounts
โ
Rate limit bypass - WhatsApp limits per account
โ
Automatic failover - Seamless switching on failures
โ
Separate auth - Each device has its own authentication
๐ Authentication
Persistent Authentication
- โ One-time QR scan โ Always auto-connect
- โ Microsoft Edge integration - QR code in browser
- โ Terminal fallback - QR code in terminal
- โ Auto-reconnect - Automatic reconnection
const client = new WhatsAppClient({
authDir: "./auth", // Auth data storage
printQR: false, // QR in browser (true = terminal)
logLevel: "silent" // Log level
});๐ฌ Message System
Basic Messaging
// Simple reply
await msg.reply("Hello!")
// With mentions
await msg.reply("Hello @user!", [userJid])Media Messages
// Images
await msg.sendImage("path/image.jpg", "Caption", [mentions])
// Videos
await msg.sendVideo("path/video.mp4", "Caption", [mentions])
// Audio
await msg.sendAudio("path/audio.mp3")
// Stickers
await msg.sendSticker("path/sticker.webp")
// Documents
await msg.sendDocument("path/file.pdf", "filename.pdf", [mentions])Special Messages
// Location
await msg.sendLocation(latitude, longitude)
// Contact
await msg.sendContact(vcard, "Display Name")
// Emoji reaction
await msg.react("๐")
// Delete message
await msg.delete()Message Properties
msg.id // Message ID
msg.from // Sender JID
msg.text // Message text
msg.type // text, image, video, audio, etc.
msg.isGroup // true/false
msg.timestamp // Unix timestamp
msg.raw // Raw Baileys object๐ญ Typing Indicator
Manual Control
// Start/stop typing
await msg.visualWrite(true) // Typing ON
await msg.visualWrite(false) // Typing OFF
// Typing for specific time
await msg.typeFor(3000) // 3 seconds typingTyping + Reply Combined
// Fixed time
await msg.typeAndReply("Message", 2000) // 2 seconds typing
// Realistic typing
await msg.simulateTyping("Long text...", {
typingSpeed: 50, // ms per character
minTypingTime: 1000, // Minimum time
maxTypingTime: 5000, // Maximum time
mentions: [userJid] // With mentions
})๐ฅ Group Management
Group Information
// Group metadata
const metadata = await client.get.GroupMetadata(groupId)
// All participants
const participants = await client.get.GroupParticipants(groupId)
// Only admins
const admins = await client.get.GroupAdmins(groupId)User Management
// Add user
await client.add.user(groupId, [userJid], [mentions])
// Remove user
await client.kick.user(groupId, [userJid], [mentions])
// Promote to admin
await client.promote.user(groupId, [userJid], [mentions])
// Remove admin
await client.demote.user(groupId, [userJid], [mentions])Mention System
// Mention single person
await msg.replyWithMention("Hello @user!", userJid)
// Mention all in group
await msg.mentionAll("Hello everyone!")
// NEW in v1.1.0: Mention with Typing
await msg.slowTypeWithMention("Hello @user! How are you?", userJid)
await msg.quickTypeWithMention("Hey @user! ๐", userJid)
await msg.normalTypeWithMention("Hi @user, nice to see you!", userJid)
// Get mentions from message
const mentions = msg.getMentions()
// Check if mentioned
const isMentioned = msg.isMentioned(userJid)๐ก๏ธ Permission System
Permission Checks
// Admin checks
const isAdmin = await msg.isAdmin() // Is sender admin?
const isBotAdmin = await msg.isBotAdmin() // Is bot admin?
const isOwner = await msg.isOwner() // Is sender owner?
// Chat type checks
const isGroup = msg.isGroup // Is group?
const isPrivate = msg.isPrivate() // Is private chat?
// Sender info
const senderJid = msg.getSender() // Sender JIDUsage in Commands
client.addCommand('kick', async (msg, args) => {
if (!msg.isGroup) {
return msg.reply('โ Groups only!')
}
if (!(await msg.isAdmin())) {
return msg.reply('โ Admins only!')
}
if (!(await msg.isBotAdmin())) {
return msg.reply('โ Bot needs admin rights!')
}
// Kick logic...
})๐ Statistics System
Message Statistics
// Message counts
const stats = await msg.stats.getMessageCount()
// Returns: { total: 1234, today: 56, thisWeek: 234 }
// User activity
const activity = await msg.stats.getUserActivity(userId)
// Returns: { messagesCount: 123, lastSeen: Date, isActive: true }
// Group stats (groups only)
const groupStats = await msg.stats.getGroupStats()
// Returns: { groupName, totalMembers, admins, created, description }
// Top active users
const topUsers = await msg.stats.getMostActiveUsers(5)
// Messages by type
const messageTypes = await msg.stats.getMessagesByType()
// Returns: { text: 500, image: 100, video: 50, ... }๐ฏ Command System
Prefix Setup
// Global Prefix (Fallback)
const prefix = "!"
client.setPrefix(prefix)
// Chat-spezifische Prefixes (NEU in v1.0.7!)
client.setChatPrefix(chatId, "#") // Fรผr spezifischen Chat
client.getChatPrefix(chatId) // Prefix abrufen
client.removeChatPrefix(chatId) // Prefix entfernen
// Commands registrieren
client.addCommand('help', async (msg, args) => {
await msg.reply('Help text')
})Chat-spezifische Prefixes (v1.0.7)
Jeder Chat/Gruppe kann einen eigenen Prefix haben:
// Setprefix Command (Admin only)
client.addCommand('setprefix', async (msg, args) => {
if (msg.isGroup && !(await msg.isAdmin())) {
return msg.reply('โ Nur Admins kรถnnen den Prefix รคndern!');
}
const newPrefix = args[0];
client.setChatPrefix(msg.from, newPrefix);
await msg.reply(`โ
Prefix geรคndert zu: "${newPrefix}"`);
});
// Prefix Info Command
client.addCommand('prefixinfo', async (msg) => {
const chatPrefix = client.getChatPrefix(msg.from);
const stats = client.getPrefixStats();
await msg.reply(`๐ฏ Aktueller Prefix: "${chatPrefix}"\n๐ Gesamt Chats: ${stats.totalChats}`);
});Features:
- โ Persistent Storage - Prefixes werden automatisch gespeichert
- โ Admin-only - Nur Admins kรถnnen Prefixes in Gruppen รคndern
- โ Validierung - Max 5 Zeichen, keine Leerzeichen
- โ Statistics - รbersicht รผber alle verwendeten Prefixes
- โ Fallback - Global Prefix als Standard
Command Properties
// In message events
if (msg.isCommand) {
console.log(msg.command) // "help"
console.log(msg.args) // ["arg1", "arg2"]
console.log(msg.commandText) // "help arg1 arg2"
}Command Management
// List commands
const commands = client.getCommands()
// Remove command
client.removeCommand('help')
// Get prefix
const currentPrefix = client.getPrefix()๐ Poll Integration
Create Polls
// Simple poll
await msg.sendPoll('Favorite pizza?', ['Margherita', 'Pepperoni', 'Hawaiian'])
// Multi-selection poll
await msg.sendMultiPoll('Which colors?', ['Red', 'Blue', 'Green'], 2)Fallback System
If native polls don't work, the library automatically uses emoji fallback:
๐ **Favorite pizza?**
1๏ธโฃ Margherita
2๏ธโฃ Pepperoni
3๏ธโฃ Hawaiian
_React with the corresponding emoji!_๐ง Event System
Event Registration
// Message events
client.on('message', (msg) => {
console.log(`Message from ${msg.from}: ${msg.text}`)
})
// Command events
client.on('command', (msg) => {
console.log(`Command: ${msg.command}`)
})
// Connection events
client.on('connected', () => {
console.log('Connected!')
})
client.on('disconnected', (data) => {
console.log('Disconnected:', data.reason)
})
// Group events
client.on('group.participants.update', (update) => {
console.log('Group changed:', update)
})
// Presence events
client.on('presence.update', (update) => {
console.log('Status changed:', update)
})Event Management
// Remove event handler
client.off('message', handler)
// Emit custom event
client.emit('custom-event', data)๐ฑ QR Code System
QR Code Generation
import { generateQRCode } from "waengine"
// Generate QR code
await generateQRCode()
// QR code with data
await generateQRCode(qrData)
// Close browser
await closeBrowser()Features
- โ Microsoft Edge integration - Automatic opening
- โ Terminal fallback - QR in terminal if browser fails
- โ Auto-close - Browser closes automatically after login
๐ง Utility Functions
Connection Management
// Connect
await client.connect()
// Disconnect
await client.disconnect()
// Get status
const state = client.getConnectionState()
// Returns: { isConnected: true, socket: true }Presence Management
// Global presence
await client.setOnline()
await client.setOffline()
await client.setTyping(chatId)
await client.setRecording(chatId)
await client.setPaused(chatId)Message Type Detection
const type = client.getMessageType(message)
// Returns: text, image, video, audio, document, sticker, location, contact, unknown๐ Examples
EasyBot (Beginners)
import { quickBot } from "waengine";
// 3 lines = complete bot!
quickBot()
.when("hello").reply("Hi! ๐")
.start();EasyBot with Action Chaining
import { createBot } from "waengine";
createBot()
.when("important")
.react("โ ๏ธ") // Reaction
.type(2) // 2 seconds typing
.reply("Important!") // Reply
.react("โ
") // Another reaction
.done() // Back to bot
.when("party")
.react("๐")
.type(1)
.reply("Party! ๐ฅณ")
.done()
.command("help", "I can help you!")
.autoReply("hi", "Hello!")
.start();EasyBot Multi-Device
import { multiBot } from "waengine";
multiBot(2) // 2 devices
.when("test").reply("Multi-device test!")
.command("status", "๐ 2 devices active!")
.start();Multi-Device Bot
import { MultiWhatsAppClient } from "waengine";
const multiClient = new MultiWhatsAppClient({
maxDevices: 3,
loadBalancing: 'round-robin'
});
// Add devices
await multiClient.addDevice('main-bot');
await multiClient.addDevice('backup-bot');
await multiClient.addDevice('support-bot');
// Commands for all devices
multiClient.setPrefix('!');
multiClient.addCommand('ping', async (msg) => {
await msg.replyFromSameDevice(`Pong from ${msg.deviceId}! ๐`);
});
multiClient.addCommand('status', async (msg) => {
const status = multiClient.getStatus();
await msg.replyFromSameDevice(`๐ ${status.activeDevices}/${status.totalDevices} devices active`);
});
multiClient.addCommand('broadcast', async (msg, args) => {
const message = args.join(' ');
await multiClient.broadcast(msg.from, { text: `๐ข ${message}` });
});
// Events
multiClient.on('message', async (msg) => {
if (msg.text === 'hello') {
// Load-balanced response
await multiClient.sendMessage(msg.from, {
text: `Hello from ${msg.deviceId}! ๐`
});
}
});
// Connect all devices
await multiClient.connect();
console.log("๐ Multi-device bot running!");Advanced Bot
import { WhatsAppClient } from "waengine";
const client = new WhatsAppClient();
const prefix = "!";
client.setPrefix(prefix);
// Commands
client.addCommand('ping', async (msg) => {
await msg.typeAndReply('Pong! ๐', 1000);
});
client.addCommand('info', async (msg) => {
await msg.visualWrite(true);
await new Promise(r => setTimeout(r, 2000));
await msg.visualWrite(false);
await msg.reply('Bot info: Running perfectly! โ
');
});
// Events
client.on('message', async (msg) => {
if (msg.text === 'hello') {
await msg.simulateTyping('Hello! How are you?');
}
});
await client.connect();Interactive Bot
client.on('message', async (msg) => {
if (msg.text.includes('how are you')) {
await msg.visualWrite(true);
await new Promise(r => setTimeout(r, 3000));
await msg.visualWrite(false);
await msg.reply('I\'m doing great, thanks! ๐ How about you?');
}
if (msg.text.includes('poll')) {
await msg.quickType('Creating poll...');
await msg.sendPoll('How do you like the bot?', ['Great!', 'Good', 'Okay', 'Bad']);
}
});๐ฎ Available Commands (Test Bot)
!help- Show all commands!ping- Pong response!stats- Show statistics!kick @user- Kick user (admin only)!debug- Debug information!poll "Question" "Opt1" "Opt2"- Create poll!demo- Typing demo!customtype 3000 "Text"- Custom typing!slowtype "Text"- Slow typing
๐ Advanced Features v1.7.3
๐ต Advanced Media Features
// Voice Messages
await msg.sendVoiceMessage('./audio.ogg');
await msg.sendVoiceToMentioned('./audio.ogg'); // To all mentioned users
// Video Messages
await msg.sendVideoMessage('./video.mp4');
await msg.sendVideoMessageToMentioned('./video.mp4');
// GIF Support
await msg.sendGif('./animation.gif', 'Cool animation!');
await msg.sendGifToMentioned('./animation.gif', 'For everyone!');
// EasyBot Integration
bot.when('voice test').voice('./audio.ogg').done();
bot.when('gif test').gif('./animation.gif', 'Test GIF').done();๐ฌ Advanced Message Features
// Forward Messages
await msg.forward('[email protected]'); // To specific chat
await msg.forwardToMentioned(); // To all mentioned users
await msg.forwardToSender(); // Back to sender
// Edit Messages
await msg.edit('New message content');
// Pin/Unpin Messages (Groups only)
await msg.pin();
await msg.unpin();
// Star/Unstar Messages
await msg.star();
await msg.unstar();
// Quote Messages
await msg.quote('This is a quote!');
// EasyBot Integration
bot.when('forward test').forward().done(); // Auto to mentions or sender
bot.when('pin test').pin().done();
bot.when('star test').star().done();๐จ Rich Content Features
// Button Messages
const buttons = [
{ id: 'btn1', text: 'โ
Yes' },
{ id: 'btn2', text: 'โ No' },
{ id: 'btn3', text: '๐ค Maybe' }
];
await msg.sendButtons('Choose an option:', buttons, 'Footer text');
// List Messages
const sections = [
{
title: 'Category 1',
rows: [
{ title: 'Option 1', description: 'Description 1', id: 'opt1' },
{ title: 'Option 2', description: 'Description 2', id: 'opt2' }
]
}
];
await msg.sendList('Title', 'Description', 'Button Text', sections);
// EasyBot Integration
bot.when('button test')
.buttons('Choose:', [{ id: 'opt1', text: 'Option 1' }], 'Footer')
.done();
bot.when('list test')
.list('Title', 'Description', 'Button', sections)
.done();๐ฅ Advanced Group Features
// Group Information
const metadata = await client.get.GroupMetadata(groupId);
// Group Settings
await client.group.setSettings(groupId, {
messagesAdminOnly: true,
editGroupInfo: 'admin_only'
});
// Group Description & Subject
await client.group.setDescription(groupId, 'New description');
await client.group.setSubject(groupId, 'New group name');
// Invite Links
const inviteLink = await client.group.getInviteLink(groupId);
await client.group.revokeInviteLink(groupId);
// EasyBot Integration
bot.when('group info').groupInfo().done();
bot.when('invite').inviteLink().done();๐ Privacy & Security Features
// Block/Unblock Users
await client.privacy.block('[email protected]');
await client.privacy.unblock('[email protected]');
// Privacy Settings
await client.privacy.setSettings({
lastSeen: 'contacts', // 'everyone', 'contacts', 'nobody'
profilePic: 'contacts',
status: 'contacts'
});
// Read Receipts
await client.privacy.markRead(chatId, messageId);
await client.privacy.markUnread(chatId);
// EasyBot Integration
bot.when('block user').block().done(); // Blocks mentions or sender
bot.when('unblock user').unblock().done();๐ Analytics & Monitoring
// Online Status
const isOnline = await client.analytics.isOnline('[email protected]');
const lastSeen = await client.analytics.getLastSeen('[email protected]');
// Delivery Status
const status = await client.analytics.getDeliveryStatus(messageKey);
// Archive/Unarchive Chats
await client.analytics.archiveChat(chatId);
await client.analytics.unarchiveChat(chatId);
// Mute/Unmute Chats
await client.analytics.muteChat(chatId, 8 * 60 * 60 * 1000); // 8 hours
await client.analytics.unmuteChat(chatId);
// EasyBot Integration
bot.when('check online').checkOnline().done(); // Checks mentions or sender
bot.when('archive').archive().done();
bot.when('mute').mute(480).done(); // 480 minutes = 8 hours๐ข Advanced Status Features
// Send Status Updates
await client.status.send('text', 'My status text', {
backgroundColor: '#000000',
font: 0
});
await client.status.send('image', './status-image.jpg', {
caption: 'Status image'
});
// Get Status Views
const views = await client.status.getViews();
// EasyBot Integration
bot.when('status test').sendStatus('Status text').done();๐ผ๏ธ Profile Picture Features
// Get Profile Pictures
const profilePicUrl = await msg.getProfilePicture('[email protected]');
// Send Profile Pictures
await msg.sendProfilePicture('[email protected]', 'Profile pic caption');
// Commands
client.addCommand('profilpic', async (msg, args) => {
const mentions = msg.getMentions();
if (mentions.length > 0) {
await msg.sendProfilePicture(mentions[0]);
}
});
client.addCommand('meinprofil', async (msg, args) => {
await msg.sendProfilePicture(msg.getSender(), 'Your profile picture');
});โ๏ธ System Features
// Backup & Restore
const backup = await client.system.backup();
await client.system.restoreFromBackup(backupData);
// Export Chat
const chatHistory = await client.system.exportChat(chatId, 'json');
// Device Management
const devices = await client.system.getLinkedDevices();
await client.system.unlinkDevice('device-id');
// EasyBot Integration
bot.when('backup').backup().done();๐ค EasyBot Advanced Integration
const bot = EasyBot.create();
// Complex chains with all advanced features
bot
.when('test all')
.voice('./audio.ogg')
.forward()
.pin()
.star()
.buttons('Choose:', [{ id: 'opt1', text: 'Option 1' }])
.groupInfo()
.checkOnline()
.archive()
.sendStatus('Test status')
.backup()
.reply('All features tested!')
.done();
// Advanced EasyBot with all features enabled
const advancedBot = EasyBot.create()
.enableDefaults()
.enableAll(); // Activates all standard features๐ Test All Advanced Features
# Run comprehensive test
node advanced-features-test.js
# Test specific features
node test.js๐ฏ Advanced Features Commands
!voice <path>- Send voice message!videomsg <path>- Send video message!gif <path> [caption]- Send GIF!forward- Forward message!pin- Pin message (admin)!star- Star message!buttons [text]- Button message!list- List message!groupinfo- Group information!invitelink- Invite link (admin)!block [@user]- Block user!unblock [@user]- Unblock user!online [@user]- Check online status!archive- Archive chat!mute [minutes]- Mute chat!status <text>- Send status!profilpic @user- Send profile picture!meinprofil- Send own profile picture!backup- Create backup
๐ฅ Feature Count v1.7.3
Total: 400+ Functions and Features!
- Advanced Media Features: 50+
- Advanced Message Features: 40+
- Rich Content Features: 35+
- Group Management: 30+
- Privacy & Security: 25+
- Analytics & Monitoring: 30+
- Status Features: 20+
- Business Features: 25+
- System Features: 35+
- Profile Picture Features: 10+
- EasyBot Integration: 100+
๐ฅ Feature Count
Total: 120+ Functions and Features!
- Message Functions: 15+
- Group Functions: 8+
- Permission Functions: 6+
- Statistics Functions: 5+
- Typing Functions: 8+
- Command System: 10+
- Event System: 8+
- QR Functions: 3+
- Utility Functions: 15+
- Multi-Device System: 20+
- ๐ EasyBot System: 25+
๐ Why Choose This Library?
๐ฏ Three APIs in One
- EasyBot - 3-line bot creation for beginners
- Advanced - Full control for professionals
- Multi-Device - Scale with multiple accounts
๐ฅ Unique Features
- Multi-Device Load Balancing - Industry first!
- Action Chaining - jQuery-style bot building
- Realistic Typing - Human-like interactions
- Edge QR Integration - Seamless authentication
- Template System - Dynamic content with variables
๐ช Production Ready
- Persistent Auth - One-time setup
- Auto Reconnection - Handles disconnections
- Health Monitoring - Track device status
- Error Handling - Graceful failure recovery
- TypeScript Support - Full type definitions
๐ Scalable Architecture
- Load Balancing - Distribute message load
- Failover System - Automatic device switching
- Rate Limit Bypass - Multiple account limits
- Plugin Ready - Extensible for v2.0
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Quick Contribute
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ฎ Roadmap (v2.0)
- ๐ Plugin System - Extensible architecture
- ๐พ Database Integration - Persistent storage
- ๐ Web Dashboard - Browser-based management
- ๐ Scheduled Messages - Cron-like scheduling
- ๐ก๏ธ Advanced Moderation - Auto-spam detection
- ๐ค AI Integration - ChatGPT/Claude support
- ๐ Analytics Dashboard - Detailed insights
- ๐ฎ Game Framework - Interactive bot games
๐ Support
- โญ Star this repository if you find it helpful
- ๐ Report bugs via GitHub Issues
- ๐ก Request features via GitHub Discussions
- ๐ง Contact for commercial support
๐ Contributors
Thanks to all contributors who make this project possible! ๐
Made with โค๏ธ for WhatsApp Automation
The most powerful WhatsApp bot library - from 3-line bots to enterprise multi-device systems!
