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

@mrhansamala/nexus-baileys

v1.0.2

Published

NexusBaileys — Official WhatsApp Web API library. Unified build of @ostyado/baileys, @whiskeysockets/baileys, and nexus-baileys-enhanced. Includes poll vote detection, reaction auto-reply, native flow buttons, spaced buttons, channel features, and advance

Readme

🚀 Nexus Baileys v1.0.1

Advanced WhatsApp Multi-Device Framework

Powerful tools for building WhatsApp Bots, Automation Systems, and Business Solutions

Version NodeJS License

📖 Introduction

Nexus Baileys is a powerful WhatsApp Multi-Device framework built on Baileys. It allows you to handle the following without the need for Selenium, Chrome, Puppeteer, or any browser automation:

  • 🤖 AI Chatbots
  • 🛎️ Customer Support Systems
  • 👥 Group Management Bots
  • 📥 Download Bots
  • 🏢 Business Automation
  • 🔐 OTP Systems
  • ✅ Verification Systems
  • 📊 Trading Bots
  • 🛡️ Moderation Systems

✨ Features

📨 Sending Messages

| Type | Description | |--------|----------| | 📝 Text Messages | Plain text messages | | 🖼️ Images | Sending photos | | 🎬 Videos | Sending video files | | 🎵 Audio | Sending audio files | | 🎤 Voice Notes | Voice messages (ptt) | | 📄 Documents | PDF, DOC, etc. | | 🏷️ Stickers | Sticker messages | | 🎞️ GIF | Animated images | | 👁️ View Once | View Once messages | | 📇 Contacts | Sharing VCARDs | | 📍 Location | Sharing locations | | @ Mentions | Tagging users | | ❤️ Reactions | Reacting to messages | | ↩️ Revoke | Revoking messages | | 💬 Replies | Reply messages | | 🗳️ Polls | Poll messages |


🎛️ Interactive Messages

  • Quick Reply Buttons – Quick Reply Buttons
  • 🔗 CTA URL Buttons – Action Buttons
  • 📋 List Messages – List Messages
  • 🗳️ Poll Handling – Poll Vote Handler
  • ❤️ Reaction Handling – Reaction Handler

👥 Group Management

  • ➕ Create groups
  • ❌ Delete groups
  • 👤 Add/Remove members
  • ⬆️ Promote admins
  • ⬇️ Demote admins
  • 🔒 Lock/Unlock groups
  • 📨 Invite management
  • 📥 Join requests

🤖 Automation

  • Auto Reply – Auto Reply
  • 🔥 Auto React – Auto React
  • 👀 Auto Read – Auto Read
  • ⌨️ Auto Typing – Auto Typing
  • 🎤 Auto Recording – Auto Recording
  • 👋 Welcome Messages – Welcome Messages
  • 👋 Goodbye Messages – Goodbye Messages
  • 🔗 Anti Link – Prevent links
  • 🗑️ Anti Delete – Prevent deletion
  • 🛑 Anti Spam – Prevent spam messages
  • 👁️ Anti ViewOnce – Prevent View Once
  • 🚫 Anti Bad Words – Prevent offensive words

📢 Status and Channels

  • 📝 Upload text status
  • 🖼️ Upload image status
  • 🎬 Upload video status
  • ❤️ React to statuses
  • 👀 View statuses
  • 📡 WhatsApp Channel support

📞 Calls

  • 📞 Call detection
  • 🚫 Auto-reject calls
  • 🚷 Auto-block callers

📦 ස්ථාපනය

npm install @mrhansamala/nexus-baileys

හෝ

yarn add @mrhansamala/nexus-baileys

⚙ Requirements

Node.js >= 20
WhatsApp Multi Device must be enabled

🔗 Connecting to WhatsApp

📱 QR Code Login

const {
 makeWASocket,
 useMultiFileAuthState
} = require("@mrhansamala/nexus-baileys")

const {
 state,
 saveCreds
} = await useMultiFileAuthState("./session")

const sock = makeWASocket({
 auth: state,
 printQRInTerminal: true
})

sock.ev.on(
 "creds.update",
 saveCreds
)

🔢 Pairing Code Login

const code =
await sock.requestPairingCode(
 "94771234567"
)

console.log(code)

📨 Sending Messages

📝 Text Message

