From 27fa081163c07c388549b5dfdbb191bee6a3fd58 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 9 Mar 2021 22:33:05 +0600 Subject: [PATCH] add isOff extension for MessageAutoDeleteTimerChanged --- .../types/message/ChatEvents/MessageAutoDeleteTimerChanged.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/MessageAutoDeleteTimerChanged.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/MessageAutoDeleteTimerChanged.kt index 189b5d56af..fdd7e264d1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/MessageAutoDeleteTimerChanged.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/MessageAutoDeleteTimerChanged.kt @@ -16,6 +16,9 @@ data class MessageAutoDeleteTimerChanged( val newAutoDeleteTime: Seconds // TODO:: check that it is seconds ) : ChannelEvent, GroupEvent, SupergroupEvent +val MessageAutoDeleteTimerChanged.isOff + get() = newAutoDeleteTime == 0 + val MessageAutoDeleteTimerChanged.is24Hours get() = newAutoDeleteTime == seconds24Hours