@ryuhan/baileys 1.0.0 → 1.0.1

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.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ <p align="center">
2
+ <img src="https://files.catbox.moe/f8tj1b.png" alt="Rimuru Bot" width="150"/>
3
+ </p>
4
+
5
+ <h1 align="center">💧 Rimuru Baileys</h1>
6
+ <p align="center">TypeScript-based library for WhatsApp Web API integration, with built-in fixes for group identifiers like @lid and @jid.
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/ryuhandev/rimuru-baileys/stargazers"><img src="https://img.shields.io/github/stars/ryuhandev/rimuru-baileys?style=flat-square&logo=github" alt="GitHub Stars"/></a>
11
+ <a href="https://github.com/ryuhandev/rimuru-baileys/issues"><img src="https://img.shields.io/github/issues/ryuhandev/rimuru-baileys?style=flat-square&logo=github" alt="GitHub Issues"/></a>
12
+ <img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License"/>
13
+ </p>
14
+
15
+ ---
16
+
17
+ ## ✨ Features
18
+
19
+ - **💧 Intelligent `@lid` and `@jid` mapping**
20
+ - **💧 Multi-device support**
21
+ - **💧 End-to-End Encryption support**
22
+ - **💧 Handles all WhatsApp message types**
23
+ - **💧 Fast and modern TypeScript codebase**
24
+ - **💧 Multi-Device Support:** Works with latest WhatsApp multi-device protocol.
25
+ - **💧 Media Handling:** Send and receive images, videos, audio, stickers, and documents.
26
+ - **💧 Pairing Code Login:** Easy login using Pairing Code.
27
+ - **💧 Simple & Extendable:** Clean code structure for customization and adding new features.
28
+ - **💧 Support Botton Message:** You can add cool botton to your bot menu
29
+ - **💧 High Compatibility:** Built on Ryuhan's fork of Baileys for reliable WhatsApp API integration.
30
+
31
+ ---
32
+ ### 💧 Installation
33
+
34
+ ```bash
35
+ npm install @ryuhan/baileys
36
+ # or
37
+ yarn add @ryuhan/baileys
38
+ ```
39
+
40
+ ### 💧 Quick Example
41
+
42
+ ```ts
43
+ import makeWASocket from '@ryuhan/baileys'
44
+ import { getSenderLid, toJid } from '@ryuhan/baileys'
45
+
46
+ const sock = makeWASocket({ printQRInTerminal: true })
47
+
48
+ sock.ev.on('messages.upsert', ({ messages }) => {
49
+ const msg = messages[0]
50
+ const info = getSenderLid(msg) // logs the sender LID
51
+ const jid = toJid(info.lid)
52
+ console.log('normalized jid:', jid)
53
+ })
54
+ ```
55
+
56
+ ### 💧 Advanced Usage (Multi-file Auth)
57
+
58
+ ```ts
59
+ import makeWASocket, { useMultiFileAuthState } from "@ryuhan/baileys"
60
+
61
+ async function start() {
62
+ const { state, saveCreds } = await useMultiFileAuthState("auth_info")
63
+ const sock = makeWASocket({ auth: state, printQRInTerminal: true })
64
+
65
+ sock.ev.on("creds.update", saveCreds)
66
+ sock.ev.on("messages.upsert", ({ messages }) => {
67
+ for (const m of messages) {
68
+ console.log(m.key.remoteJid, m.message?.conversation)
69
+ }
70
+ })
71
+ }
72
+
73
+ start()
74
+ ```
75
+ ---
76
+
77
+ ### 💧 EXAMPLE PACKAGE FOR PAIRING CODE BOT:
78
+
79
+ ```
80
+ {
81
+ "name": "your-bot-name",
82
+ "version": "1.1.0",
83
+ "description": "Just Example",
84
+ "main": "index.js",
85
+ "scripts": {
86
+ "start": "node index.js"
87
+ },
88
+ "author": "Someone",
89
+ "license": "MIT",
90
+ "dependencies": {
91
+ "@adiwajshing/baileys": "npm:@ryuhan/baileys",
92
+ "@adiwajshing/keyed-db": "^0.2.4",
93
+ "awesome-phonenumber": "^2.64.0",
94
+ "chalk": "^4.1.2",
95
+ "cheerio": "^1.0.0-rc.10",
96
+ "didyoumean": "^1.2.2",
97
+ "fetch": "^1.1.0",
98
+ "figlet": "^1.5.2",
99
+ "file-type": "^16.5.3",
100
+ "fluent-ffmpeg": "^2.1.3",
101
+ "form-data": "*",
102
+ "fs-extra": "11.2.0",
103
+ "human-readable": "^0.2.1",
104
+ "jimp": "^0.16.1",
105
+ "moment-timezone": "^0.5.34",
106
+ "node-cache": "^5.1.2",
107
+ "node-fetch": "^2.6.1",
108
+ "node-id3": "^0.2.3",
109
+ "node-webpmux": "^3.1.1",
110
+ "performance-now": "^2.1.0",
111
+ "pino": "^7.0.5",
112
+ "qrcode-terminal": "^0.12.0",
113
+ "sharp": "^0.34.1",
114
+ "similarity": "^1.2.1",
115
+ "util": "^0.12.4"
116
+ }
117
+ }
118
+ ```
119
+ ---
package/WAProto/p.html CHANGED
@@ -1 +1 @@
1
- yupra
1
+ ryuhan
@@ -259,7 +259,7 @@ const printQRIfNecessaryListener = (ev, logger) => {
259
259
  };
260
260
  exports.printQRIfNecessaryListener = printQRIfNecessaryListener;
261
261
  const fetchLatestBaileysVersion = async (options = {}) => {
262
- const URL = 'https://unpkg.com/@yupra/baileys@1.0.5/lib/Defaults/baileys-version.json';
262
+ const URL = 'https://unpkg.com/@ryuhan/baileys@1.0.5/lib/Defaults/baileys-version.json';
263
263
  try {
264
264
  const result = await axios_1.default.get(URL, {
265
265
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuhan/baileys",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Tensura Interactive Project",
5
5
  "keywords": [
6
6
  "baileys",
@@ -92,12 +92,24 @@
92
92
  "sharp": "^0.34.1"
93
93
  },
94
94
  "peerDependenciesMeta": {
95
- "audio-decode": { "optional": true },
96
- "jimp": { "optional": true },
97
- "link-preview-js": { "optional": true },
98
- "qrcode-terminal": { "optional": true },
99
- "sharp": { "optional": true }
95
+ "audio-decode": {
96
+ "optional": true
97
+ },
98
+ "jimp": {
99
+ "optional": true
100
+ },
101
+ "link-preview-js": {
102
+ "optional": true
103
+ },
104
+ "qrcode-terminal": {
105
+ "optional": true
106
+ },
107
+ "sharp": {
108
+ "optional": true
109
+ }
100
110
  },
101
111
  "packageManager": "yarn@1.22.19",
102
- "engines": { "node": ">=20.0.0" }
112
+ "engines": {
113
+ "node": ">=20.0.0"
114
+ }
103
115
  }