CommandKit Framework Overview
CommandKit is a meta-framework for discord.js that manages the entire development lifecycle (bundling, TypeScript/JSX compilation, and command registration). Key features include:
- JSX Components: Declarative UI code for Discord components instead of builder chains.
- Built-in Component Handlers: Direct
onClick,onSelect, andonSubmithandlers for buttons, menus, and modals, removing the need for manual interaction collectors. - Command Middlewares: A layer to run logic (e.g., permission checks, cooldowns) before or after command execution.
- Unified Commands: Support for slash commands, context menus, and prefix commands within a single file.
- Extensibility: A plugin system for adding behaviors, custom events, i18n, analytics, and AI-powered natural language command execution.