New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

mod-baileys

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mod-baileys

WhatsApp Modified By Dew Coders

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
7
-65%
Maintainers
1
Weekly downloads
 
Created
Source

🔥Ultimate WhatsApp Web API

TypeScript JavaScript WhatsApp NPM


⚡️ Supercharged WhatsApp API 🌟

Elevate your messaging experience with the most advanced WhatsApp Web API solution available

❓️ | WHY MOD-BAILEYS?

⚡ Lightning Fast
🛡️ Secure
🧩 Feature-Rich
🔄 Active Development

📌 | IMPORTANT NOTE

⚠️ The original repository was initially removed by its creator and subsequently taken over by WhiskeySockets. This enhanced version includes numerous improvements and powerful new features designed to transform your WhatsApp development experience.

💫 | INSTALLATION

📂 In package.json:

"dependencies": {
    "dew-baileys": "*"
}

or option2

📂 In package.json:

"dependencies": {
    "@whiskeysockets/baileys": "github:dew-coders/Dew-Baileys"
}

⚙️ Terminal Installation:

npm install dew-baileys

🔌 Import:

// ESM 
import makeWASocket from 'mod-baileys'
// CommonJS
const { default: makeWASocket } = require("mod-baileys")

How To Connect To Whatsapp

With QR Code

const {
  default: makeWASocket
} = require('@whiskeysockets/baileys');

const client = makeWASocket({
  browser: ['Ubuntu', 'Chrome', '20.00.1'],
  printQRInTerminal: true
})

Connect With Number

const {
  default: makeWASocket,
  fetchLatestWAWebVersion
} = require('@whiskeysockets/baileys');

const client = makeWASocket({
  browser: ['Ubuntu', 'Chrome', '20.00.1'],
  printQRInTerminal: false,
  version: fetchLatestWAWebVersion()
  // Other options
});

const number = "628XXXXX";
const code = await client.requestPairingCode(number.trim) /* Use : (number, "YYYYYYYY") for custom-pairing */

console.log("Ur pairing code : " + code)

✨ | FEATURE SHOWCASE

🎀 Enhanced Features Matrix

FeatureDescriptionStatus
🔊 Channel MessagingSend & manage WhatsApp channel content✅
🎛️ Interactive MessagesCreate rich button-based experiences✅
🤖 AI Message IconBrand your bot messages with AI icon✅
🖼️ Enhanced MediaUncropped profile pictures & optimized media✅
🔐 Custom PairingPersonalized device pairing codes✅
🔧 Performance OptimizationsCleaner logs & improved signal handling✅
📱 Cross-PlatformWorks on all NodeJS supported platforms✅
⤴️ 2GB UPLOADWorks on all Up To 1GB Files Fast✅

🌱 SMALL BUT POWERFUL FEATURES 🎉

📰 | NEWSLETTER MANAGEMENT

📚 Expand Newsletter Features

📊 Get Newsletter Info

// By invite
const metadata = await sock.newsletterMetadata("invite", "xxxxx")
// By JID
const metadata = await sock.newsletterMetadata("jid", "abcd@newsletter")
console.log(metadata)

📝 Update Newsletter Content

// Update description
await sock.newsletterUpdateDescription("abcd@newsletter", "New Description")

// Update name
await sock.newsletterUpdateName("abcd@newsletter", "New Name")

// Update picture
await sock.newsletterUpdatePicture("abcd@newsletter", buffer)

// Remove picture
await sock.newsletterRemovePicture("abcd@newsletter")

🔔 Notification Management

// Unmute newsletter
await sock.newsletterUnmute("abcd@newsletter")

// Mute newsletter
await sock.newsletterMute("abcd@newsletter")

🔄 Newsletter Management

// Create new newsletter
const metadata = await sock.newsletterCreate("Newsletter Name", "Newsletter Description")
console.log(metadata)

// Delete newsletter
await sock.newsletterDelete("abcd@newsletter")

// Follow newsletter
await sock.newsletterFollow("abcd@newsletter")

// Unfollow newsletter
await sock.newsletterUnfollow("abcd@newsletter")

😀 Engagement Features

// Send reaction to newsletter post
// Get ID from message URL: https://whatsapp.com/channel/xxxxx/175
const id = "175"
await sock.newsletterReactMessage("abcd@newsletter", id, "🥳")

🎛️ | INTERACTIVE MESSAGING

🎯 Expand Button & Interactive Features

📝 Text Buttons

