From e58d20d0317a945c82202ebef10e0afcf12e4888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Oszcz=C4=99da?= Date: Thu, 20 Jun 2024 19:38:28 +0100 Subject: [PATCH] fix: Potential error. --- source/library/commands/handlers/purge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/library/commands/handlers/purge.ts b/source/library/commands/handlers/purge.ts index 512fc4b66..58f69e0ae 100644 --- a/source/library/commands/handlers/purge.ts +++ b/source/library/commands/handlers/purge.ts @@ -651,7 +651,7 @@ function getMessageContent( interaction: Logos.Interaction, message: Discord.Message, ): string | undefined { - if (message.content?.trim().length === 0 && message.embeds?.length > 0) { + if (message.content?.trim().length === 0 && (message.embeds?.length ?? 0) > 0) { return undefined; }