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;