npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@shadow999/baileys

v2.1.4

Published

Modified Baileys library for WhatsApp Web automation (SHADOW-N PRO™ edition)

Readme

SHADOW-N PRO

A Powerful & Enhanced WhatsApp Web API Library

NPM Version Downloads License WhatsApp

  • ✅ 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


Banner

📑 Table of Contents


✨ 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/baileys

Or using yarn:

yarn add @shadow999/baileys

Or 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 state
  • config.printQRInTerminal - Print QR code in terminal (default: false)
  • config.logger - Custom logger instance
  • config.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:

  1. Fork the Repository

    git clone https://github.com/shadown999/baileys.git
  2. Create a Feature Branch

    git checkout -b feature/AmazingFeature
  3. Make Your Changes

    • Write clean, documented code
    • Follow existing code style
    • Add tests if applicable
  4. Commit Your Changes

    git commit -m 'Add some AmazingFeature'
  5. Push to Your Branch

    git push origin feature/AmazingFeature
  6. Open 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

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


Show your support by giving a ⭐ if this project helped you!

Star on GitHub