From cbe48bdf464fd924205e0e32d6b5e6db37743f02 Mon Sep 17 00:00:00 2001 From: NoComment Date: Mon, 16 Dec 2024 14:23:08 +0000 Subject: [PATCH] Prevent the random 0 bulk delete embeds that sometimes crop up in delete logs --- .../lilybot/extensions/logging/events/MessageDelete.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/logging/events/MessageDelete.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/logging/events/MessageDelete.kt index db83ac68..a11dcf09 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/logging/events/MessageDelete.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/logging/events/MessageDelete.kt @@ -82,6 +82,8 @@ class MessageDelete : Extension() { } action { + if (event.messages.isEmpty()) return@action + val messageLog = getLoggingChannelWithPerms(ConfigOptions.MESSAGE_LOG, event.getGuildOrNull()!!) ?: return@action