You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 11, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: en/dev/star/guides/plugin-config.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The file content is a `Schema` that represents the configuration. The Schema is
43
43
}
44
44
```
45
45
46
-
-`type`: **Required**. The type of the configuration. Supports `string`, `text`, `int`, `float`, `bool`, `object`, `list`, `dict`, `template_list`, `file`. When the type is `text`, it will be visualized as a larger resizable textarea component to accommodate large text.
46
+
-`type`: **Required**. The type of the configuration. Supports `string`, `text`, `int`, `float`, `bool`, `object`, `list`, `dict`, `template_list`, `file`, `palette`, `palette_rgb`, `palette_hsv`. When the type is `text`, it will be visualized as a larger resizable textarea component to accommodate large text.
47
47
-`description`: Optional. Description of the configuration. A one-sentence description of the configuration's behavior is recommended.
48
48
-`hint`: Optional. Hint information for the configuration, displayed in the question mark button on the right in the image above, shown when hovering over it.
49
49
-`obvious_hint`: Optional. Whether the configuration hint should be prominently displayed, like `token` in the image above.
@@ -81,6 +81,16 @@ Introduced in v4.13.0, this allows plugins to define file-upload configuration i
81
81
}
82
82
```
83
83
84
+
### Palette Type
85
+
86
+
Used for color selection. Supports three types:
87
+
88
+
-`palette`: HEX format (e.g., `#FFFFFF`).
89
+
-`palette_rgb`: RGB format (e.g., `rgb(255, 255, 255)`).
90
+
-`palette_hsv`: HSV format (e.g., `hsv(0, 0%, 100%)`).
91
+
92
+
In the WebUI, it will be presented as a color preview block and an input field. Clicking the preview block opens a color picker.
93
+
84
94
### `dict` type schema
85
95
86
96
Used to visualize editing a Python `dict` type configuration. For example, AstrBot Core's custom extra body parameter configuration:
@@ -209,4 +219,4 @@ class ConfigPlugin(Star):
209
219
210
220
## Configuration Updates
211
221
212
-
When you update the Schema across different versions, AstrBot will recursively inspect the configuration items in the Schema, automatically adding default values for missing items and removing those that no longer exist.
222
+
When you update the Schema across different versions, AstrBot will recursively inspect the configuration items in the Schema, automatically adding default values for missing items and removing those that no longer exist.
0 commit comments