From e1dd3f1513a6d9b20684a73c33e152810aef38f5 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 10 May 2022 00:02:05 +0300 Subject: [PATCH] bugfix --- src/utilities/SettingsMigrator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utilities/SettingsMigrator.js b/src/utilities/SettingsMigrator.js index a81c597..8f0e524 100644 --- a/src/utilities/SettingsMigrator.js +++ b/src/utilities/SettingsMigrator.js @@ -75,8 +75,8 @@ class SettingsMigrator { if (version === '3') { webhook = await this.mongo.findOne('webhooks', { guild: this.guild, feature: 'messageLog' }); permissions = await this.mongo.findOne('permissions', { guildId: this.guild }); - delete webhook._id; - delete permissions._id; + if(webhook) delete webhook._id; + if(permissions) delete permissions._id; } else if (version === '2') { ({ webhook = null } = settings.chatlogs || {}); const resolved = this.permissions(settings.roles);