1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

deprecations

This commit is contained in:
InsanusMokrassar 2020-11-02 13:57:44 +06:00
parent 957649603b
commit d7bca15693
3 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,8 @@
* New extension `TelegramMediaFile#asDocumentFile` * New extension `TelegramMediaFile#asDocumentFile`
* New extension `VideoFile#toInputMediaVideo` * New extension `VideoFile#toInputMediaVideo`
* New exception `WrongFileIdentifierException` * New exception `WrongFileIdentifierException`
* Extension `String#toInputMediaFileAttachmentName` now is deprecated
* Property `ThumbedInputMedia#thumbMedia` now is deprecated
* `API`: * `API`:
* New extensions for media groups: * New extensions for media groups:
* `TelegramBot#sendPlaylist` * `TelegramBot#sendPlaylist`

View File

@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.InputMedia
import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.abstracts.InputFile
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Deprecated("Will be removed due to redundancy for end-side users")
fun String.toInputMediaFileAttachmentName() = "attach://$this" fun String.toInputMediaFileAttachmentName() = "attach://$this"
@Serializable(InputMediaSerializer::class) @Serializable(InputMediaSerializer::class)

View File

@ -9,6 +9,7 @@ interface ThumbedInputMedia : InputMedia {
val thumb: InputFile? val thumb: InputFile?
@Serializable @Serializable
@SerialName(thumbField) @SerialName(thumbField)
@Deprecated("Will be removed due to useless state")
val thumbMedia: String? val thumbMedia: String?
get() = thumb ?.let { get() = thumb ?.let {
when (it) { when (it) {