diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 1aec90b33c..8c89fdf0d5 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -355,6 +355,7 @@ const val providerPaymentChargeIdField = "provider_payment_charge_id" const val providerTokenField = "provider_token" const val providerDataField = "provider_data" const val usersField = "users" +const val startDateField = "start_date" const val requireNameField = "need_name" const val requirePhoneNumberField = "need_phone_number" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/voice/VoiceChatScheduled.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/voice/VoiceChatScheduled.kt new file mode 100644 index 0000000000..548eea8e92 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/voice/VoiceChatScheduled.kt @@ -0,0 +1,12 @@ +package dev.inmo.tgbotapi.types.message.ChatEvents.voice + +import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VoiceChatEvent +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class VoiceChatScheduled( + @SerialName(startDateField) + val startDate: TelegramDate +) : VoiceChatEvent diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt index 2d3ebdc703..4209fa119d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt @@ -83,6 +83,7 @@ internal data class RawMessage( private val successful_payment: SuccessfulPayment? = null, // Voice Chat Service Messages + private val voice_chat_scheduled: VoiceChatScheduled? = null, private val voice_chat_started: VoiceChatStarted? = null, private val voice_chat_ended: VoiceChatEnded? = null, private val voice_chat_participants_invited: VoiceChatParticipantsInvited? = null, @@ -182,6 +183,7 @@ internal data class RawMessage( new_chat_title != null -> NewChatTitle(new_chat_title) new_chat_photo != null -> NewChatPhoto(new_chat_photo.toList()) voice_chat_started != null -> voice_chat_started + voice_chat_scheduled != null -> voice_chat_scheduled message_auto_delete_timer_changed != null -> message_auto_delete_timer_changed voice_chat_ended != null -> voice_chat_ended voice_chat_participants_invited != null -> voice_chat_participants_invited