Build Discord bots
like real software.
Spraxium adds the architecture layer that Discord.js doesn't provide: modules, dependency injection, guard pipelines, and typed commands. One model, every interaction type.

Modules with explicit boundaries, injected providers, and a DI container that resolves everything deterministically at boot.
Stack modules across feature boundaries, share providers between them, and apply guards to every interaction type from a single decorator.
Every provider hooks into onBoot(), onReady(), and onShutdown(). No hidden initialization order, no timing races.
Write permission logic once as a guard class and apply it to slash commands, context menus, and prefix commands with a single decorator.
Every command option, interaction payload, and provider contract is fully typed. No casting, no any, no runtime surprises from Discord's API.
Providers are pure injectable classes with declared dependencies. Swap real implementations for mocks at test time without touching production code.
Architecture benchmark
Less complexity as your bot grows.
As a project scales past a few commands, discord.js requires increasingly manual wiring: guards, DI, scheduling, and state all done by hand. Spraxium handles that layer.
* Illustrative complexity estimates based on lines of infrastructure code required per milestone in a typical production bot project.
The Architecture Gap
Same command. Different world.
Same /ban command, built twice. Once with raw discord.js, once with Spraxium. The difference is not syntax. It is structure, safety, and scale.
- Registration and handler are completely decoupled, with no structural link between them
- Permission checks written by hand in every handler with no enforcement or reuse
- All interactions route through one global listener, zero feature isolation
- No dependency injection; services are imported directly with no abstraction
- No module system; features grow side by side with no enforced boundaries
Why it exists
Built out of real frustration.
Every Spacelaxy bot started the same way: a clean discord.js project that turned into a tangled mess as features were added. No structure, no boundaries, global state everywhere. The code worked, but nobody wanted to touch it.
Spraxium started as an internal tool to fix that. Modules, DI, guards: principles borrowed from backend engineering, applied to Discord bot development. It ran every Spacelaxy bot in production for over a year before anyone outside the team saw it.
Now it’s open source. The same framework, cleaned up, documented, and ready for anyone who’s tired of writing the same if-else chains in every listener.
Slash commands
Define the shape. Handle the logic. Keep them separate.
Spraxium splits slash commands into two files: a command class that declares options and permissions, and a handler that receives injected services and executes the logic. The framework wires them together at boot.
- Type-safe options via @SlashOption decorators
- Full DI injection in the handler, just like any other class
- Guards apply at the handler level, not buried inside it
- Auto-registered on Discord at startup
Package ecosystem
One framework, twelve packages.
Twelve focused packages built around the same module-and-DI contract. Each is opt-in, independently versioned, and drops into any module with a single import. Start with core and common. Add the rest as your bot grows.
UI Components
Build Discord UI components as TypeScript classes.
Declare each Discord UI component as a typed TypeScript class. No manual builders, no scattered options. Composable and injectable out of the box.
Explore ComponentsModals
Modals that feel native, validated, and production-ready.
Define modal fields as class properties. Validators run before your handler is called. Cached responses survive the 15-minute Discord timeout automatically.
Read the docsCLI Ecosystem
One command. Any integration.
Spraxium's CLI doesn't stop at installing dependencies. It scaffolds providers, registers modules, and wires defaults into your architecture in seconds. Click any integration to preview the exact command and generated setup.

Use cases
One framework. Every kind of bot.
From scalable slash command bots to multi-service architectures, each package slots in independently and does one job well.
Scalable bot architecture
Build multi-module bots with topological DI, guard pipelines, and typed lifecycle hooks. @spraxium/core and @spraxium/common handle structure that grows from 10 to 200 commands.
HTTP endpoints inside your bot
Run REST controllers in the same process as Discord. @spraxium/http provides DTOs, validation, and a BotBridge to send Discord messages directly from HTTP handlers.
Cross-service event delivery
Receive typed, HMAC-signed events from any Node.js backend using @spraxium/signal. No polling, no shared database, no coupling between services.
Scheduled jobs and automation
Declare cron and interval jobs that start after onReady() and stop cleanly on shutdown. @spraxium/schedule integrates with the module lifecycle out of the box.
Multi-language community bots
Per-guild locale resolution, lazy-loaded message files, and typed translation keys across every slash command. Powered by @spraxium/i18n.
Typed config and observability
Validate every environment variable at boot with auto-generated schemas. Track command usage, latency, and error rates from day one with @spraxium/env and @spraxium/analytics.
“I've tried discord.js, Necord, even raw REST calls. Nothing comes close. Spraxium is the first framework that actually feels like it was designed for large bots. Necord couples too hard with discord.js internals and bleeds that complexity everywhere. With Spraxium, each feature finally has a real home.”
Project Status
What's shipped. What's next.
Spraxium is in active development. Here's a transparent overview of what's available today and what's on the roadmap.
- @spraxium/logger: structured logging
- @spraxium/webhook: decorator-based senders
- @Defer() and @AutoDefer() decorators
- Process lock & --force-unlock flag
- Upgrade notifier on startup
- Cross-package stabilization (0.2.0)
- Webhook handler decorators
- Hot module reload (dev mode)
- Documentation site
- Testing utilities & vitest helpers
- Example bot projects
- @spraxium/dashboard: web UI
- Plugin registry & marketplace
- Voice state handler decorators
- CLI new project templates v2
- Rate limiting decorators
- @spraxium/cache: distributed cache
Start building
Treat your bot as a product surface.
Clear module boundaries, a guard pipeline that covers every interaction type, startup diagnostics that show exactly what loaded, and nine packages ready when your bot needs to grow.
