mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-29 13:38:43 +00:00
fixes in new "asInputMedia" functions
This commit is contained in:
parent
353891eb37
commit
502a53fd62
@ -45,7 +45,7 @@ data class AnimationContent(
|
|||||||
|
|
||||||
override fun asInputMedia(): InputMediaAnimation = InputMediaAnimation(
|
override fun asInputMedia(): InputMediaAnimation = InputMediaAnimation(
|
||||||
media.fileId,
|
media.fileId,
|
||||||
toMarkdownV2Captions().first(),
|
toMarkdownV2Captions().firstOrNull(),
|
||||||
MarkdownV2,
|
MarkdownV2,
|
||||||
media.width,
|
media.width,
|
||||||
media.height,
|
media.height,
|
||||||
|
@ -44,7 +44,7 @@ data class AudioContent(
|
|||||||
|
|
||||||
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
|
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
|
||||||
media.fileId,
|
media.fileId,
|
||||||
toMarkdownV2Captions().first(),
|
toMarkdownV2Captions().firstOrNull(),
|
||||||
MarkdownV2,
|
MarkdownV2,
|
||||||
media.duration,
|
media.duration,
|
||||||
media.performer,
|
media.performer,
|
||||||
|
@ -41,7 +41,7 @@ data class DocumentContent(
|
|||||||
|
|
||||||
override fun asInputMedia(): InputMediaDocument = InputMediaDocument(
|
override fun asInputMedia(): InputMediaDocument = InputMediaDocument(
|
||||||
media.fileId,
|
media.fileId,
|
||||||
toMarkdownV2Captions().first(),
|
toMarkdownV2Captions().firstOrNull(),
|
||||||
MarkdownV2,
|
MarkdownV2,
|
||||||
media.thumb ?.fileId
|
media.thumb ?.fileId
|
||||||
)
|
)
|
||||||
|
@ -48,7 +48,7 @@ data class PhotoContent(
|
|||||||
|
|
||||||
override fun asInputMedia(): InputMediaPhoto = InputMediaPhoto(
|
override fun asInputMedia(): InputMediaPhoto = InputMediaPhoto(
|
||||||
media.fileId,
|
media.fileId,
|
||||||
toMarkdownV2Captions().first(),
|
toMarkdownV2Captions().firstOrNull(),
|
||||||
MarkdownV2
|
MarkdownV2
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ data class VideoContent(
|
|||||||
|
|
||||||
override fun asInputMedia(): InputMediaVideo = InputMediaVideo(
|
override fun asInputMedia(): InputMediaVideo = InputMediaVideo(
|
||||||
media.fileId,
|
media.fileId,
|
||||||
toMarkdownV2Captions().first(),
|
toMarkdownV2Captions().firstOrNull(),
|
||||||
MarkdownV2,
|
MarkdownV2,
|
||||||
media.width,
|
media.width,
|
||||||
media.height,
|
media.height,
|
||||||
|
@ -42,7 +42,7 @@ data class VoiceContent(
|
|||||||
|
|
||||||
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
|
override fun asInputMedia(): InputMediaAudio = InputMediaAudio(
|
||||||
media.fileId,
|
media.fileId,
|
||||||
toMarkdownV2Captions().first(),
|
toMarkdownV2Captions().firstOrNull(),
|
||||||
MarkdownV2,
|
MarkdownV2,
|
||||||
media.duration
|
media.duration
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user