diff --git a/src/structure/client/wrappers/GuildWrapper.js b/src/structure/client/wrappers/GuildWrapper.js index f639570..9fa316f 100644 --- a/src/structure/client/wrappers/GuildWrapper.js +++ b/src/structure/client/wrappers/GuildWrapper.js @@ -153,10 +153,19 @@ class GuildWrapper { const data = await this.fetchData(); const { settings } = data; + const { defaultConfig } = this; - if(!settings) this._settings = { guildId: this.id, ...this.defaultConfig }; - else this._settings = { ...this.defaultConfig, ...settings }; - + if (settings) { + // Ensure new settings properties are propagated to existing configs + const keys = Object.keys(settings); + for (const key of keys) { + if (!(key in defaultConfig)) continue; + defaultConfig[key] = { ...defaultConfig[key], ...settings[key] }; + } + + } + + this._settings = defaultConfig; return this._settings; }