bugfix
This commit is contained in:
parent
82efec05e6
commit
487e533089
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user