From 4ce4ba5713ee44b297c900499a3880f6b9fea432 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 10 Oct 2022 11:00:59 +0300 Subject: [PATCH] fix --- src/structure/components/settings/logging/Messages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {