misc fixes

This commit is contained in:
Erik 2022-07-24 00:20:03 +03:00
parent 31ef70abed
commit 783abcee62
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
3 changed files with 13 additions and 4 deletions

View File

@ -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;
}

View File

@ -93,6 +93,10 @@ class InfractionMigrator {
}
'qa'(infractions) {
return infractions;
}
'3'(infractions) {
const result = [];
for (const infraction of infractions) {

View File

@ -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