mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
make different interfaces for audio and documents media content
This commit is contained in:
parent
1ee73dd406
commit
d96d47e32c
@ -8,3 +8,5 @@ interface MediaGroupContent : MediaContent, CaptionedInput {
|
||||
}
|
||||
|
||||
interface VisualMediaGroupContent : MediaGroupContent
|
||||
interface AudioMediaGroupContent : MediaGroupContent
|
||||
interface DocumentMediaGroupContent : MediaGroupContent
|
||||
|
@ -19,7 +19,7 @@ data class AudioContent(
|
||||
override val media: AudioFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<TextPart> = emptyList()
|
||||
) : MediaGroupContent {
|
||||
) : AudioMediaGroupContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
@ -13,8 +13,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||
import dev.inmo.tgbotapi.types.files.asDocumentFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaGroupContent
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.*
|
||||
import dev.inmo.tgbotapi.utils.toHtmlCaptions
|
||||
import dev.inmo.tgbotapi.utils.toMarkdownV2Captions
|
||||
|
||||
@ -22,7 +21,7 @@ data class DocumentContent(
|
||||
override val media: DocumentFile,
|
||||
override val caption: String? = null,
|
||||
override val captionEntities: List<TextPart> = emptyList()
|
||||
) : MediaGroupContent {
|
||||
) : DocumentMediaGroupContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
disableNotification: Boolean,
|
||||
|
Loading…
Reference in New Issue
Block a user