Add plugin settings + dashboard integration
ADB core now supports plugin-exposed settings in the admin dashboard: a per-plugin settings page (auto-rendered from a schema), per-command enable/role permissions, and optional plugin-hosted web UIs. See CREATE-PLUGIN.md → Plugin Settings and Plugin Dependencies in the main repo.
This plugin should adopt it so server admins can configure it from the dashboard instead of only slash commands.
⚠️ This plugin is still on manifest v1
Before adding settings, migrate the manifest to v2. Add these fields:
Replace the old top-level "permissions": ["db.read", ...] array with the object form above. Keep configSchema for backward compatibility.
1. Add the engines block
Declares the core + administration-plugin versions this plugin needs. The settings/webUi features require administration >=2.0.0; if it's older, the plugin refuses to load with a clear error instead of a dead settings page.
"engines": {
"core": ">=2.0.0",
"plugins": {
"administration": ">=2.0.0"
}
}
2. Add the settings block
Auto-renders a settings form in the dashboard sidebar. commandPermissions: true also adds a per-command enable/role table.
"settings": {
"commandPermissions": true,
"schema": [
{
"key": "creationChannelId",
"type": "channel",
"label": "Join-to-create channel"
},
{
"key": "categoryId",
"type": "string",
"label": "Temp VC category ID"
},
{
"key": "nameTemplate",
"type": "string",
"label": "Channel name template"
},
{
"key": "autoDeleteDelay",
"type": "number",
"label": "Auto-delete delay (seconds)"
},
{
"key": "maxChannels",
"type": "number",
"label": "Max temp channels"
},
{
"key": "bitrateDefault",
"type": "number",
"label": "Default bitrate"
},
{
"key": "userLimitDefault",
"type": "number",
"label": "Default user limit"
}
]
}
Field types: string, number, boolean, channel, role, select (needs options). Adjust the suggested schema above to match your actual config keys.
3. Read the saved config in your plugin
const cfg = await ctx.db.getPluginConfig(guildId, "adb-plugin-tempvoice");
const value = cfg?.someKey;
The dashboard writes to the same PluginConfig.data document. The _commands sub-key is reserved for per-command permissions — don't write to it directly.
4. Bump versions in both files
⚠️ npm publish reads the version from package.json, not plugin.json. Bump both or the publish 403s / metadata desyncs.
5. Commit, push, npm publish
Filed by the maintainer while rolling out the settings system across core plugins. moderation, levels, welcome, autorole, reaction-roles, and automod are already done — use them as reference.
Add plugin settings + dashboard integration
ADB core now supports plugin-exposed settings in the admin dashboard: a per-plugin settings page (auto-rendered from a schema), per-command enable/role permissions, and optional plugin-hosted web UIs. See
CREATE-PLUGIN.md→ Plugin Settings and Plugin Dependencies in the main repo.This plugin should adopt it so server admins can configure it from the dashboard instead of only slash commands.
Before adding settings, migrate the manifest to v2. Add these fields:
Replace the old top-level
"permissions": ["db.read", ...]array with the object form above. KeepconfigSchemafor backward compatibility.1. Add the
enginesblockDeclares the core + administration-plugin versions this plugin needs. The settings/webUi features require administration
>=2.0.0; if it's older, the plugin refuses to load with a clear error instead of a dead settings page.2. Add the
settingsblockAuto-renders a settings form in the dashboard sidebar.
commandPermissions: truealso adds a per-command enable/role table.Field types:
string,number,boolean,channel,role,select(needsoptions). Adjust the suggested schema above to match your actual config keys.3. Read the saved config in your plugin
The dashboard writes to the same
PluginConfig.datadocument. The_commandssub-key is reserved for per-command permissions — don't write to it directly.4. Bump versions in both files
npm publishreads the version frompackage.json, notplugin.json. Bump both or the publish 403s / metadata desyncs.5. Commit, push,
npm publishFiled by the maintainer while rolling out the settings system across core plugins. moderation, levels, welcome, autorole, reaction-roles, and automod are already done — use them as reference.