Runtime Lifecycle
Startup Sequence
- Load env (
.env)
- Load and normalize
arcane.config.js
- Scan and validate command/event/package JSON
- Create Discord client with mapped intents/partials
- Login and wait for ready
- Register slash commands
- Bind runtime handlers (
interactionCreate, messageCreate)
- Bind configured event listeners from
events/**/*.json
Dev Reload Sequence
- File watcher detects update
- Project state reloads
- Slash commands re-register
- Event listeners are re-bound from current config
- Existing process keeps running
Failure Modes
- Validation errors: block startup/deploy early
- Missing token: startup fails fast
- Network/DNS failures: login fails, surface error and retry externally