npm package: @hbmodsofc/baileys
Description: HBMods-OFC modified Baileys WhatsApp API for custom bots and personal projects
Author: @hbmodsofc/baileys
Latest version: 3.2.0

<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="100%">

<div align="center">
  <h1>💫 @hbmodsofc/baileys </h1>
  <p><em>Custom WhatsApp library built upon Baileys — enhanced, modernized, and elegant.</em></p>
</p>

  <p>
  <!-- NPM Version -->
  <a href="https://www.npmjs.com/package/@hbmodsofc/baileys">
    <img src="https://img.shields.io/npm/v/@hbmodsofc/baileys?color=blueviolet&label=version&logo=npm" alt="npm version" />
  </a>

  <!-- NPM Downloads -->
  <a href="https://www.npmjs.com/package/@hbmodsofc/baileys">
    <img src="https://img.shields.io/npm/dt/@hbmodsofc/baileys?color=blueviolet&label=downloads&logo=npm" alt="npm downloads" />
  </a>

  <!-- License -->
  <a href="https://www.npmjs.com/package/@hbmodsofc/baileys">
    <img src="https://img.shields.io/npm/l/@hbmodsofc/baileys?color=success&label=license" alt="license" />
  </a>

  <!-- Bundle Size -->
  <a href="https://bundlephobia.com/package/@hbmodsofc/baileys">
    <img src="https://img.shields.io/bundlephobia/min/@hbmodsofc/baileys?label=minified%20size&color=orange" alt="bundle size" />
  </a>

  <!-- Gzip Bundle Size -->
  <a href="https://bundlephobia.com/package/@hbmodsofc/baileys">
    <img src="https://img.shields.io/bundlephobia/minzip/@hbmodsofc/baileys?label=minzip%20size&color=orange" alt="gzip bundle size" />
  </a>

  <!-- PackagePhobia Install Size -->
  <a href="https://packagephobia.com/result?p=@hbmodsofc/baileys">
    <img src="https://packagephobia.com/badge?p=@hbmodsofc/baileys" alt="install size" />
  </a>

  <!-- Code Quality (Codacy) -->
  <a href="https://app.codacy.com">
    <img src="https://img.shields.io/badge/Codacy-Quality%20Check-blue?logo=codacy" alt="Codacy quality" />
  </a>

  <!-- Security Scan (Snyk) -->
  <a href="https://snyk.io">
    <img src="https://img.shields.io/badge/Snyk-Security%20Scan-purple?logo=snyk" alt="Snyk security" />
  </a>

  <!-- Node Engine Support -->
  <img src="https://img.shields.io/node/v/@hbmodsofc/baileys?label=node%21engine" alt="node engine" />

  <!-- Types -->
  <img src="https://img.shields.io/npm/types/@hbmodsofc/baileys?label=types" alt="types" />
</p>

<p>
  <!-- WhatsApp Channel -->
  <a href="https://whatsapp.com/channel/0029Vb70uHbD8SE2w5Q9M107">
    <img src="https://img.shields.io/badge/Join-WhatsApp%20Channel-25D366?logo=whatsapp&logoColor=white" alt="WhatsApp Channel" />
  </a>
</p>
</div>

<div align="center">
  <img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="100%">
</div>

## 📌 Overview
> ❄️ `@hbmodsofc/baileys` is a refined version of the Baileys library with cleaner API usage, exclusive features like album messaging, newsletter controls, and full-size profile uploads — tailored for modern WhatsApp automation needs.

> **Christmas Update** 🎁
> All update information is now redirected to the WhatsApp channel check at the bottom of the "homepage".

> Udpate changelog see on our WhatsApp channel

---

## 📦 Installation

### Via `package.json`

Fork Baileys (NPM) **@whiskeysockets/baileys** / **@adiwajshing/baileys**

```json
@whiskeysockets/baileys
"dependencies": {
    "@whiskeysockets/baileys": "npm:@hbmodsofc/baileys"
}
```
```json
@adiwajsing/baileys
"dependencies": {
    "@adiwajshing/baileys": "npm:@hbmodsofc/baileys"
}
```

Or via terminal non fork
```bash
npm install @hbmodsofc/baileys
```

