@shadow999/baileys
v2.1.4
Published
Modified Baileys library for WhatsApp Web automation (SHADOW-N PRO™ edition)
Maintainers
Readme
SHADOW-N PRO
A Powerful & Enhanced WhatsApp Web API Library
- ✅ Group working and no any errors
- ✅ Bad Mac error fixed
- ✅ Channel working
- ✅ Interactive buttons
- ✅ All functions working and nominal
A modified and enhanced version of Baileys - the lightweight, WebSocket-based TypeScript/JavaScript library for interacting with WhatsApp Web API.
✨ Built with ❤️ by Nethupa Methwan

📑 Table of Contents
- ✨ Features
- 📦 Installation
- 🚀 Quick Start
- 💡 Usage Examples
- 🎯 Why SHADOW-N PRO
- 📚 API Documentation
- ⚠️ Disclaimer
- 🤝 Contributing
- 📄 License
- 📧 Contact
✨ Features
🔐 Authentication & Security
- ✅ Multi-device support with QR code authentication
- ✅ Pairing code login support
- ✅ Secure session management
- ✅ Automatic credential saving
💬 Messaging Capabilities
- ✅ Send/receive text messages
- ✅ Images, videos, and audio files
- ✅ Documents with custom filenames
- ✅ Stickers and GIFs support
- ✅ Message reactions and replies
- ✅ Read receipts and delivery status
👥 Group Management
- ✅ Create and delete groups
- ✅ Add/remove participants
- ✅ Update group settings
- ✅ Admin privilege management
- ✅ Group invite links
⚡ Performance & Reliability
- ✅ Lightweight and efficient
- ✅ Automatic reconnection handling
- ✅ Event-driven architecture
- ✅ Full TypeScript support
- ✅ Real-time updates
- ✅ Presence management (online, typing, recording)
📦 Installation
Install using npm:
npm install @shadow999/baileysOr using yarn:
yarn add @shadow999/baileysOr using pnpm:
pnpm add @shadow999/baileys🚀 Quick Start
Get up and running in minutes with this simple example:
const {
fetchLatestBaileysVersion,
useMultiFileAuthState,
default: makeWASocket
} = require('@shadow999/baileys')
async function connectSession(sessionName, sessionPath, manager) {
try {
// Load Baileys version
const { version } = await fetchLatestBaileysVersion()
// Load authentication state
const { state, saveCreds } = await useMultiFileAuthState(sessionPath)
// Create WhatsApp connection
const conn = makeWASocket({
logger: manager.P({ level: 'silent' }),
printQRInTerminal: false,
auth: state,
syncFullHistory: true,
msgRetryCounterCache: manager.msgRetryCounterCache,
getMessage: async (key) => undefined
})
// Store connection
manager.activeConnections.set(sessionName, {
conn,
sessionName,
sessionPath,
connected: false,
startTime: Date.now(),
lastSeen: Date.now()
})
// Reset reconnect tracking
manager.reconnectAttempts.set(sessionName, 0)
manager.reconnectDelay.set(sessionName, 5_000)
// Setup event handlers
manager.setupEventHandlers(sessionName, conn, saveCreds)
console.log(`✅ Session "${sessionName}" connected successfully!`)
} catch (error) {
console.error(`❌ Error connecting to ${sessionName}:`, error.message)
}
}💡 Usage Examples
📤 Send a Text Message
await sock.sendMessage('[email protected]', {
text: 'Hello from SHADOW-N PRO! 👋'
})📷 Send an Image with Caption
await sock.sendMessage('[email protected]', {
image: { url: './path/to/image.jpg' },
caption: 'Check out this amazing image! 📸'
})🎥 Send a Video
await sock.sendMessage('[email protected]', {
video: { url: './path/to/video.mp4' },
caption: 'Awesome video! 🎬',
gifPlayback: false // Set to true for GIF-style playback
})📄 Send a Document
await sock.sendMessage('[email protected]', {
document: { url: './document.pdf' },
mimetype: 'application/pdf',
fileName: 'ImportantDocument.pdf'
})🎤 Send an Audio Message
await sock.sendMessage('[email protected]', {
audio: { url: './audio.mp3' },
mimetype: 'audio/mp4',
ptt: true // Set to true for voice message
})💬 Reply to a Message
await sock.sendMessage('[email protected]', {
text: 'This is a reply!',
quoted: msg // The message object you're replying to
})❤️ React to a Message
await sock.sendMessage('[email protected]', {
react: {
text: '❤️', // Emoji to react with
key: msg.key // Key of the message to react to
}
})👥 Create a Group
const group = await sock.groupCreate('My Awesome Group', [
'[email protected]',
'[email protected]'
])
console.log('✅ Group created with ID:', group.id)➕ Add Participant to Group
await sock.groupParticipantsUpdate(
'[email protected]',
['[email protected]'],
'add'
)🚫 Remove Participant from Group
await sock.groupParticipantsUpdate(
'[email protected]',
['[email protected]'],
'remove'
)👑 Promote to Admin
await sock.groupParticipantsUpdate(
'[email protected]',
['[email protected]'],
'promote'
)📝 Update Group Subject
await sock.groupUpdateSubject('[email protected]', 'New Group Name')📋 Update Group Description
await sock.groupUpdateDescription('[email protected]', 'New group description here')🔗 Get Group Invite Link
const code = await sock.groupInviteCode('[email protected]')
console.log('Invite link: https://chat.whatsapp.com/' + code)👁️ Update Presence (Typing/Recording)
// Show typing indicator
await sock.sendPresenceUpdate('composing', '[email protected]')
// Show recording indicator
await sock.sendPresenceUpdate('recording', '[email protected]')
// Mark as available/online
await sock.sendPresenceUpdate('available')✅ Mark Messages as Read
await sock.readMessages([msg.key])🎯 Why SHADOW-N PRO?
SHADOW-N PRO is built on top of the community-maintained Baileys library with significant enhancements and optimizations:
| Feature | SHADOW-N PRO | Standard Baileys | |---------|--------------|------------------| | Performance | ⚡ Optimized & Fast | 🐢 Standard | | Updates | ✅ Regular Updates | ⚠️ Community-dependent | | Stability | ✅ Enhanced Error Handling | ⚠️ Basic | | TypeScript | ✅ Full Support | ✅ Full Support | | Documentation | ✅ Comprehensive | ⚠️ Limited | | Maintenance | ✅ Actively Maintained | ✅ Community Maintained | | Additional Features | ✅ Enhanced Methods | ❌ Standard Only |
🌟 Key Improvements:
- 🔧 Better error handling and logging
- ⚡ Performance optimizations
- 🛡️ Enhanced security features
- 📖 Improved documentation
- 🔄 More reliable reconnection logic
- 🎨 Additional helper methods
📚 API Documentation
Core Methods
makeWASocket(config)
Creates a new WhatsApp socket connection.
Parameters:
config.auth- Authentication stateconfig.printQRInTerminal- Print QR code in terminal (default: false)config.logger- Custom logger instanceconfig.browser- Browser information
Returns: Socket instance
useMultiFileAuthState(folder)
Manages authentication state using file system.
Parameters:
folder- Directory to store auth files
Returns: Object with state and saveCreds function
Events
connection.update
Fired when connection status changes.
creds.update
Fired when credentials need to be saved.
messages.upsert
Fired when new messages arrive.
messages.update
Fired when messages are updated (read, delivered, etc.)
presence.update
Fired when contact presence changes.
groups.update
Fired when group information updates.
For complete API documentation, visit the Baileys Wiki.
⚠️ Disclaimer
Important Notice
This project is NOT affiliated with, endorsed by, or officially connected to:
- WhatsApp Inc.
- Meta Platforms, Inc.
- Any of their subsidiaries or affiliates
The official WhatsApp website: whatsapp.com
Responsible Use
This library should ONLY be used for:
- ✅ Personal automation and productivity
- ✅ Educational and research purposes
- ✅ Building legitimate chatbots and tools
- ✅ Non-commercial personal projects
DO NOT use this library for:
- ❌ Spamming or bulk unsolicited messaging
- ❌ Automated marketing without explicit consent
- ❌ Stalkerware, surveillance, or privacy violations
- ❌ Scraping user data without permission
- ❌ Any activities that violate WhatsApp's Terms of Service
- ❌ Commercial use without proper authorization
Legal Responsibility
⚖️ You are solely responsible for how you use this library. The maintainers and contributors are not liable for any misuse or damages resulting from the use of this software. Always ensure your use case complies with:
- WhatsApp Terms of Service
- Local laws and regulations
- Privacy and data protection laws (GDPR, CCPA, etc.)
- Applicable telecommunications regulations
Account Safety
⚠️ Warning: Using unofficial WhatsApp clients can result in:
- Temporary or permanent account suspension
- Ban from WhatsApp services
- Loss of access to your WhatsApp account
Use at your own risk and always maintain backups of important data.
🤝 Contributing
Contributions are always welcome! We appreciate your help in making SHADOW-N PRO better.
How to Contribute:
Fork the Repository
git clone https://github.com/shadown999/baileys.gitCreate a Feature Branch
git checkout -b feature/AmazingFeatureMake Your Changes
- Write clean, documented code
- Follow existing code style
- Add tests if applicable
Commit Your Changes
git commit -m 'Add some AmazingFeature'Push to Your Branch
git push origin feature/AmazingFeatureOpen a Pull Request
Contribution Guidelines:
- 📝 Clear commit messages
- 🧪 Test your changes thoroughly
- 📖 Update documentation if needed
- 🎨 Follow code style conventions
- 🐛 Include bug fixes with test cases
📄 License
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 Nethupa Methwan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.💖 Support & Star
If you find this project helpful, please consider:
⭐ Starring the repository on GitHub
🐛 Reporting bugs you encounter
💡 Suggesting new features
📢 Sharing with others who might find it useful
Your support helps keep this project alive and growing!
📧 Contact
Developer: Nethupa Methwan
- 💼 GitHub: @shadown999
- 📧 Email: [email protected]
- 💬 Telegram: https://t.me/shadown999
For bug reports and feature requests, please use the GitHub Issues page.
🙏 Acknowledgments
Special thanks to:
- The original Baileys library creators and maintainers
- The WhatsApp Web reverse engineering community
- All contributors and users of SHADOW-N PRO
- Open source community for continuous support
Made with 💻 and ☕ by Nethupa Methwan
© 2024 SHADOW-N PRO • All Rights Reserved
