davexbaileys 1.1.2 → 2.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -39
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <div align="center">
2
- <h1>davexbaileys</h1>
2
+ <h1>Davebaileys</h1>
3
3
  <p>A WebSocket-based JavaScript library for interacting with the WhatsApp Web API</p>
4
-
5
- [![npm version](https://img.shields.io/npm/v/davexbaileys.svg)](https://www.npmjs.com/package/davexbaileys)
6
- [![npm downloads](https://img.shields.io/npm/dm/davexbaileys.svg)](https://www.npmjs.com/package/davexbaileys)
7
- [![License](https://img.shields.io/npm/l/davexbaileys.svg)](https://github.com/Davex-254/davebaileys/blob/main/LICENSE)
4
+
5
+ [![npm version](https://img.shields.io/npm/v/davebaileys.svg)](https://www.npmjs.com/package/davebaileys)
6
+ [![npm downloads](https://img.shields.io/npm/dm/davebaileys.svg)](https://www.npmjs.com/package/davebaileys)
7
+ [![License](https://img.shields.io/npm/l/davebaileys.svg)](https://github.com/Davex-254/davebaileys/blob/main/LICENSE)
8
8
  </div>
9
9
 
10
10
  ## Disclaimer
@@ -14,59 +14,36 @@ This project is not affiliated, associated, authorized, endorsed by, or in any w
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- npm install davexbaileys
17
+ npm install davebaileys
18
18
  ```
19
19
 
20
20
  Or using yarn:
21
21
  ```bash
22
- yarn add davexbaileys
22
+ yarn add davebaileys
23
23
  ```
24
24
 
25
25
  ## Quick Start
26
26
 
27
- This package is pure ESM. Use `import` syntax:
28
-
27
+ ### CommonJS (Recommended)
29
28
  ```javascript
30
- import makeWASocket, { useMultiFileAuthState, Browsers } from 'davexbaileys'
29
+ const { default: makeWASocket, useMultiFileAuthState, Browsers } = require('davebaileys')
31
30
  ```
32
31
 
33
- ### Basic Connection Example
34
-
32
+ ### ES Modules / TypeScript
35
33
  ```javascript
36
- import makeWASocket, { useMultiFileAuthState, DisconnectReason } from 'davexbaileys'
37
- import { Boom } from '@hapi/boom'
38
-
39
- const { state, saveCreds } = await useMultiFileAuthState('auth_info')
40
-
41
- const sock = makeWASocket({
42
- auth: state,
43
- printQRInTerminal: false
44
- })
45
-
46
- sock.ev.on('creds.update', saveCreds)
47
-
48
- sock.ev.on('connection.update', ({ connection, lastDisconnect, qr }) => {
49
- if (qr) console.log('Scan QR:', qr)
50
-
51
- if (connection === 'close') {
52
- const shouldReconnect = (lastDisconnect?.error instanceof Boom)
53
- && lastDisconnect.error.output.statusCode !== DisconnectReason.loggedOut
54
- if (shouldReconnect) connectToWA()
55
- } else if (connection === 'open') {
56
- console.log('Connected!')
57
- }
58
- })
34
+ import pkg from 'davebaileys'
35
+ const { default: makeWASocket, useMultiFileAuthState, Browsers } = pkg
59
36
  ```
60
37
 
61
38
  ## Features
62
39
 
63
- - Full WhatsApp Web API support — based on official [@WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys) v7.0.0-rc.9
40
+ - Full WhatsApp Web API support
64
41
  - Multi-device support with QR code and pairing code authentication
65
- - LID (Link ID) addressing support for personal chats and groups
66
- - Session stability fix for deployed servers (no more 428 reconnection loops)
42
+ - LID (Link ID) addressing support for both personal chats and groups
43
+ - Group status/story sending functionality
44
+ - Session management and restoration
67
45
  - Message sending, receiving, and manipulation
68
46
  - Group management
69
- - Newsletter / channel support
70
47
  - Privacy settings
71
48
  - Profile management
72
49
  - And much more!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davexbaileys",
3
- "version": "1.1.2",
3
+ "version": "2.5.8",
4
4
  "type": "module",
5
5
  "description": "A lightweight, full-featured WhatsApp Web API library for Node.js",
6
6
  "main": "lib/index.js",