This commit is contained in:
Erik 2022-09-01 15:00:08 +03:00
parent 82efec05e6
commit 487e533089
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

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