mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-16 13:49:26 +00:00
add support of ChatBoostAdded
This commit is contained in:
@@ -656,6 +656,7 @@ const val menuButtonField = "menu_button"
|
||||
|
||||
const val boostIdField = "boost_id"
|
||||
const val boostField = "boost"
|
||||
const val boostCountField = "boost_count"
|
||||
const val addDateField = "add_date"
|
||||
const val expirationDateField = "expiration_date"
|
||||
const val removeDateField = "remove_date"
|
||||
|
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.types.message.ChatEvents
|
||||
|
||||
import dev.inmo.tgbotapi.types.boostCountField
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ChatBoostAdded(
|
||||
@SerialName(boostCountField)
|
||||
val count: Int
|
||||
) : PublicChatEvent
|
@@ -117,6 +117,9 @@ internal data class RawMessage(
|
||||
private val general_forum_topic_unhidden: GeneralForumTopicUnhidden? = null,
|
||||
private val write_access_allowed: WriteAccessAllowed? = null,
|
||||
|
||||
// Boost added to groups
|
||||
private val boost_added: ChatBoostAdded? = null,
|
||||
|
||||
// AutoDelete Message time changed
|
||||
private val message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged? = null,
|
||||
|
||||
@@ -247,6 +250,7 @@ internal data class RawMessage(
|
||||
giveaway_created != null -> giveaway_created
|
||||
giveaway_winners is GiveawayPrivateResults -> giveaway_winners
|
||||
giveaway_completed != null -> giveaway_completed
|
||||
boost_added != null -> boost_added
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user