@cexy/hoonfca 2.0.1 → 2.0.2

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,100 @@
1
+ # 🚀 Hoon FCA
2
+
3
+ > Advanced Facebook Chat API for Node.js with Cookie Login, MQTT, Auto Reconnect, Token Refresh and modern Messenger features.
4
+
5
+ ---
6
+
7
+ ## ✨ Features
8
+
9
+ - 🍪 Cookie / AppState Login
10
+ - ⚡ MQTT Real-Time Messaging
11
+ - 🔄 Auto Reconnect
12
+ - 🔐 Auto Re-Login
13
+ - ♻️ Token Refresh
14
+ - 💬 Send & Receive Messages
15
+ - ❤️ Message Reactions
16
+ - 👥 Thread & Group Management
17
+ - 🎨 Themes & Stickers
18
+ - 📊 Health Monitoring
19
+ - 🚀 Fast & Lightweight
20
+
21
+ ---
22
+
23
+ ## 📦 Installation
24
+
25
+ ```bash
26
+ npm install @cexy/hoonfca
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 🚀 Quick Start
32
+
33
+ ```
34
+ const fs = require("fs");
35
+ const { login } = require("@cexy/hoonfca");
36
+
37
+ const appState = JSON.parse(
38
+ fs.readFileSync("appstate.json", "utf8")
39
+ );
40
+
41
+ login(
42
+ { appState },
43
+ {
44
+ online: true,
45
+ listenEvents: true,
46
+ autoReconnect: true
47
+ },
48
+ (err, api) => {
49
+ if (err) return console.error(err);
50
+
51
+ console.log("Logged in:", api.getCurrentUserID());
52
+
53
+ api.listenMqtt((err, event) => {
54
+ if (err || event.type !== "message") return;
55
+
56
+ if (event.body === "/ping") {
57
+ api.sendMessage("🏓 Pong!", event.threadID);
58
+ }
59
+ });
60
+ }
61
+ );
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 📋 Requirements
67
+
68
+ - Node.js **20+**
69
+
70
+ ---
71
+
72
+ ## 🔗 Links
73
+
74
+ - **GitHub:** https://github.com/hoon6t9/hinata-fca
75
+ - **NPM:** https://www.npmjs.com/package/@cexy/hoonfca
76
+
77
+ ---
78
+
79
+ ## ❤️ Credits
80
+
81
+ Developed & Maintained by **Hoon**
82
+
83
+ Inspired by:
84
+
85
+ - ws3-fca
86
+ - @dongdev/fca-unofficial
87
+
88
+ ---
89
+
90
+ ## 📄 License
91
+
92
+ MIT License
93
+
94
+ ---
95
+
96
+ <div align="center">
97
+
98
+ Made with ❤️ by **Hoon**
99
+
100
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cexy/hoonfca",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "type": "commonjs",
5
5
  "types": "src/types/index.d.ts",
6
6
  "description": "Rakib FCA - Advanced Facebook Chat API",
@@ -9,7 +9,8 @@
9
9
  "index.js",
10
10
  "src/",
11
11
  "examples/",
12
- "LICENSE"
12
+ "LICENSE",
13
+ "README.md"
13
14
  ],
14
15
  "repository": {
15
16
  "type": "git",
@@ -4,7 +4,7 @@
4
4
  const path = require("path");
5
5
  const fs = require("fs");
6
6
 
7
- const ws = "nkxfca";
7
+ const ws = "hoonfca";
8
8
 
9
9
  let h;
10
10
  const i = {};
@@ -315,11 +315,11 @@ function banner(message) {
315
315
 
316
316
  function credits() {
317
317
  if (!shouldLog('info')) return;
318
- console.log("nkxfca");
319
- console.log("Developed and maintained by NeoKEX");
320
- console.log("GitHub: https://github.com/NeoKEX");
321
- console.log("npm: https://www.npmjs.com/package/@neoaz07/nkxfca");
322
- console.log("Based on nkxfca (@neoaz07/nkxfca) — credits: NeoKEX Team, ws3-fca, @dongdev/fca-unofficial");
318
+ console.log("hoonfca");
319
+ console.log("Developed and maintained by hoon");
320
+ console.log("GitHub: https://github.com/hoon6t9");
321
+ console.log("npm: https://www.npmjs.com/package/@cexy/hoonfca");
322
+ console.log("Based on hoonfca (@cexy/hoonfca) — credits: ws3-fca, @dongdev/fca-unofficial");
323
323
  }
324
324
 
325
325
  function readLocalPackage() {
@@ -327,9 +327,9 @@ function readLocalPackage() {
327
327
  const pkgPath = path.resolve(__dirname, "..", "..", "package.json");
328
328
  const data = fs.readFileSync(pkgPath, "utf8");
329
329
  const json = JSON.parse(data);
330
- return { name: json.name || "@neoaz07/nkxfca", version: json.version || "1.2.0" };
330
+ return { name: json.name || "@cexy/hoonfca", version: json.version || "2.0.1" };
331
331
  } catch (_) {
332
- return { name: "@neoaz07/nkxfca", version: "1.2.0" };
332
+ return { name: "@cexy/hoonfca", version: "2.0.1" };
333
333
  }
334
334
  }
335
335