Introduction
djs-core is a TypeScript framework for building Discord bots. It brings a file-based routing system — similar to Next.js or Nuxt — to discord.js, so you spend less time wiring things up and more time building features.
How it works
Drop a file in the right folder and it’s automatically registered. No manual handler registration, no boilerplate.
| Folder | What gets registered |
|---|---|
src/interactions/commands/ |
Slash commands |
src/interactions/contexts/ |
Context menus |
src/events/ |
Discord event listeners |
src/components/buttons/ |
Button handlers |
src/components/modals/ |
Modal handlers |
src/components/selects/ |
Select menu handlers |
src/cron/ |
Scheduled tasks |
Key features
- File-based routing — file path = command name (
admin/kick.ts→/admin kick) - Full TypeScript — typed interactions, options, and data flows out of the box
- Typed component data — pass structured data between commands and components via
.withData<T>()/.setData() - Auto command registration — slash commands register on startup, no extra steps
- Plugin system — extend your bot with reusable plugins