mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
medagroupcontent is media content
This commit is contained in:
parent
4ff13e0fc9
commit
ac39032f50
@ -64,6 +64,8 @@ of `]` in links titles
|
||||
|
||||
### 0.12.5
|
||||
|
||||
* Now `MediaGroupContent` is `MediaContent`
|
||||
|
||||
## 0.11.0
|
||||
|
||||
* Kotlin `1.3.11` -> `1.3.21`
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMedia
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
|
||||
|
||||
interface MediaGroupContent : MessageContent {
|
||||
interface MediaGroupContent<T : TelegramMediaFile> : MediaContent<T>, MessageContent {
|
||||
fun toMediaGroupMemberInputMedia(): MediaGroupMemberInputMedia
|
||||
}
|
@ -19,7 +19,7 @@ data class PhotoContent(
|
||||
override val mediaCollection: List<PhotoSize>,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<MessageEntity> = emptyList()
|
||||
) : MediaCollectionContent<PhotoSize>, CaptionedMediaContent, MediaGroupContent {
|
||||
) : MediaCollectionContent<PhotoSize>, CaptionedMediaContent, MediaGroupContent<PhotoSize> {
|
||||
override val media: PhotoSize = mediaCollection.biggest() ?: throw IllegalStateException("Can't locate any photo size for this content")
|
||||
|
||||
override fun createResend(
|
||||
|
@ -18,7 +18,7 @@ data class VideoContent(
|
||||
override val media: VideoFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<MessageEntity> = emptyList()
|
||||
) : MediaContent<VideoFile>, CaptionedMediaContent, MediaGroupContent {
|
||||
) : CaptionedMediaContent, MediaGroupContent<VideoFile> {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
Loading…
Reference in New Issue
Block a user