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.
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": "defaultDuration",
"type": "string",
"label": "Default duration (e.g. 1h)"
},
{
"key": "maxWinners",
"type": "number",
"label": "Max winners"
}
]
}
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-giveaways");
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.
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.