djs-commandsv2 docs
Concepts

Concepts

The mental model behind djs-commands v2.

These pages explain the building blocks of djs-commands — what they do, when to reach for them, and how they compose. Read them in order on your first pass; jump in topically afterwards.

How the pieces fit

Discord interaction

createCommandHandler (subscribes to events)

Dispatcher (looks up command by name)

Validators (gate the call)

Plugins (wrap the call — before/after)

command.run({ interaction, ...context })

Components V2 reply (optional)

Storage sits orthogonal to that pipeline — anything that needs to remember state across calls (cooldowns, per-guild prefixes, user preferences) reads and writes through the adapter you provide.

On this page