Repository navigation
Home
M3rcena edited this page Nov 1, 2026
·
4 revisions
Welcome to the official documentation for @m3rcena/eco โ the ultimate enterprise-grade Discord.js v14 economy, banking, progression, and casino engine.
@m3rcena/eco brings real-world macroeconomic mechanics to Discord bots. Instead of a trivial wallet/bank counter, @m3rcena/eco provides a comprehensive financial ecosystem:
- ๐ฆ Advanced Banking & Vaults: 7 upgradeable vault tiers with daily compound interest and robbery protection.
- ๐ณ FICO Credit Scoring (300โ850): Mathematical credit algorithm evaluating loan repayment history, credit utilization, and debt defaults.
- ๐ Collateralized Bank Loans: 4 borrowing tiers with dynamic interest rates, payment schedules, and debt collection consequences.
- โก Municipal Utility Bills: Realistic electricity, water, and property maintenance bills generated dynamically.
- ๐๏ธ Progressive Wealth Taxes: Progressive tax brackets (2%โ8%) with high-stakes tax evasion mechanics and audits.
- ๐ผ Dynamic Career Tracks: 10 professional tiers, work shifts, promotion criteria, and hourly wage scaling.
- ๐ฌ Backpack Inventory & Enterprises: Dynamic item store, inventory management, and passive income businesses.
- ๐ฐ Next-Gen Casino Suite: Discord Components V2 interactive Blackjack, Slots, Roulette, Crash, Coinflip, and Dice.
- ๐ Simulated Stock Market: Live market simulator with bull/bear cycles and Rust-powered (
@napi-rs/canvas) candlestick charts. - ๐จ Syndicate Multiplayer Heists: Cooperative crew-based bank robberies with roles (Hacker, Driver, Muscle, Infiltrator).
- ๐พ Companion Pets & Foraging: Adopt pets, level loyalty, feed them, and send on foraging expeditions.
- ๐ First-Class Bridge Integration: Native
EcoBridgeRouterconnects seamlessly with@m3rcena/bridgefor web dashboards. - ๐พ Native SQLite & Prisma Handlers: Built-in zero-config local SQLite (
node:sqlite) and auto-migrating Prisma ORM storage.
| Guide | Description |
|---|---|
| ๐๏ธ Architecture & Database Handlers | SQLite, Prisma auto-migration, SQL table definitions, options, and storage adapters. |
| ๐ฆ Real Economy & Banking | Vault tiers, compound interest, credit score calculation, loans, bills, taxes, and audits. |
| ๐ผ Careers, Shop & Businesses | Work shifts, promotions, backpack items, inventory trading, and passive income enterprises. |
| ๐ฐ Next-Gen Casino Suite | Discord Components V2 Blackjack, Roulette, Slots, Crash, Coinflip, and Dice. |
| ๐ Stocks, Heists & Pets | Simulated stock exchange, candlestick chart generator, multiplayer bank heists, pets, and crates. |
| ๐ Dashboard Bridge Integration | Connecting @m3rcena/eco to @m3rcena/bridge and web dashboards. |
| ๐ฎ Weky Minigames Integration | Automated payouts, win streaks, PvP coin wagers, and tournament prizes with @m3rcena/weky. |
npm install @m3rcena/eco @m3rcena/bridge discord.js-
Node.js:
>= 22.0.0 -
Discord.js:
^14.0.0 -
TypeScript:
>= 5.0
import { Client, GatewayIntentBits } from "discord.js";
import { EcoManager, EcoProfileUI, EcoShopUI } from "@m3rcena/eco";
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
});
// 1. Initialize Eco Manager with zero-config SQLite
export const eco = new EcoManager({
currencySymbol: "๐ช",
currencyName: "Coins",
embedColor: "#F1C40F",
database: "sqlite", // Automatically creates ./eco.sqlite with tables & indexes
});
// 2. Slash Command / Message Example
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content === "!profile") {
// Render native Components V2 profile passport
return new EcoProfileUI(eco, { context: message }).start();
}
if (message.content === "!work") {
const shift = await eco.work(message.author.id, message.guildId ?? undefined);
if (!shift.success) return message.reply("โณ On cooldown!");
return message.reply(`๐ผ Completed shift as **${shift.jobTitle}** and earned **๐ช ${shift.earned.toLocaleString()}**! (+${shift.xp} XP)`);
}
if (message.content === "!shop") {
return new EcoShopUI(eco, { context: message }).start();
}
});
client.login(process.env.DISCORD_TOKEN);
Built with โค๏ธ by M3rcena Development โข @m3rcena/eco v14.28.1 โข Licensed under Apache-2.0
GitHub: M3rcena/m3rcena-eco โข NPM: @m3rcena/eco
GitHub: M3rcena/m3rcena-eco โข NPM: @m3rcena/eco
- Bank Vaults & Compound Interest
- FICO Credit Scoring (300-850)
- Bank Loans & Debt
- Municipal Utility Bills
- Progressive Wealth Taxes & Evasion
- Interactive Blackjack Table
- Slot Machine (50x Mega Jackpot)
- European Roulette
- Crash Multiplier Simulator
- Coinflip & Dice
- Simulated Stock & Crypto Exchange
- Multiplayer Syndicate Heists
- Companion Pets & Foraging
- Mystery Loot Crates
- Dashboard Bridge Integration
- Weky Minigames Integration
- Complete REST API Reference
- Scoped Audio Cues Table