await sock.sendMessage(
 jid,
 {
  text: "Hello World"
 }
)

💬 Reply Message

await sock.sendMessage(
 jid,
 {
   text: "Reply Message"
 },
 {
   quoted: message
 }
)

@ Mention

await sock.sendMessage(
 jid,
 {
  text: "@94771234567",
  mentions: [
   "[email protected]"
  ]
 }
)

🖼️ Image Message

await sock.sendMessage(
 jid,
 {
   image: {
     url: "./image.jpg"
   },
   caption: "Hello"
 }
)

🎬 Video Message

await sock.sendMessage(
 jid,
 {
   video: {
      url: "./video.mp4"
   },
   caption: "Video"
 }
)

🎵 Audio Message

await sock.sendMessage(
 jid,
 {
   audio: {
      url: "./audio.mp3"
   },
   mimetype: "audio/mp4"
 }
)

🎤 Voice Note

await sock.sendMessage(
 jid,
 {
   audio: {
      url: "./voice.ogg"
   },
   ptt: true
 }
)

🏷️ Sticker

await sock.sendMessage(
 jid,
 {
   sticker: {
      url: "./sticker.webp"
   }
 }
)

🎞️ GIF Message

await sock.sendMessage(
 jid,
 {
  video: {
    url: "./gif.mp4"
  },
  gifPlayback: true
 }
)

📄 Document

await sock.sendMessage(
 jid,
 {
   document: {
      url: "./file.pdf"
   },
   mimetype:
   "application/pdf",
   fileName: "Guide.pdf"
 }
)

📇 Contact Card

const vcard =
"BEGIN:VCARD\n"+
"VERSION:3.0\n"+
"FN:John Doe\n"+
"TEL:+94771234567\n"+
"END:VCARD"

await sock.sendMessage(
 jid,
 {
   contacts:{
      displayName:"John",
      contacts:[{vcard}]
   }
 }
)

📍 Location Message

await sock.sendMessage(
 jid,
 {
   location:{
      degreesLatitude:7.2906,
      degreesLongitude:80.6337
   }
 }
)

🎛️ Interactive Messages

⚡ Quick Reply Buttons

await sock.sendMessage(
 jid,
 {
   text:"Select Option",
   buttons:[
      {
       buttonId:"menu",
       buttonText:{
         displayText:"Menu"
       }
      }
   ]
 }
)

🔗 CTA URL Button

await sock.sendMessage(
 jid,
 {
   text:"Open Website",
   footer:"Nexus",
   buttons:[
     {
       buttonId:"url",
       buttonText:{
         displayText:"Website"
       }
     }
   ]
 }
)

📋 List Message

await sock.sendMessage(
 jid,
 {
  text:"Choose Item",
  sections:[
   {
    title:"Menu",
    rows:[
      {
        title:"Option 1",
        rowId:"1"
      },
      {
        title:"Option 2",
        rowId:"2"
      }
    ]
   }
  ]
 }
)

🗳️ Polls

Creating a Poll

await sock.sendMessage(
 jid,
 {
   poll:{
      name:"Favorite Color",
      values:[
       "Red",
       "Blue",
       "Black"
      ],
      selectableCount:1
   }
 }
)

Reading Poll Votes

sock.ev.on(
 "messages.update",
 async(data)=>{
   console.log(data)
 }
)

❤️ Reactions

Sending a Reaction

await sock.sendMessage(
 jid,
 {
   react:{
      text:"❤️",
      key:message.key
   }
 }
)

Detecting Reactions

sock.ev.on(
 "messages.update",
 data=>{
   console.log(data)
 }
)

🤖 Automated Replies

sock.ev.on(
 "messages.upsert",
 async({messages})=>{

 const msg = messages[0]

 if(
  msg.message?.conversation ===
  "hi"
 ){
   await sock.sendMessage(
    msg.key.remoteJid,
    {
      text:"Hello User"
    }
   )
 }

})

⚡ Auto React

await sock.sendMessage(
 jid,
 {
  react:{
   text:"🔥",
   key:message.key
  }
 }
)

👀 Auto Read

await sock.readMessages([
 message.key
])

⌨️ Auto Typing

await sock.sendPresenceUpdate(
 "composing",
 jid
)

🎤 Auto Recording

await sock.sendPresenceUpdate(
 "recording",
 jid
)

