This commit is contained in:
Erik 2022-05-10 00:02:05 +03:00
parent 69d91d3a1e
commit e1dd3f1513
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -75,8 +75,8 @@ class SettingsMigrator {
if (version === '3') { if (version === '3') {
webhook = await this.mongo.findOne('webhooks', { guild: this.guild, feature: 'messageLog' }); webhook = await this.mongo.findOne('webhooks', { guild: this.guild, feature: 'messageLog' });
permissions = await this.mongo.findOne('permissions', { guildId: this.guild }); permissions = await this.mongo.findOne('permissions', { guildId: this.guild });
delete webhook._id; if(webhook) delete webhook._id;
delete permissions._id; if(permissions) delete permissions._id;
} else if (version === '2') { } else if (version === '2') {
({ webhook = null } = settings.chatlogs || {}); ({ webhook = null } = settings.chatlogs || {});
const resolved = this.permissions(settings.roles); const resolved = this.permissions(settings.roles);