Dashboard Config Editor
This page explains how to make your plugin config editable in Athena’s dashboard with a dashboard schema file.
1. Required files
For a config named hello, you need both files:
/plugins/<plugin_name>/data/configs/en-hello.json5/plugins/<plugin_name>/data/dashboard/en-hello.json
If the dashboard schema file is missing, your config is still loaded, but it is not editable in the dashboard config editor.
2. Enabling dashboard editing
To make your config editable in the dashboard, add the dashboardConfigurable: true flag to your config interface constructor:
const helloConfig = new this.heart.core.discord.core.config.interface(
this.heart,
{ name: 'hello', plugin: this.getName(), dashboardConfigurable: true },
{
config: {
// your config structure
}
},
);Without this flag, even if you provide a dashboard schema file, your config will not appear in the dashboard config editor. This flag is required to enable dashboard integration for your config.
3. Schema basics
Your dashboard schema file maps config keys to UI field definitions.
Common field settings
name: UI label shown in the editor.description: Help text shown under the field.extra: Optional markdown details shown in the info popover.autocomplete: Suggested values for supported field types.
4. Useful config types
The dashboard supports many built-in types. For custom plugin schemas, the most common are:
type 0: string inputtype 1: number inputtype 2: boolean toggle or choicetype 3: array of stringstype 4: array of numberstype 5: array of booleanstype 10: group of related settingstype 1000: array of objects (schema-driven)type 1001: dynamic object where each key maps to an array of schema-driven objectstype 1002: dynamic object where each key maps to a single object (schema-driven)
5. Schema-driven types
Type 1000: Array of objects
Use this when users should add multiple objects with one fixed structure.
Example data structure:
Type 1001: Dynamic object of arrays
Use this when users should create named groups and each group contains an array of objects.
Example data structure:
Type 1002: Dynamic object of single objects
Use this when users should create named groups and each group contains a single configured object.
Example data structure:
6. Keep config and schema in sync
Your data/configs/en-hello.json5 defaults and data/dashboard/en-hello.json schema should describe the same keys.
For example:
schema key
dashboard_panelsshould exist in the default config asconfig.dashboard_panelsschema key
alert_rulesshould exist in the default config asconfig.alert_rules
If key names diverge, the editor can show empty values or reject edits.
Last updated