2022-05-01 05:52:02 +00:00
|
|
|
package dev.inmo.tgbotapi.types.message.content
|
2018-12-26 08:07:24 +00:00
|
|
|
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
|
|
|
import dev.inmo.tgbotapi.requests.send.media.SendVideoNote
|
|
|
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
2022-04-22 07:54:06 +00:00
|
|
|
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
|
|
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
|
|
|
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
|
|
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
2021-06-28 18:06:07 +00:00
|
|
|
import kotlinx.serialization.Serializable
|
2018-12-26 08:07:24 +00:00
|
|
|
|
2021-06-28 18:06:07 +00:00
|
|
|
@Serializable
|
2018-12-26 08:07:24 +00:00
|
|
|
data class VideoNoteContent(
|
|
|
|
override val media: VideoNoteFile
|
2019-04-04 14:10:52 +00:00
|
|
|
) : MediaContent {
|
2019-01-17 02:19:33 +00:00
|
|
|
override fun createResend(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
disableNotification: Boolean,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean,
|
2019-01-17 02:19:33 +00:00
|
|
|
replyToMessageId: MessageIdentifier?,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean?,
|
2019-01-17 02:19:33 +00:00
|
|
|
replyMarkup: KeyboardMarkup?
|
2020-01-15 05:17:53 +00:00
|
|
|
): Request<ContentMessage<VideoNoteContent>> = SendVideoNote(
|
2019-01-17 02:19:33 +00:00
|
|
|
chatId,
|
|
|
|
media.fileId,
|
|
|
|
media.thumb ?.fileId,
|
|
|
|
media.duration,
|
|
|
|
media.width,
|
|
|
|
disableNotification,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent,
|
2019-01-17 02:19:33 +00:00
|
|
|
replyToMessageId,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply,
|
2019-01-17 02:19:33 +00:00
|
|
|
replyMarkup
|
|
|
|
)
|
2020-01-20 08:42:38 +00:00
|
|
|
|
2022-04-22 07:54:06 +00:00
|
|
|
override fun asTelegramMedia(): TelegramMediaVideo = TelegramMediaVideo(
|
2020-01-20 08:42:38 +00:00
|
|
|
media.fileId,
|
|
|
|
width = media.width,
|
|
|
|
height = media.height,
|
|
|
|
duration = media.duration,
|
|
|
|
thumb = media.thumb ?.fileId
|
|
|
|
)
|
2019-01-17 02:19:33 +00:00
|
|
|
}
|