diff --git a/src/structure/client/wrappers/GuildWrapper.js b/src/structure/client/wrappers/GuildWrapper.js index 404fda2..6adc998 100644 --- a/src/structure/client/wrappers/GuildWrapper.js +++ b/src/structure/client/wrappers/GuildWrapper.js @@ -153,10 +153,10 @@ class GuildWrapper { const data = await this.fetchData(); const { settings } = data; - // const settings = await this.client.storageManager.mongodb.guilds.findOne({ guildId: this.id }); - // if(this._settings instanceof Promise) this._settings = await this._settings || null; + if(!settings) this._settings = { guildId: this.id, ...this.defaultConfig }; - else this._settings = { ...this.defaultConfig, ...settings }; //eslint-disable-line prefer-object-spread + else this._settings = { ...this.defaultConfig, ...settings }; + return this._settings; } diff --git a/src/utilities/InfractionMigrator.js b/src/utilities/InfractionMigrator.js index cfe2257..dba3c20 100644 --- a/src/utilities/InfractionMigrator.js +++ b/src/utilities/InfractionMigrator.js @@ -93,6 +93,10 @@ class InfractionMigrator { } + 'qa'(infractions) { + return infractions; + } + '3'(infractions) { const result = []; for (const infraction of infractions) { diff --git a/src/utilities/SettingsMigrator.js b/src/utilities/SettingsMigrator.js index 1bbdaa9..0508939 100644 --- a/src/utilities/SettingsMigrator.js +++ b/src/utilities/SettingsMigrator.js @@ -165,10 +165,15 @@ class SettingsMigrator { get permissiongResolveables() { return { 'module:moderation': ['mod', 'moderation', 'moderator', 'category:moderation'], - 'module:administration': ['admin', 'Administrator', 'administration', 'category:administration'] + 'module:administration': ['admin', 'administrator', 'administration', 'category:administration'] }; } + 'qa'(result) { + return result; + } + + // Unused? '3'(result) { // console.log(result); // most of these should be mostly 1:1 apart from the names that changed