const buttons = [
  { buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
  { buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
]

const buttonMessage = {
    text: "Hi it's button message",
    footer: 'Hello World',
    buttons,
    headerType: 1,
    viewOnce: true
}

await sock.sendMessage(id, buttonMessage, { quoted: null })

🖼️ Image Buttons

const buttons = [
  { buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
  { buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
]

const buttonMessage = {
    image: { url: "https://example.com/abcd.jpg" }, // image: buffer or path
    caption: "Hi it's button message with image",
    footer: 'Hello World',
    buttons,
    headerType: 1,
    viewOnce: true
}

await sock.sendMessage(id, buttonMessage, { quoted: null })

🎬 Video Buttons

const buttons = [
  { buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
  { buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
]

const buttonMessage = {
    video: { url: "https://example.com/abcd.mp4" }, // video: buffer or path
    caption: "Hi it's button message with video",
    footer: 'Hello World',
    buttons,
    headerType: 1,
    viewOnce: true
}

await sock.sendMessage(id, buttonMessage, { quoted: null })

🔄 Advanced Interactive Messages

const interactiveButtons = [
     {
        name: "quick_reply",
        buttonParamsJson: JSON.stringify({
             display_text: "Quick Reply",
             id: "ID"
        })
     },
     {
        name: "cta_url",
        buttonParamsJson: JSON.stringify({
             display_text: "Tap Here!",
             url: "https://www.example.com/"
        })
     },
     {
        name: "cta_copy",
        buttonParamsJson: JSON.stringify({
             display_text: "Copy Code",
             id: "12345",
             copy_code: "12345"
        })
     }
]

const interactiveMessage = {
    text: "Hello World!",
    title: "this is the title",
    footer: "this is the footer",
    interactiveButtons
}

await sock.sendMessage(id, interactiveMessage, { quoted: null })

🖼️ Rich Media Interactive Messages

const interactiveButtons = [
     {
        name: "quick_reply",
        buttonParamsJson: JSON.stringify({
             display_text: "Quick Reply",
             id: "ID"
        })
     },
     {
        name: "cta_url",
        buttonParamsJson: JSON.stringify({
             display_text: "Visit Website",
             url: "https://www.example.com/"
        })
     }
]

// With Image
const imageInteractiveMessage = {
    image: { url: "https://example.com/abcd.jpg" },
    caption: "Check out this amazing photo!",
    title: "Photo Showcase",
    footer: "Tap a button below",
    interactiveButtons
}

await sock.sendMessage(id, imageInteractiveMessage, { quoted: null })

// With Video
const videoInteractiveMessage = {
    video: { url: "https://example.com/abcd.mp4" },
    caption: "Watch this awesome video!",
    title: "Video Showcase",
    footer: "Tap a button below",
    interactiveButtons
}

await sock.sendMessage(id, videoInteractiveMessage, { quoted: null })

🤖 | AI MESSAGING

AI Icon Feature

// Simply add "ai: true" to display AI icon with your message
await sock.sendMessage(id, { text: "Hello! I'm your AI assistant.", ai: true })
💡 Pro Tip: AI icons make your bot messages stand out and indicate automated responses to users.

🔐 | CUSTOM PAIRING

Custom Code Implementation

if(usePairingCode && !sock.authState.creds.registered) {
    const phoneNumber = await question('Please enter your mobile phone number:\n')
    const custom = "DEWMDOFC" // must be 8 digits, can be letters or numbers
    const code = await sock.requestPairingCode(phoneNumber, custom)
    console.log(`Pairing code: ${code?.match(/.{1,4}/g)?.join('-') || code}`)
}
🔒 Security Note: Custom pairing codes enhance security while providing a personalized experience.

🛠️ | QUICK IMPLEMENTATION GUIDE

🚀 Step 1: Install

Add baileys-elite to your project using npm

npm install dew-baileys

🔄 Step 2: Import

Import the library into your project

import makeWASocket from 'dew-baileys'

⚙️ Step 3: Configure

Set up your WhatsApp connection

const sock = makeWASocket({...})

🚀 Step 4: Implement

Start using the enhanced features

await sock.sendMessage(id, {...})

🐛 | REPORTING ISSUES

Found a bug? Have a suggestion?

If you encounter any issues while using this repository, please feel free to open a new issue.

👾 Our team actively monitors and responds to all issues.

📝 | NOTES

Everything other than the modifications mentioned above remains the same as the original repository. You can check out the original repository at WhiskeySockets.

Powered BY Dew Coders - The Ultimate WhatsApp Web API Experience

Keywords

whatsapp-baileys

FAQs

Package last updated on 18 Jan 2026

Related posts