From 9473a1d7984d87505a95dae700c07ad70f7ab6f5 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Tue, 31 May 2022 13:35:28 +0000 Subject: [PATCH] BREAKING(helpers): getWebhook can return undefined --- helpers/webhooks/getWebhook.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers/webhooks/getWebhook.ts b/helpers/webhooks/getWebhook.ts index bcb15e03d..690bf0355 100644 --- a/helpers/webhooks/getWebhook.ts +++ b/helpers/webhooks/getWebhook.ts @@ -9,5 +9,7 @@ export async function getWebhook(bot: Bot, webhookId: bigint) { bot.constants.routes.WEBHOOK_ID(webhookId), ); + if (!result?.id) return; + return bot.transformers.webhook(bot, result); }