diff --git a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt index 392cc3be77..5fed0893a7 100644 --- a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt +++ b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaPhoto.kt @@ -27,7 +27,8 @@ data class InputMediaPhoto( } @Transient - override val arguments: Map = buildArguments(serializer()) + @Deprecated("Marked as deprecated for removal in future updates", level = DeprecationLevel.ERROR) + override val arguments: Map = error("Unsupported operation") } fun PhotoSize.toInputMediaPhoto( diff --git a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt index db2f87ec4a..aa1626ae2a 100644 --- a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt +++ b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/InputMediaVideo.kt @@ -31,5 +31,6 @@ data class InputMediaVideo( } @Transient - override val arguments: Map = buildArguments(serializer()) + @Deprecated("Marked as deprecated for removal in future updates", level = DeprecationLevel.ERROR) + override val arguments: Map = error("Unsupported operation") } diff --git a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt index 2a42073f32..ed211ca949 100644 --- a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt +++ b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/MediaGroupMemberInputMedia.kt @@ -1,16 +1,12 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput -import kotlinx.serialization.* -import kotlinx.serialization.properties.Properties - -internal fun T.buildArguments(withSerializer: SerializationStrategy) = Properties.encodeToMap( - withSerializer, - this -) +import kotlinx.serialization.Serializable +import kotlinx.serialization.StringFormat @Serializable(MediaGroupMemberInputMediaSerializer::class) interface MediaGroupMemberInputMedia : InputMedia, CaptionedOutput { fun serialize(format: StringFormat): String + @Deprecated("Marked as deprecated for removal in future updates", level = DeprecationLevel.ERROR) val arguments: Map }