{"_id":"fca-raihan","_rev":"3-604cf7d633301bbb7e79866d1933a8bb","name":"fca-raihan","dist-tags":{"latest":"37.2.7"},"versions":{"37.2.5":{"name":"fca-raihan","version":"37.2.5","keywords":["facebook","chat","api","messenger","bot","unofficial","fca","fca-raihan","raihan"],"author":{"url":"https://github.com/raihan9099","name":"Raihan"},"license":"MIT","_id":"fca-raihan@37.2.5","maintainers":[{"name":"raihan999","email":"mayberaihan00@gmail.com"}],"contributors":[{"url":"https://github.com/raihan9099","name":"Raihan"},{"url":"Original","name":"DongDev"}],"homepage":"https://github.com/raihan9099/fca-raihan#readme","bugs":{"url":"https://github.com/raihan9099/fca-raihan/issues"},"dist":{"shasum":"b97d8a79d015e0e4ef3a41628b5aff1aca645035","tarball":"https://registry.npmjs.org/fca-raihan/-/fca-raihan-37.2.5.tgz","fileCount":256,"integrity":"sha512-8IGCUfIXobkMDSk/tlEanE5tQtebImQHdJ6aNI8cT4b7wjzqbFH81GrB/wMCBOb4h0onwacveAJxpElHnwfzcA==","signatures":[{"sig":"MEYCIQC8BJ/e8MkD7krMrVNa+XnD762v7NEY4BMFeo0wYwUuLwIhAN/iNGVBu768PMkAnXA7ZSfCv0RQnT/fhW0dUSnGHaRz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51438480},"main":"index.js","types":"index.d.ts","engines":{"node":">=12.0.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js","require":"./index.js"}},"gitHead":"cde149134525cfc4395e6c65c03b0da71342af73","scripts":{"lint":"eslint .","test":"mocha","check":"node test/compatibility.test.js"},"_npmUser":{"name":"raihan999","email":"mayberaihan00@gmail.com"},"repository":{"url":"git+https://github.com/raihan9099/fca-raihan.git","type":"git"},"_npmVersion":"10.8.2","description":"FCA Raihan - Facebook Chat API compatibility build with stable MQTT theme and nickname methods","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ws":"^8.18.0","mime":"^3.0.0","mqtt":"^5.10.1","axios":"^1.13.5","chalk":"^4.1.2","koffi":"^3.0.2","npmlog":"^6.0.2","cheerio":"1.0.0-rc.12","request":"^2.88.2","sqlite3":"^5.1.7","bluebird":"^3.7.2","duplexify":"^4.1.3","form-data":"^4.0.4","sequelize":"^6.37.6","bufferutil":"^4.0.9","fca-raihan":"github:raihan9099/fca-raihan","protobufjs":"^8.4.0","tough-cookie":"^4.1.4","@noble/curves":"^2.2.0","@noble/hashes":"^2.2.0","totp-generator":"^1.0.0","utf-8-validate":"^6.0.5","gradient-string":"^2.0.2","websocket-stream":"^5.5.2","yumi-json-bigint":"^1.0.0","https-proxy-agent":"^4.0.0","axios-cookiejar-support":"^5.0.5","@signalapp/libsignal-client":"0.70.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","eslint":"^8.50.0"},"_npmOperationalInternal":{"tmp":"tmp/fca-raihan_37.2.5_1790732549681_0.1974485247903328","host":"s3://npm-registry-packages-npm-production"}},"37.2.6":{"name":"fca-raihan","version":"37.2.6","keywords":["facebook","chat","api","messenger","bot","unofficial","fca","fca-raihan","raihan"],"author":{"url":"https://github.com/raihan9099","name":"Raihan"},"license":"MIT","_id":"fca-raihan@37.2.6","maintainers":[{"name":"raihan999","email":"mayberaihan00@gmail.com"}],"contributors":[{"url":"https://github.com/raihan9099","name":"Raihan"},{"url":"Original","name":"DongDev"}],"homepage":"https://github.com/raihan9099/fca-raihan#readme","bugs":{"url":"https://github.com/raihan9099/fca-raihan/issues"},"dist":{"shasum":"63f0d2c427e12611e4ce670e2626227f539a32d5","tarball":"https://registry.npmjs.org/fca-raihan/-/fca-raihan-37.2.6.tgz","fileCount":256,"integrity":"sha512-adwSMRkUIzo0TDiI/Z1hChCYJu/P+miiwOpZiU9XxXA4i8LZRrxVsskpZZqVG/0hOa5l9SWoctvcSQ/YIxsu+w==","signatures":[{"sig":"MEYCIQDopuSIqTqUtDM6UGjx4UDO9+YDwq/cPXvyGOcyMKhgbAIhAKWztCRD8S7+YwaLEK6hk6MNXhvf9b++Xg5kIlWM9Mt6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIAJIl/fPkG9w+uBoJPO9yGhVydmLkpYFRs80kFd0za8WAiEAgwescJz852nGxgX7IhZCF8Tq+6DG4o9gLIDYBZj3WM4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51438761},"main":"index.js","types":"index.d.ts","engines":{"node":">=12.0.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js","require":"./index.js"}},"gitHead":"cde149134525cfc4395e6c65c03b0da71342af73","scripts":{"lint":"eslint .","test":"mocha","check":"node test/compatibility.test.js"},"_npmUser":{"name":"raihan999","email":"mayberaihan00@gmail.com"},"repository":{"url":"git+https://github.com/raihan9099/fca-raihan.git","type":"git"},"_npmVersion":"10.8.2","description":"FCA Raihan - Facebook Chat API compatibility build with stable MQTT theme and nickname methods","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ws":"^8.18.0","mime":"^3.0.0","mqtt":"^5.10.1","axios":"^1.13.5","chalk":"^4.1.2","koffi":"^3.0.2","npmlog":"^6.0.2","cheerio":"1.0.0-rc.12","request":"^2.88.2","sqlite3":"^5.1.7","bluebird":"^3.7.2","duplexify":"^4.1.3","form-data":"^4.0.4","sequelize":"^6.37.6","bufferutil":"^4.0.9","fca-raihan":"github:raihan9099/fca-raihan","protobufjs":"^8.4.0","tough-cookie":"^4.1.4","@noble/curves":"^2.2.0","@noble/hashes":"^2.2.0","totp-generator":"^1.0.0","utf-8-validate":"^6.0.5","gradient-string":"^2.0.2","websocket-stream":"^5.5.2","yumi-json-bigint":"^1.0.0","https-proxy-agent":"^4.0.0","axios-cookiejar-support":"^5.0.5","@signalapp/libsignal-client":"0.70.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","eslint":"^8.50.0"},"_npmOperationalInternal":{"tmp":"tmp/fca-raihan_37.2.6_1790733680497_0.7421644270165211","host":"s3://npm-registry-packages-npm-production"}},"37.2.7":{"_id":"fca-raihan@37.2.7","bugs":{"url":"https://github.com/raihan9099/fca-raihan/issues"},"dist":{"shasum":"127756a79e4a8c2347d56da194a46160157e8a97","tarball":"https://registry.npmjs.org/fca-raihan/-/fca-raihan-37.2.7.tgz","fileCount":256,"integrity":"sha512-pMTCBefbnoXHj2/paueSCIWRSVmOo8wHK87/FcwkRKrFSecuc4zXoPB3WPQsV0QcTIfLaWphyZL3XmMBvRYidg==","signatures":[{"sig":"MEUCIQDzX4IWXevClDzYhhXKkBkGi6XEvRA+DvAD4PqaootCgwIgevjgydCsd6GNdSs+j1dgXOzsrIih01TkhMrAU1YGaj4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDirSDlQyQqlXizQOu0bpWUvZ+BrHycaEVp50+wBLsa2gIgSnN5eYGkO2tO6XBF200d4v263SvawOsZ7Ho6n7omcRs="}],"unpackedSize":51438712},"main":"index.js","name":"fca-raihan","types":"index.d.ts","author":{"url":"https://github.com/raihan9099","name":"Raihan"},"engines":{"node":">=12.0.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js","require":"./index.js"}},"gitHead":"cde149134525cfc4395e6c65c03b0da71342af73","license":"MIT","scripts":{"lint":"eslint .","test":"mocha","check":"node test/compatibility.test.js"},"version":"37.2.7","_npmUser":{"name":"raihan999","email":"mayberaihan00@gmail.com"},"homepage":"https://github.com/raihan9099/fca-raihan#readme","keywords":["facebook","chat","api","messenger","bot","unofficial","fca","fca-raihan","raihan"],"repository":{"url":"git+https://github.com/raihan9099/fca-raihan.git","type":"git"},"_npmVersion":"10.8.2","description":"FCA Raihan - Facebook Chat API compatibility build with stable MQTT theme and nickname methods","directories":{},"maintainers":[{"name":"raihan999","email":"mayberaihan00@gmail.com"}],"_nodeVersion":"20.20.2","contributors":[{"url":"https://github.com/raihan9099","name":"Raihan"},{"url":"Original","name":"DongDev"}],"dependencies":{"ws":"^8.18.0","mime":"^3.0.0","mqtt":"^5.10.1","axios":"^1.13.5","chalk":"^4.1.2","koffi":"^3.0.2","npmlog":"^6.0.2","cheerio":"1.0.0-rc.12","request":"^2.88.2","sqlite3":"^5.1.7","bluebird":"^3.7.2","duplexify":"^4.1.3","form-data":"^4.0.4","sequelize":"^6.37.6","bufferutil":"^4.0.9","protobufjs":"^8.4.0","tough-cookie":"^4.1.4","@noble/curves":"^2.2.0","@noble/hashes":"^2.2.0","totp-generator":"^1.0.0","utf-8-validate":"^6.0.5","gradient-string":"^2.0.2","websocket-stream":"^5.5.2","yumi-json-bigint":"^1.0.0","https-proxy-agent":"^4.0.0","axios-cookiejar-support":"^5.0.5","@signalapp/libsignal-client":"0.70.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","eslint":"^8.50.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fca-raihan_37.2.7_1790845423614_0.7710130684696983"}}},"time":{"created":"2026-09-30T01:42:29.454Z","modified":"2026-10-01T09:03:44.205Z","37.2.5":"2026-09-30T01:42:30.030Z","37.2.6":"2026-09-30T02:01:20.970Z","37.2.7":"2026-10-01T09:03:43.992Z"},"bugs":{"url":"https://github.com/raihan9099/fca-raihan/issues"},"author":{"url":"https://github.com/raihan9099","name":"Raihan"},"license":"MIT","homepage":"https://github.com/raihan9099/fca-raihan#readme","keywords":["facebook","chat","api","messenger","bot","unofficial","fca","fca-raihan","raihan"],"repository":{"url":"git+https://github.com/raihan9099/fca-raihan.git","type":"git"},"description":"FCA Raihan - Facebook Chat API compatibility build with stable MQTT theme and nickname methods","contributors":[{"url":"https://github.com/raihan9099","name":"Raihan"},{"url":"Original","name":"DongDev"}],"maintainers":[{"name":"raihan999","email":"mayberaihan00@gmail.com"}],"readme":"<div align=\"center\">\r\n\r\n<img src=\"./banner.jpg\" alt=\"fca-riyad banner\" width=\"100%\" />\r\n\r\n# 💬 fca-riyad\r\n\r\n### 🚀 The Ultimate Unofficial Facebook Messenger Bot API for Node.js\r\n**NEXCA Engine · Signal Protocol · sessionGuard · 90+ API Methods**\r\n\r\n<br>\r\n\r\n<div align=\"center\">\r\n  <h1>\r\n    <kbd> 🔒 E2EE SUPPORTED 🔒 </kbd>\r\n  </h1>\r\n  <h3>\r\n    <b>Real⚡End-to-End Encryption (Signal Protocol)</b><br>\r\n    <i>📨Chat with absolute privacy, exactly like the official Messenger App!</i>\r\n  </h3>\r\n</div>\r\n\r\n<br>\r\n\r\n[![npm](https://img.shields.io/npm/v/fca-riyad?color=ff4785&label=npm&style=for-the-badge)](https://www.npmjs.com/package/fca-riyad)\r\n[![license](https://img.shields.io/badge/license-MIT-9b59b6?style=for-the-badge)](./LICENSE-MIT)\r\n[![node](https://img.shields.io/badge/node-%3E%3D18-2ecc71?style=for-the-badge)](https://nodejs.org)\r\n[![E2EE](https://img.shields.io/badge/🔒_E2EE-SUPPORTED-00FF00?style=for-the-badge)](https://signal.org)\r\n\r\n**[✨ Features](#-features)** · **[📦 Installation](#-installation)** · **[🚀 Quick Start](#-quick-start)** · **[🔐 E2EE](#-e2ee--encrypted-conversations)** · **[🛡️ sessionGuard](#-sessionguard)** · **[📡 sendBroadcast](#-sendbroadcast)** · **[📖 API Reference](#-api-reference)**\r\n\r\n</div>\r\n\r\n---\r\n\r\n## 🔥 Why Developers are Switching to fca-riyad?\r\n\r\n> 🚨 **STOP using outdated, broken FCA libraries!** \r\n> `fca-riyad` is engineered for the modern era. We solved the bugs others couldn't and added features everyone wanted.\r\n\r\n| | |\r\n|---|---|\r\n| 🔒 | **<samp>E2EE SUPPORTED</samp>** — Full Signal Protocol integration! Your bot can now send & receive encrypted messages flawlessly. |\r\n| ⚡ | **NEXCA Engine** — Ultra-stable MQTT, jitter, and autoReconnect. Zero downtime. |\r\n| 🛡️ | **sessionGuard** — Say goodbye to silent logouts and corrupted appstates! It auto-saves and protects your sessions. |\r\n| 📢 | **sendBroadcast** — Massive, rate-limited multi-thread broadcasting built-in. |\r\n| 🛠️ | **Fixed Core Bugs** — \"Connection refused: No subscription existed\" and MQTT race conditions? **FIXED.** |\r\n| ⚙️ | **RIYAD BOT Framework Native** — Drop-in ready, optional `threadID`, zero TypeScript bloat. |\r\n| 🎯 | **90+ API Methods** — If Messenger can do it, `fca-riyad` can do it. Period. |\r\n\r\n---\r\n\r\n## ✨ Mind-Blowing Features\r\n\r\n- 🔒 **True E2EE** — Signal Protocol encrypted threads (`connectE2EE`, `listenE2EE`, `e2ee.*`).\r\n- 📡 **Full Messenger API** — messages, reactions, attachments, stickers, polls, pins, and more.\r\n- 🚀 **NEXCA MQTT** — Rock-solid connection with `isActiveClient` guard.\r\n- 🛡️ **sessionGuard** — appstate auto-save, corruption guard, and `.bak` backup.\r\n- 📢 **sendBroadcast** — parallel/sequential multi-thread sending with smart rate limiting.\r\n- 🤖 **MessengerBot** — Discord.js/Telegraf style `.command`, `.hears`, `.launch`.\r\n- 🎯 **createFcaClient** — Clean namespaced facade (`client.messages`, `client.threads` etc.).\r\n- 🤝 **RIYAD BOT Framework native** — Built-in, drop-in ready.\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install fca-riyad\r\n```\r\n\r\n> 🟢 **Node.js >= 18 required.**\r\n\r\n---\r\n\r\n## 🚀 Quick Start\r\n\r\n### Classic (RIYAD BOT Framework)\r\n\r\n```javascript\r\nconst login = require(\"fca-riyad\");\r\n\r\nlogin({ appState: require(\"./account.json\") }, { listenEvents: true }, (err, api) => {\r\n  if (err) throw err;\r\n\r\n  api.sessionGuard(\"./account.json\", {\r\n    interval: 3 * 60 * 1000,\r\n    debounce: 30 * 1000\r\n  });\r\n\r\n  api.listenMqtt((err, event) => {\r\n    if (err) throw err;\r\n    if (event.type === \"message\") api.sendMessage(event.body, event.threadID);\r\n  });\r\n});\r\n```\r\n\r\n### 🔐 With E2EE (Regular + Encrypted Threads)\r\n*Unlock the power of true privacy!*\r\n\r\n```javascript\r\nlogin({ appState: require(\"./account.json\") }, { listenEvents: true }, async (err, api) => {\r\n  if (err) throw err;\r\n\r\n  api.sessionGuard(\"./account.json\");\r\n  \r\n  // 🚀 Initialize Signal Protocol E2EE\r\n  await api.connectE2EE();\r\n\r\n  api.listenE2EE((err, event) => {\r\n    if (err) throw err;\r\n    if (event.type === \"message\") {\r\n      if (event.isE2EE) {\r\n        api.e2ee.sendMessage(event.threadID, \"Got your encrypted message! 🔒\");\r\n      } else {\r\n        api.sendMessage(\"Got it!\", event.threadID);\r\n      }\r\n    }\r\n  });\r\n});\r\n```\r\n\r\n### RIYAD BOT Framework login.js\r\n\r\n```javascript\r\nconst login = require(\"fca-riyad\");\r\n\r\nlogin({ appState }, options, async (err, api) => {\r\n  if (err) return;\r\n\r\n  api.sessionGuard(path.join(process.cwd(), \"account.txt\"), {\r\n    interval: 3 * 60 * 1000,\r\n    debounce: 30 * 1000\r\n  });\r\n\r\n  try { await api.connectE2EE(); } catch (e) {}\r\n\r\n  api.listenMqtt(callback);\r\n});\r\n```\r\n\r\n---\r\n\r\n## 🔒 E2EE — Encrypted Conversations\r\n\r\n> Uses Facebook's real Signal Protocol infrastructure — **same as the official Messenger app.**\r\n\r\n### Setup\r\n\r\n```javascript\r\nawait api.connectE2EE();\r\n// Auto-creates .nexca/e2ee_device.json\r\n\r\nconsole.log(api.e2ee.isConnected()); // true\r\n```\r\n\r\n### Listen (Regular + E2EE Combined)\r\n\r\n```javascript\r\napi.listenE2EE((err, event) => {\r\n  if (event.type === \"message\") {\r\n    if (event.isE2EE) {\r\n      api.e2ee.sendMessage(event.threadID, \"Encrypted reply! 🔐\");\r\n    } else {\r\n      api.sendMessage(\"Normal reply!\", event.threadID);\r\n    }\r\n  }\r\n});\r\n```\r\n\r\n### E2EE Methods\r\n\r\n```javascript\r\nawait api.e2ee.sendMessage(threadID, \"Hello!\");\r\nawait api.e2ee.sendMessage(threadID, { body: \"Photo!\", attachment: fs.createReadStream(\"photo.jpg\") });\r\nawait api.e2ee.sendReaction(threadID, messageID, \"❤️\");\r\nawait api.e2ee.sendTyping(threadID, true);\r\nawait api.e2ee.unsendMessage(messageID, threadID);\r\nawait api.e2ee.editMessage(threadID, messageID, \"Updated!\");\r\napi.e2ee.isConnected();\r\nawait api.e2ee.disconnect();\r\n```\r\n\r\n---\r\n\r\n## 🛡️ sessionGuard\r\n\r\n> Protects your appstate from corruption and silent logouts. Never lose your session again!\r\n\r\n```javascript\r\napi.sessionGuard(\"./account.json\");\r\n\r\n// Custom timing\r\napi.sessionGuard(\"./account.json\", {\r\n  interval: 3 * 60 * 1000,\r\n  debounce: 30 * 1000\r\n});\r\n```\r\n\r\n**What it does:**\r\n- 🔄 Auto-saves appstate every N minutes\r\n- 💾 Saves after every successful sendMessage (debounced)\r\n- 🛡️ Corruption guard — never overwrites a larger appstate with a smaller one\r\n- 📦 Auto-backup — writes `.bak` before every overwrite\r\n\r\n```javascript\r\napi.saveSession();           // force save now\r\napi.restoreSessionBackup();  // restore from .bak\r\napi.stopSessionGuard();      // stop the timer\r\n```\r\n\r\n---\r\n\r\n## 📡 sendBroadcast\r\n\r\n> Rate-limited multi-thread broadcast. Send to thousands without getting flagged.\r\n\r\n```javascript\r\nconst result = await api.sendBroadcast(\r\n  \"Hello everyone!\",\r\n  [\"THREAD_1\", \"THREAD_2\", \"THREAD_3\"],\r\n  {\r\n    delay: 2000,\r\n    parallel: 2,\r\n    onEach: (err, info, id) => {\r\n      console.log(err ? \"Failed: \" + id : \"Sent: \" + id);\r\n    }\r\n  }\r\n);\r\nconsole.log(result.sent.length + \"/\" + result.total + \" delivered\");\r\n```\r\n\r\n---\r\n\r\n## 🤖 MessengerBot\r\n\r\n> Discord.js/Telegraf style high-level bot class.\r\n\r\n```javascript\r\nconst { createMessengerBot } = require(\"fca-riyad\");\r\n\r\nconst bot = await createMessengerBot(\r\n  { appState: require(\"./account.json\") },\r\n  { commandPrefix: \"/\", stopOnSignals: true }\r\n);\r\n\r\nbot.command(\"ping\", async ctx => await ctx.replyAsync(\"pong 🏓\"));\r\nbot.hears(/hello/i, async ctx => await ctx.replyAsync(\"Hi! 👋\"));\r\nbot.on(\"messageCreate\", event => console.log(event.body));\r\n\r\nawait bot.launch({ stopOnSignals: true });\r\n```\r\n\r\n---\r\n\r\n## 🎯 createFcaClient\r\n\r\n> Namespaced facade grouping all API methods by domain.\r\n\r\n```javascript\r\nconst { createFcaClient } = require(\"fca-riyad\");\r\nconst client = createFcaClient(api);\r\n\r\nawait client.messages.send(\"Hello!\", threadID);\r\nawait client.messages.react(\"❤️\", messageID, threadID);\r\nawait client.threads.getInfo(threadID);\r\nawait client.users.getInfo(userID);\r\nawait client.account.refreshDtsg();\r\n```\r\n\r\n---\r\n\r\n## 📖 API Reference\r\n\r\n<details>\r\n<summary><b>💬 Sending Messages</b></summary>\r\n\r\n```javascript\r\napi.sendMessage(\"Hello!\", threadID);\r\napi.sendMessage({ body: \"Photo!\", attachment: fs.createReadStream(\"photo.jpg\") }, threadID);\r\napi.sendMessage({ body: \"Hey @John\", mentions: [{ id: \"uid\", tag: \"@John\", fromIndex: 4 }] }, threadID);\r\napi.sendMessage({ sticker: \"369239263222822\" }, threadID);\r\napi.sendMessage({ location: { latitude: 23.8, longitude: 90.4, current: true } }, threadID);\r\napi.sendBroadcast(\"msg\", [\"tid1\", \"tid2\"], { delay: 2000 });\r\napi.sendGif(\"https://media.giphy.com/xyz.gif\", threadID);\r\napi.sendLocation(23.8, 90.4, threadID);\r\napi.sendImage(\"./photo.jpg\", threadID, \"caption\");\r\napi.sendVideo(\"./video.mp4\", threadID);\r\napi.sendAudio(\"./voice.ogg\", threadID);\r\napi.sendFile(\"./doc.pdf\", threadID);\r\napi.shareLink(\"https://github.com\", threadID, \"Check this!\");\r\napi.shareContact(\"Meet my friend!\", userID, threadID);\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>✏️ Message Actions</b></summary>\r\n\r\n```javascript\r\napi.editMessage(\"Updated text\", messageID);\r\napi.unsendMessage(messageID);\r\napi.deleteMessage([messageID]);\r\napi.setMessageReaction(\"😍\", messageID, threadID);  // threadID optional\r\napi.setMessageReaction(\"\", messageID);               // remove reaction\r\napi.getMessage(threadID, messageID);\r\napi.forwardAttachment(attachmentID, [userID]);\r\napi.uploadAttachment([fs.createReadStream(\"photo.jpg\")]);\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>👁️ Read Receipts & Typing</b></summary>\r\n\r\n```javascript\r\napi.markAsRead(threadID);\r\napi.markAsReadAll();\r\napi.markAsDelivered(threadID, messageID);\r\napi.markAsSeen();\r\napi.sendTypingIndicator(threadID, true);\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>🧵 Thread Management</b></summary>\r\n\r\n```javascript\r\napi.getThreadInfo(threadID);\r\napi.getThreadList(10, null, [\"INBOX\"]);\r\napi.getThreadHistory(threadID, 20);\r\napi.createGroup(\"Hey!\", [\"uid1\", \"uid2\"]);\r\napi.deleteThread(threadID);\r\napi.muteThread(threadID, 3600);\r\napi.changeArchivedStatus(threadID, true);\r\napi.handleMessageRequest(threadID, true);\r\napi.searchForThread(\"query\");\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>🎨 Thread Customization</b></summary>\r\n\r\n```javascript\r\napi.setTitle(\"New Name\", threadID);\r\napi.changeThreadColor(\"#0084FF\", threadID);\r\napi.changeThreadEmoji(\"🔥\", threadID);\r\napi.changeNickname(\"The Boss\", threadID, userID);\r\napi.changeGroupImage(fs.createReadStream(\"group.jpg\"), threadID);\r\napi.changeAdminStatus(threadID, userID, true);\r\napi.addUserToGroup(userID, threadID);\r\napi.removeUserFromGroup(userID, threadID);\r\napi.createPoll(\"Question?\", threadID, { \"Yes\": false, \"No\": false });\r\napi.pinMessage(messageID, threadID);\r\napi.unpinMessage(messageID, threadID);\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>👤 User Info</b></summary>\r\n\r\n```javascript\r\napi.getUserInfo(userID);\r\napi.getUserID(\"John Doe\", callback);\r\napi.getUID(\"https://facebook.com/zuck\");\r\napi.getFriendsList();\r\napi.getAvatarUser(userID);\r\napi.getProfileInfo(userID);\r\napi.getPublicData(userID);\r\napi.sendFriendRequest(userID);\r\napi.handleFriendRequest(userID, true);\r\napi.changeBlockedStatus(userID, true);\r\napi.followUser(userID);\r\napi.unfollowUser(userID);\r\napi.unfriend(userID);\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>📢 Social</b></summary>\r\n\r\n```javascript\r\napi.reactToPost(postID, \"love\");\r\napi.reactToComment(commentID, \"haha\");\r\napi.postComment(postID, \"Great post!\");\r\napi.sharePost(postID, \"Check this!\");\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>⚙️ Account & Config</b></summary>\r\n\r\n```javascript\r\napi.getCurrentUserID();\r\napi.getAppState();\r\napi.setOptions({ listenTyping: true });\r\napi.logout();\r\napi.refreshFb_dtsg();\r\napi.addExternalModule(\"myFunc\", (defaultFuncs, api, ctx) => {\r\n  return function(text, threadID) {\r\n    return api.sendMessage(\"[BOT] \" + text, threadID);\r\n  };\r\n});\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b>🌐 HTTP Utilities</b></summary>\r\n\r\n```javascript\r\napi.httpGet(url, params, callback);\r\napi.httpPost(url, form, callback);\r\napi.httpPostFormData(url, form, callback);\r\napi.uploadImageToImgbb(imageUrl);\r\n```\r\n</details>\r\n\r\n---\r\n\r\n## 📋 Login Options\r\n\r\n| Option | Type | Default | Description |\r\n|--------|------|---------|-------------|\r\n| `selfListen` | boolean | false | Receive your own sent messages |\r\n| `listenEvents` | boolean | true | Receive thread/group events |\r\n| `listenTyping` | boolean | false | Receive typing indicator events |\r\n| `updatePresence` | boolean | false | Receive online/offline presence events |\r\n| `autoMarkDelivery` | boolean | false | Auto-mark incoming messages as delivered |\r\n| `autoMarkRead` | boolean | false | Auto-mark threads as read |\r\n| `autoReconnect` | boolean | true | Auto-reconnect MQTT on disconnect |\r\n| `online` | boolean | false | Appear as online to others |\r\n| `emitReady` | boolean | false | Emit ready event when MQTT connected |\r\n| `proxy` | string | — | HTTP proxy URL |\r\n| `userAgent` | string | Safari UA | Override HTTP User-Agent |\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nMIT License\r\n\r\n**fca-riyad** by [Riyad](https://github.com/Riyad761)\r\nNEXCA Engine by [Deku](https://github.com/dekuzxc) — MIT License\r\n\r\n> 🚫 Unauthorized copying or redistribution without credit is strictly prohibited.\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n\r\nMade with ❤️ & 🔒 by **Riyad**\r\n\r\n</div>\r\n","readmeFilename":"README.md"}