mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-04-21 09:22:28 +00:00
add ManagedBotCreated and ManagedBotUpdated
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types.managed_bots
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewBot
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ManagedBotCreated(
|
||||
val bot: PreviewBot
|
||||
) : CommonEvent
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.types.managed_bots
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewBot
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewUser
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ManagedBotUpdated(
|
||||
val user: PreviewUser,
|
||||
val bot: PreviewBot
|
||||
) : CommonEvent
|
||||
@@ -18,6 +18,7 @@ import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
|
||||
import dev.inmo.tgbotapi.types.giveaway.*
|
||||
import dev.inmo.tgbotapi.types.message.content.GiveawayContent
|
||||
import dev.inmo.tgbotapi.types.location.Location
|
||||
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
|
||||
@@ -205,6 +206,7 @@ internal data class RawMessage(
|
||||
private val gift_upgrade_sent: GiftSentOrReceivedEvent.RegularGift? = null,
|
||||
private val chat_owner_left: ChatOwnerLeft? = null,
|
||||
private val chat_owner_changed: ChatOwnerChanged? = null,
|
||||
private val managed_bot_updated: ManagedBotUpdated? = null
|
||||
) {
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
private val checkedFrom = from ?.takeIf { !it.isFakeTelegramUser() }
|
||||
@@ -343,6 +345,7 @@ internal data class RawMessage(
|
||||
suggested_post_declined != null -> suggested_post_declined
|
||||
suggested_post_paid != null -> suggested_post_paid
|
||||
suggested_post_refunded != null -> suggested_post_refunded
|
||||
managed_bot_updated != null -> managed_bot_updated
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user