# KuroBails

Fast & Lightweight WhatsApp Web API Library

---

## Installation

```bash
npm install kurobails
```

## Dependencies

```json
"dependencies": {
  "kurobails": "^6.32.0"
}
```

---

# Import

```javascript
const {
  default: makeKuroSocket
} = require("kurobails")
```

---

# Connection

## QR Code Login

```javascript
const {
  default: makeKuroSocket
} = require("kurobails")

const client = makeKuroSocket({
  browser: ["Ubuntu", "Chrome", "20.0.0"],
  printQRInTerminal: true
})
```

---

## Pairing Code Login

```javascript
const {
  default: makeKuroSocket,
  fetchLatestWAWebVersion
} = require("kurobails")

const client = makeKuroSocket({
  browser: ["Ubuntu", "Chrome", "20.0.0"],
  printQRInTerminal: false,
  version: fetchLatestWAWebVersion()
})

const code =
await client.requestPairingCode("628xxxx")

console.log(code)
```

---

# Simple Messages

## Send Text

```javascript
await client.sendText(
  m.chat,
  "KuroBails Active"
)
```

---

## Send Image

```javascript
await client.sendImage(
  m.chat,
  { url: "./image.jpg" },
  "KuroBails"
)
```

---

## Send Video

```javascript
await client.sendVideo(
  m.chat,
  { url: "./video.mp4" },
  "KuroBails"
)
```

---

## Send Audio

```javascript
await client.sendAudio(
  m.chat,
  { url: "./audio.mp3" }
)
```

---

## Send Poll

```javascript
await client.sendPoll(
  m.chat,
  "Choose One",
  ["Option 1", "Option 2"],
  true
)
```

---

# Advanced Messages

## Order Message

```javascript
await client.sendMessage(m.chat, {
  message: "Kuro Store",
  orderTitle: "Kuro Corporation",
  totalAmount1000: 15000,
  totalCurrencyCode: "IDR"
})
```

---

## Product Message

```javascript
await client.relayMessage(m.chat, {
  productMessage: {
    title: "KuroFile.pdf",
    description: "Simple Product Message",
    productId: "KURO-PRODUCT",
    retailerId: "KURO-STORE",
    currencyCode: "IDR",
    priceAmount1000: 10000
  }
})
```

---

## Poll Result Snapshot

```javascript
await client.sendMessage(m.chat, {
  pollResultMessage: {
    name: "Kuro Poll",
    options: [
      {
        optionName: "Option A"
      },
      {
        optionName: "Option B"
      }
    ]
  }
})
```

---

# Group Features

## Group Label

```javascript
await client.sendMessage(m.chat, {
  groupLabel: {
    labelText: "Kuro Members"
  }
})
```

---

## Message Members

```javascript
await client.sendMessageMembers(
  m.chat,
  {
    extendedTextMessage: {
      text: "Hello Members"
    }
  },
  {}
)
```

---

## Status Mention

```javascript
await client.statusMention(
  m.chat,
  {
    extendedTextMessage: {
      text: "KuroBails"
    }
  }
)
```

---

# Features

- Multi Device Support
- Lightweight Library
- Fast Connection
- Custom Message Support
- Easy To Use

---

# Credits

- WhiskeySockets
- Baileys
- Kuro Developer

---

# Channel

https://t.me/blavouchnaww