mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
Merge pull request #27 from InsanusMokrassar/0.12.5
0.12.5 MediaContent improvements
This commit is contained in:
commit
6ea7b357d8
@ -62,6 +62,11 @@ of `]` in links titles
|
||||
* Created a few of methods for all supported formats of text like bold, italic, links and others
|
||||
* Rewritten `MessageEntities` to use new formatting options
|
||||
|
||||
### 0.12.5 `MediaContent` improvements
|
||||
|
||||
* Now `MediaGroupContent` is `MediaContent`
|
||||
* All `MedaContent` now have no generics and have basic `TelegramMediaFile` media field
|
||||
|
||||
## 0.11.0
|
||||
|
||||
* Kotlin `1.3.11` -> `1.3.21`
|
||||
|
@ -1,4 +1,4 @@
|
||||
project.version = "0.12.4"
|
||||
project.version = "0.12.5"
|
||||
project.group = "com.github.insanusmokrassar"
|
||||
|
||||
buildscript {
|
||||
|
@ -2,6 +2,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstrac
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
|
||||
|
||||
interface MediaCollectionContent<T: TelegramMediaFile>: MessageContent, MediaContent<T> {
|
||||
interface MediaCollectionContent<T: TelegramMediaFile>: MessageContent, MediaContent {
|
||||
val mediaCollection: List<T>
|
||||
}
|
||||
|
@ -2,6 +2,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstrac
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
|
||||
|
||||
interface MediaContent<T: TelegramMediaFile>: MessageContent {
|
||||
val media: T
|
||||
interface MediaContent: MessageContent {
|
||||
val media: TelegramMediaFile
|
||||
}
|
||||
|
@ -2,6 +2,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstrac
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMedia
|
||||
|
||||
interface MediaGroupContent : MessageContent {
|
||||
interface MediaGroupContent : MediaContent {
|
||||
fun toMediaGroupMemberInputMedia(): MediaGroupMemberInputMedia
|
||||
}
|
@ -14,7 +14,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstract
|
||||
data class AnimationContent(
|
||||
override val media: AnimationFile,
|
||||
val includedDocument: DocumentFile?
|
||||
) : MediaContent<AnimationFile> {
|
||||
) : MediaContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -17,7 +17,7 @@ data class AudioContent(
|
||||
override val media: AudioFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<MessageEntity> = emptyList()
|
||||
) : MediaContent<AudioFile>, CaptionedMediaContent {
|
||||
) : MediaContent, CaptionedMediaContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -17,7 +17,7 @@ data class DocumentContent(
|
||||
override val media: DocumentFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<MessageEntity> = emptyList()
|
||||
) : MediaContent<DocumentFile>, CaptionedMediaContent {
|
||||
) : MediaContent, CaptionedMediaContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -11,7 +11,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstract
|
||||
|
||||
data class StickerContent(
|
||||
override val media: Sticker
|
||||
) : MediaContent<Sticker> {
|
||||
) : MediaContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -11,14 +11,15 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.HTMLParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.VideoFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContent
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaGroupContent
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.toHtmlCaptions
|
||||
|
||||
data class VideoContent(
|
||||
override val media: VideoFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<MessageEntity> = emptyList()
|
||||
) : MediaContent<VideoFile>, CaptionedMediaContent, MediaGroupContent {
|
||||
) : CaptionedMediaContent, MediaGroupContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -12,7 +12,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstract
|
||||
|
||||
data class VideoNoteContent(
|
||||
override val media: VideoNoteFile
|
||||
) : MediaContent<VideoNoteFile> {
|
||||
) : MediaContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -17,7 +17,7 @@ data class VoiceContent(
|
||||
override val media: VoiceFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<MessageEntity> = emptyList()
|
||||
) : MediaContent<VoiceFile>, CaptionedMediaContent {
|
||||
) : MediaContent, CaptionedMediaContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
Loading…
Reference in New Issue
Block a user