From 487e5330893162b8ca341d8ebf2af8d2cc46bb53 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Thu, 1 Sep 2022 15:00:08 +0300 Subject: [PATCH] bugfix --- src/structure/client/wrappers/GuildWrapper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structure/client/wrappers/GuildWrapper.js b/src/structure/client/wrappers/GuildWrapper.js index d921c38..7343175 100644 --- a/src/structure/client/wrappers/GuildWrapper.js +++ b/src/structure/client/wrappers/GuildWrapper.js @@ -260,15 +260,15 @@ class GuildWrapper { }); const { webhook, permissions, settings } = importedSettings; + await this.updateSettings(settings); if (webhook) { - const hooks = await this.fetchWebhooks(); - const hook = hooks.get(webhook); + const hooks = await this.fetchWebhooks().catch(() => null); + const hook = hooks?.get(webhook); if (hook) await this.updateWebhook('messages', hook); } if (permissions) await this.client.storageManager.mongodb.permissions.updateOne({ guildId: this.id }, permissions); - await this.updateSettings(settings); return settings;