npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aminul-remake-fca

v1.0.0

Published

Aminul's remake of ws3-fca — next-generation Facebook Chat API fork

Readme

Preview

Disclaimer: We are not responsible if your account gets banned for spammy activities such as:
🚫 Sending too many messages to strangers
🚫 Sending spammy links
🚫 Logging in/out too quickly
🚫 Any suspicious automated behavior

⚠️ Be a responsible Facebook user and bot developer.


🎉 Features

  • ✅ Automatic AppState relogin when errors are detected.
  • ✅ Handles forced logout and re-prompts for new session.
  • ✅ Detects locked/suspended accounts and displays reason.
  • ✅ Provides powerful helper functions:
    • api.relogin()
    • api.stopListenMqtt()
    • api.getRegion()
    • api.setProfileGuard()
    • api.addFunctions()
    • api.getBotInitialData()
  • Automatic refresh of fb_dtsg tokens every midnight (GMT+8).
  • Experimental features:
    • Random user-agent rotation
    • Bypass region options (PRN, PNB, HKG, SYD, etc.)
  • ✅ Optimized user-agent = less frequent logouts.
  • ✅ Tested with Mirai, GoatBot, Autobot style frameworks.

📥 Installation

npm install aminul-remake-fca@latest

🚀 Example Usage

const login = require("aminul-remake-fca");

// Simple echo bot login({ appState: [] }, (err, api) => { if (err) return console.error(err);

api.listenMqtt((err, event) => {
    if (err) return console.error(err);

    api.sendMessage(event.body, event.threadID);
});

});

const fs = require("fs"); const login = require("aminul-remake-fca");

login({ appState: [] }, (err, api) => { if (err) return console.error(err);

api.sendMessage({
    body: "Here’s an image 📸",
    attachment: fs.createReadStream(__dirname + "/image.jpg")
}, "000000000000000");

});

💬 Sending Messages

api.sendMessage(message, threadID[, callback][, messageID])

Supported types:

Text → { body: "Hello World" }

Sticker → { sticker: "STICKER_ID" }

Image/File → { attachment: fs.createReadStream("file.jpg") }

URL Preview → { url: "https://example.com" }

Emoji → { emoji: "😂", emojiSize: "large" }

📌 Example: Text

const login = require("aminul-remake-fca");

login({ appState: [] }, (err, api) => { if (err) return console.error(err);

api.sendMessage("Hello ✨", "000000000000000");

});

🔐 Saving Session (AppState)

To avoid logging in every time:

const fs = require("fs"); const login = require("aminul-remake-fca");

login({ appState: [] }, (err, api) => { if (err) return console.error(err);

fs.writeFileSync("appstate.json", JSON.stringify(api.getAppState()));

});

👂 Listening to Events

const fs = require("fs"); const login = require("aminul-remake-fca");

login({ appState: JSON.parse(fs.readFileSync("appstate.json", "utf8")) }, (err, api) => { if (err) return console.error(err);

api.setOptions({ listenEvents: true });

var stopListening = api.listenMqtt((err, event) => {
    if (err) return console.error(err);

    switch (event.type) {
        case "message":
            if (event.body === "/stop") {
                api.sendMessage("👋 Goodbye!", event.threadID);
                return stopListening();
            }
            api.sendMessage("EchoBot: " + event.body, event.threadID);
            break;
        case "event":
            console.log(event);
            break;
    }
});

});

📚 Projects Using Aminul Remake FCA

🟢 Miraiv2

🟢 GoatBot

🟢 [Autobot / Mirai Mods]

🟢 Any custom modular bot frameworks 🔐 Saving Session (AppState)

To avoid logging in every time:

🔗 Repository

📦 NPM

npm i aminul-remake-fca

✨ Made with ❤️ by Aminul Sordar