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