mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 00:05:01 +00:00
refactor: move defaults to config schemas
This commit is contained in:
parent
09eb8e92f2
commit
83d35052c3
91 changed files with 450 additions and 888 deletions
|
@ -28,10 +28,13 @@ export async function validateGuildConfig(config: any): Promise<string | null> {
|
|||
}
|
||||
|
||||
const plugin = pluginNameToPlugin.get(pluginName)!;
|
||||
const configManager = new PluginConfigManager(plugin.defaultOptions || { config: {} }, pluginOptions, {
|
||||
const configManager = new PluginConfigManager({}, {
|
||||
configSchema: plugin.configSchema,
|
||||
defaultOverrides: plugin.defaultOverrides ?? [],
|
||||
levels: {},
|
||||
parser: plugin.configParser,
|
||||
customOverrideCriteriaFunctions: plugin.customOverrideCriteriaFunctions,
|
||||
});
|
||||
|
||||
try {
|
||||
await configManager.init();
|
||||
} catch (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue