From b01e73125a86e494bda8564284f4b7a28e623180 Mon Sep 17 00:00:00 2001 From: metal Date: Mon, 30 Aug 2021 17:43:54 +0000 Subject: [PATCH] fix the thing --- backend/src/plugins/Logs/util/log.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Logs/util/log.ts b/backend/src/plugins/Logs/util/log.ts index c023f92e..09eebc15 100644 --- a/backend/src/plugins/Logs/util/log.ts +++ b/backend/src/plugins/Logs/util/log.ts @@ -114,7 +114,7 @@ export async function log( if (!msgEmbeds || msgEmbeds.length === 0) continue; // check if the latest chunk is an embed, if not, make it one - if (typeof lastEntry !== "string" && lastEntry!.embeds) { + if (typeof lastEntry !== "string" && lastEntry?.embeds) { (chunks[chunks.length - 1] as MessageOptions).embeds!.push(...msgEmbeds); } else { chunks.push({ embeds: msgEmbeds });