Emit config:loaded event
parent
49f52e42d0
commit
ea6e4ce079
|
@ -97,8 +97,7 @@ async function loadConfigsFromSystem(
|
|||
fullConfig = deepObjectMerge(fullConfig, { [config.key]: config.value });
|
||||
}
|
||||
// And clean up the JSON (expand .-separated paths, convert dates to strings)
|
||||
fullConfig = cleanupJSON(fullConfig);
|
||||
return fullConfig;
|
||||
return cleanupJSON(fullConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -149,6 +149,7 @@ export class SpaceServer implements ConfigContainer {
|
|||
|
||||
if (this.serverSystem) {
|
||||
updateObjectDecorators(this.config, this.serverSystem.ds);
|
||||
this.serverSystem.eventHook.dispatchEvent("config:loaded", this.config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,6 +271,7 @@ export class Client implements ConfigContainer {
|
|||
this.clientSystem.slashCommandHook.buildAllCommands(
|
||||
this.clientSystem.system,
|
||||
);
|
||||
this.eventHook.dispatchEvent("config:loaded", this.config);
|
||||
}
|
||||
|
||||
private async initSync() {
|
||||
|
|
Loading…
Reference in New Issue