🛡️ Anti Link

if(
 text.includes(
  "https://"
 )
){

 await sock.sendMessage(
  jid,
  {
   text:"Links Not Allowed"
  }
 )

}

👋 Welcome Message

sock.ev.on(
 "group-participants.update",
 async(data)=>{

 if(data.action === "add"){

  await sock.sendMessage(
   data.id,
   {
    text:
    "Welcome To Group"
   }
  )

 }

})

👋 Goodbye Message

sock.ev.on(
 "group-participants.update",
 async(data)=>{

 if(data.action === "remove"){

  await sock.sendMessage(
   data.id,
   {
    text:"Goodbye"
   }
  )

 }

})

👥 Group Management

➕ Creating a Group

const group =
await sock.groupCreate(
 "Nexus Group",
 [
  "[email protected]"
 ]
)

👤 Adding Members

await sock.groupParticipantsUpdate(
 jid,
 [
  "[email protected]"
 ],
 "add"
)

👤 Removing Members

await sock.groupParticipantsUpdate(
 jid,
 [
  "[email protected]"
 ],
 "remove"
)

⬆️ Promoting an Admin

await sock.groupParticipantsUpdate(
 jid,
 [
  user
 ],
 "promote"
)

⬇️ Demoting an Admin

await sock.groupParticipantsUpdate(
 jid,
 [
  user
 ],
 "demote"
)

✏️ Changing the Group Name

await sock.groupUpdateSubject(
 jid,
 "New Name"
)

📝 Changing the Description

await sock.groupUpdateDescription(
 jid,
 "New Description"
)

📸 Profile Management

✏️ Changing Name

await sock.updateProfileName(
 "Nexus Bot"
)

📝 Changing Bio (Status)

await sock.updateProfileStatus(
 "Hello World"
)

🖼️ Changing Profile Picture

await sock.updateProfilePicture(
 jid,
 {
  url:"./profile.jpg"
 }
)

📞 Calls

Detecting Calls

sock.ev.on(
 "call",
 data=>{
   console.log(data)
 }
)

🚫 Auto-Rejecting Calls

await sock.rejectCall(
 callId,
 callerId
)

📢 Status

📝 Text Status

await sock.sendMessage(
 "status@broadcast",
 {
   text:"Hello Status"
 }
)

🖼️ Image Status

await sock.sendMessage(
 "status@broadcast",
 {
   image:{
     url:"./image.jpg"
   }
 }
)

🎬 Video Status

await sock.sendMessage(
 "status@broadcast",
 {
   video:{
      url:"./video.mp4"
   }
 }
)

📂 Media Download

Downloading an Image

const stream =
await downloadMediaMessage(
 message,
 "stream"
)

Saving a File

const fs =
require("fs")

stream.pipe(
 fs.createWriteStream(
  "./file.jpg"
 )
)

🔍 Info Queries

Checking if a Phone Number Uses WhatsApp

const result =
await sock.onWhatsApp(
 "[email protected]"
)

Getting Profile Picture

const pp =
await sock.profilePictureUrl(
 jid,
 "image"
)

Getting User Status

const status =
await sock.fetchStatus(
 jid
)

Getting Business Profile

const profile =
await sock.getBusinessProfile(
 jid
)

📚 Events

New Messages

sock.ev.on(
 "messages.upsert",
 console.log
)

Connection Updates

sock.ev.on(
 "connection.update",
 console.log
)

Group Updates

sock.ev.on(
 "groups.update",
 console.log
)

Presence Updates

sock.ev.on(
 "presence.update",
 console.log
)

🔥 AI Integration Example (OpenAI)

const reply =
await openai.chat.completions.create({
 model:"gpt-4o",
 messages:[
  {
   role:"user",
   content:text
  }
 ]
})

await sock.sendMessage(
 jid,
 {
   text:
   reply.choices[0]
   .message.content
 }
)

⚠️ Disclaimer

This project is not affiliated with WhatsApp or Meta. Please use responsibly and comply with WhatsApp's Terms of Service.


📄 License

MIT License

Copyright © 2026 Nexus Baileys


💡 Tip: For more details, visit the official documentation or the GitHub repository.


🎉 Congratulations on starting your WhatsApp automation journey with Nexus Baileys v1.0.1!