Loading repository data…
Loading repository data…
lianecagara / repository
Cassieah is the first ever all-around (Personal Fb bot, Page Bot, Discord Bot, Web Bot) chatbot with the best Typescript Tooling and Rich Libraries. Cassieah is also a fork of CassidySpectra which is a revamped version of CassidyBoT with enhanced features and improved performance, created and well-maintained by lianecagara.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
CassieahBoT (formerly CassidySpectra, forked from CassidyRedux, originally CassidyBoT) is a multi-platform chatbot framework for Facebook, Discord, and web. Maintained by Liane Cagara (lianecagara on GitHub), it uses TypeScript for robust tooling and now includes napi-rs canvas for image generation because text-only output is outdated. This is the 4.0+ dev branch, so expect rough edges. If you break something, that’s on you.
CassieahBoT is a framework for building bots that work across Facebook (personal accounts and pages), Discord (partially), and web interfaces. It leverages TypeScript for type safety and includes napi-rs canvas for generating images dynamically. It’s extensible but not foolproof. If you don’t follow instructions, don’t expect it to work.
UTShop and GameSimulator for common tasks.Follow these steps exactly. If the bot doesn’t work, check the logs first before asking for help.
Fork or Generate the Repository:
https://github.com/your-username/CassieahBoT).Clone the Repository:
git clone https://github.com/your-username/CassieahBoT
cd CassieahBoT
Run Update Command:
npm run update
Install Dependencies:
npm install
Install napi-rs Canvas:
npm install @napi-rs/canvas
libcairo2-dev, libpango1.0-dev). Search for solutions if it fails.Set Up Cookies:
cookie.json with your cookies.node hidestate if using an .env file to secure appstate.cookie.json to a public repo. Use environment variables.Facebook Messenger Setup:
https://your-railway-url/webhook (set after deployment).pagebot) and note it.messages, messaging_optins, messaging_postbacks.settings.json:
{
"pageAccessToken": "your-page-access-token",
"pageVerifyToken": "your-verify-token",
"discordBotToken": "",
"discordClientID": ""
}
Discord (Optional):
settings.json.Database:
.env:
MONGO_URI="your-mongodb-uri"
Local Testing:
npm start
cookie.json, settings.json, or logs.Railway Deployment:
MONGO_URI: Your MongoDB URI.APPSTATE: Contents of cookie.json (or use the file).https://your-project-name.up.railway.app)./webhook (e.g., https://your-project-name.up.railway.app/webhook).Testing:
Commands are defined in JavaScript/TypeScript files. Here’s the format:
export const meta: CommandMeta = {
name: "example",
otherNames: ["ex", "test"],
author: "Your Name",
version: "1.0.0",
description: "Basic command example.",
usage: "{prefix}{name} [arg]",
category: "Misc",
role: 0,
waitingTime: 5,
};
export async function entry({ input, output, args }: CommandContext) {
output.reply(`You said: ${args[0] || "nothing"}`);
}
See the LICENSE file for details.
Important: Always run npm run update before editing any files, or updates will break. If the bot isn’t responding, check the logs (Railway or local). Most issues are due to misconfigured tokens, cookies, or roles. Don’t skip steps, and don’t expect it to work if you half-read this.
(Current as of December 24, 2025 – Modern Best Practices Only)
This is the final, production-hardened reference.
Every pattern below is used daily in the largest CassieahBoT economies.
Prioritized from most critical to advanced.
ctx – The Core Context Object (Most Important)ctx is passed to every command handler. It contains everything.
Always destructure directly in parameters (mandatory style):
async handler({ input, output, money }) {
// Now use input, output, money directly
}
This is the cleanest, fastest, and most consistent way.
Do not do this:
async handler(ctx) {
const { input, output, money } = ctx; // Verbose, unnecessary
}
Do not access via ctx.input.body — always destructure in params.
meta: CommandMeta) – Required Fieldsexport const meta: CommandMeta = {
name: "vault",
otherNames: ["v", "safe"],
description: "Secure storage with deposit/withdrawal fees",
usage: "{prefix}{name} [deposit|withdraw|list]",
category: "Economy",
version: "4.0.0",
icon: "🔒",
waitingTime: 3, // cooldown in seconds per user
role: 0, // 0=everyone, 1=thread admin+, 1.5=moderator+, 2=bot admin
};
waitingTime → automatic per-user cooldown
role → automatic block if insufficient
Read current user role:
input.role // returns 0, 1, 1.5, or 2
export const style: CommandStyle = {
title: "🔒 Vault System", // string = auto-styled title
contentFont: "fancy",
lineDeco: "altar", // or "x"
};
If style is exported, output.reply(text) and output.send(text) automatically apply it.
await output.reply("Styled automatically")
await output.send("Also styled", "thread123")
Only use replyStyled when overriding.
defineEntryexport const entry = defineEntry({
async deposit({ input, output, money }) {
// logic
},
async withdraw({ input, output, money }) {
// logic
},
async list({ input, output, money }) {
// logic
},
});
SpectralCMDHomeconst home = new SpectralCMDHome({}, [
{
key: "deposit",
aliases: ["dep"],
async handler({ input, output, money }) {
// logic
}
},
{
key: "withdraw",
aliases: ["wd"],
async handler({ input, output, money }) {
// logic
}
},
]);
return home.runInContext(ctx);
input – Message Intelligenceinput.body // full message
input.words // ["vault", "deposit", "1000"]
input.args // ["deposit", "1000"]
input.senderID // user ID
input.messageReply?.senderID // replied user
input.mentions // { "@Name": "uid" }
Object.values(input.mentions)[0] // first @ UID
input.hasMentions // true/false
input.role // 0–2
input.isGroup // group chat?
input.test(/all/i) // regex
input.isMessage() // text message
input.hasWordOR("all", "max") // any word
input.hasWordAND("send", "money") // all words
input.equal("yes") // exact
input.lower().body // lowercase
// Detect target user (used in transfers, trades, duels)
const target = input.messageReply?.senderID || Object.values(input.mentions)[0];
output – Messaging Powerawait output.reply("Auto-styled")
await output.send("To thread", "thread123")
await output.attach("Caption", "https://img.jpg")
await output.edit("Update", "mid123")
await output.unsend("mid123")
await output.reaction("❤️", "mid123")
await output.wentWrong()
await output.error(new Error("Fail"))
const msg = await output.reply("Question?");
m