2020-10-04 11:06:30 +00:00
|
|
|
package dev.inmo.tgbotapi.types.InputMedia
|
2018-12-26 08:07:24 +00:00
|
|
|
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.requests.abstracts.*
|
|
|
|
import dev.inmo.tgbotapi.types.thumbField
|
2018-12-26 08:07:24 +00:00
|
|
|
import kotlinx.serialization.SerialName
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
|
|
|
|
interface ThumbedInputMedia : InputMedia {
|
|
|
|
val thumb: InputFile?
|
|
|
|
@Serializable
|
|
|
|
@SerialName(thumbField)
|
2020-11-02 07:57:44 +00:00
|
|
|
@Deprecated("Will be removed due to useless state")
|
2018-12-26 08:07:24 +00:00
|
|
|
val thumbMedia: String?
|
|
|
|
get() = thumb ?.let {
|
|
|
|
when (it) {
|
|
|
|
is FileId -> it.fileId
|
2019-12-03 06:40:21 +00:00
|
|
|
is MultipartFile -> it.fileId.toInputMediaFileAttachmentName()
|
2018-12-26 08:07:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|