Framework
PrepareContext<TConfig>
Interface: PrepareContext<TConfig>
Context provided to prepare hooks. Runs AFTER portal is populated, BEFORE start hooks. Runs SEQUENTIALLY: plugins in registration order → project. Use for initializing resources like Discord client, HTTP servers.
Type Parameters
| Type Parameter | Default type |
|---|---|
TConfig | unknown |
Properties
| Property | Type | Description |
|---|---|---|
env | typeof Env | Environment variable access. |
logger | Logger | Logger instance prefixed with plugin name. |
meta | { name: string; version: string; } | Plugin metadata. |
meta.name | string | Package name |
meta.version | string | Package version |
mode | string | Current runtime mode (supports custom modes like 'beta', 'staging', etc.). |
pluginConfig | TConfig | Plugin's configuration from user's /config/plugins/. Typed based on plugin's config schema. |
projectConfig | Config | Full project configuration. |
state | PluginState | Plugin-scoped state storage. Isolated from other plugins. |
