diff --git a/src/structure/components/settings/logging/Messages.js b/src/structure/components/settings/logging/Messages.js index 98c3002..7213f9d 100644 --- a/src/structure/components/settings/logging/Messages.js +++ b/src/structure/components/settings/logging/Messages.js @@ -92,8 +92,8 @@ class MessageLog extends Setting { }; let hook = await guild.getWebhook(this.name); - // Ensure the webhook actually exists - hook = await this.client.fetchWebhook(hook.id).catch(() => null); + // Ensure the webhook actually exists, the above method my return a cached hook that may not exist on the api + if (hook) hook = await this.client.fetchWebhook(hook.id).catch(() => null); if (hook) await hook.edit({ channel }); else {