Importing (for those who don't fork another repository)
ESM & CJS

> ESM
```bash
import makeWASocket from '@hbmodsofc/baileys
```

> CJS
```bash
const { default: makeWASocket } = require('@hbmodsofc/baileys')
```
---
🌟 Key Features
| Category | Description |
|---|---|
|channels | Seamlessly send messages to WhatsApp Channels. |
| 🖱️ Buttons | Create interactive messages with button options and quick replies. |
| 🖼️ Albums | Send grouped images or videos as an album (carousel-like format). |
| 👤 LID Grouping | Handle group operations using the latest @lid addressing style. |
| 🤖 AI Message Style | Add a stylized “AI” icon to messages. |
| 📷 HD Profile Pics | Upload full-size profile pictures without cropping. |
| 🔐 Pairing Code | Generate custom alphanumeric pairing codes. |
| 🛠️ Dev Experience | Reduced noise from logs with optimized libsignal printouts. |
---

## 🚀 Features & Usage

### 📬 Newsletter Control
Manage WhatsApp Newsletter (Channel), from creation to message interaction.

<details>
<summary><strong>Example</strong></summary>

```js
// Create a newsletter
await sock.newsletterCreate("HBWABot Updates");

// Update description
await sock.newsletterUpdateDescription(
  "hbmodsofc@newsletter",
  "Fresh updates weekly"
);

// React to a channel message
await sock.newsletterReactMessage(
  "hbmodsofc@newsletter",
  "175",
  "🔥"
);
```
</details>

---

### 📌 Interactive Messaging
Send interactive messages using buttons to increase user interaction.

<details>
<summary><strong>Example</strong></summary>

```js
const buttons = [
  { buttonId: "btn1", buttonText: { displayText: "Click Me" }, type: 1 },
  { buttonId: "btn2", buttonText: { displayText: "Visit Site" }, type: 1 }
];

await sock.sendMessage(id, {
  text: "Choose one:",
  footer: "From HBWABot with love 💜",
  buttons,
  headerType: 1
});
```

</details>

---

### 🖼️ Send Album
Send multiple media (images or videos) in one album message.

<details>
<summary><strong>Example</strong></summary>

```js
const media = [
  { image: { url: "https://example.com/pic1.jpg" } },
  { video: { url: "https://example.com/clip.mp4" } }
];

await sock.sendMessage(
  id,
  { album: media, caption: "Memories 💫" }
);
```

</details>

---

### 🔐 Custom Pairing Code
Pairing WhatsApp devices using custom code.

<details>
<summary><strong>Example</strong></summary>

```js
const code = await sock.requestPairingCode("91xxxxxxxxxx","HBWABOTZ");

console.log("Pairing Code:", code);
```

</details>

---

### 📊 Poll Creation
Create polls for quick voting in chats or groups.

<details>
<summary><strong>Example</strong></summary>

```js
await sock.sendMessage(id, {
  poll: {
    name: "Favorite Color?",
    values: ["Red", "Blue", "Green"],
    selectableCount: 1
  }
});
```

</details>

---

### 📍 Location Sharing
Share complete location with coordinates and address.

<details>
<summary><strong>Example</strong></summary>

```js
await sock.sendMessage(id, {
  location: {
    degreesLatitude: 37.422,
    degreesLongitude: -122.084,
    name: "Googleplex",
    address: "1600 Amphitheatre Pkwy, Mountain View"
  }
});
```

</details>

---

### 👥 Group Management
Manage WhatsApp groups: create groups, add members, and update descriptions.


<details>
<summary><strong>Example</strong></summary>

```js
const group = await sock.groupCreate(
  "My New Group",
  [number1, number2]
);

await sock.groupAdd(group.id, [number3]);
await sock.groupUpdateDescription(group.id,"This is our awesome group!"
);
```

</details>

---

### 🐞 Found a Bug?

If you encounter a bug or issue while using this project, please do one of the following:

- **Open an Issue** through the official website (coming soon)
- **Contact the maintainer directly** via WhatsApp

<p align="center">
  <a href="https://wa.me/918416093656" target="_blank" rel="noopener noreferrer">
    <img
      alt="Chat on WhatsApp"
      src="https://img.shields.io/badge/Chat%20on%20WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white"
    />
  </a>
</p>

<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="100%" style="transform: rotate(180deg);">