From 70f96ac8fa0b90dc41764e525aa654a991a31f8c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 26 Apr 2021 21:34:13 +0600 Subject: [PATCH] completing of captioned input deprecation --- .../dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt | 2 +- .../kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt | 2 +- .../dev/inmo/tgbotapi/requests/send/media/SendDocument.kt | 2 +- .../kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt | 2 +- .../kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt | 2 +- .../kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt | 2 +- .../dev/inmo/tgbotapi/types/InputMedia/InputMediaAudio.kt | 2 +- .../dev/inmo/tgbotapi/types/InputMedia/InputMediaPhoto.kt | 2 +- .../kotlin/dev/inmo/tgbotapi/types/files/VideoFile.kt | 2 +- .../types/message/content/abstracts/MediaGroupContent.kt | 1 + 10 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt index 4e8ea44666..6a26483056 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt @@ -39,7 +39,7 @@ fun SendAnimation( chatId, animationAsFileId, thumbAsFileId, - caption, + text, parseMode, null, duration, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt index 8cd2d2cf15..c95d7e7f7c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt @@ -39,7 +39,7 @@ fun SendAudio( chatId, audioAsFileId, thumbAsFileId, - caption, + text, parseMode, null, duration, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt index d562c93175..8c7d0a9cc2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt @@ -46,7 +46,7 @@ fun SendDocument( chatId, documentAsFileId, thumbAsFileId, - caption, + text, parseMode, null, disableNotification, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt index 81c2de4b79..66d388ee91 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt @@ -28,7 +28,7 @@ fun SendPhoto( val data = SendPhotoData( chatId, (photo as? FileId) ?.fileId, - caption, + text, parseMode, null, disableNotification, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt index ec7849eba6..e50686c5dc 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt @@ -40,7 +40,7 @@ fun SendVideo( chatId, videoAsFileId, thumbAsFileId, - caption, + text, parseMode, null, duration, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt index b382478398..79b17c98e4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt @@ -33,7 +33,7 @@ fun SendVoice( val data = SendVoiceData( chatId, voiceAsFileId, - caption, + text, parseMode, null, duration, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAudio.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAudio.kt index f6674becbb..598e0ddc4a 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAudio.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAudio.kt @@ -67,7 +67,7 @@ fun AudioFile.toInputMediaAudio( title: String? = this.title ): InputMediaAudio = InputMediaAudio( fileId, - caption, + text, parseMode, duration, performer, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaPhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaPhoto.kt index 1442965791..b3d56b4574 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaPhoto.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaPhoto.kt @@ -50,7 +50,7 @@ fun PhotoSize.toInputMediaPhoto( parseMode: ParseMode? = null ): InputMediaPhoto = InputMediaPhoto( fileId, - caption, + text, parseMode ) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/files/VideoFile.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/files/VideoFile.kt index aaff39b344..c3f761259b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/files/VideoFile.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/files/VideoFile.kt @@ -38,7 +38,7 @@ inline fun VideoFile.toInputMediaVideo( parseMode: ParseMode? = null ) = InputMediaVideo( fileId, - caption, + text, parseMode, width, height, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/abstracts/MediaGroupContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/abstracts/MediaGroupContent.kt index 7d80e16de4..354fb20903 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/abstracts/MediaGroupContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/abstracts/MediaGroupContent.kt @@ -1,6 +1,7 @@ package dev.inmo.tgbotapi.types.message.content.abstracts import dev.inmo.tgbotapi.CommonAbstracts.CaptionedInput +import dev.inmo.tgbotapi.CommonAbstracts.TextedInput import dev.inmo.tgbotapi.types.InputMedia.* interface MediaGroupContent : MediaContent, CaptionedInput, TextedInput {