1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-29 04:47:48 +00:00
tgbotapi/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/media/VideoNoteContent.kt

43 lines
1.7 KiB
Kotlin
Raw Normal View History

2018-12-26 08:07:24 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media
2019-01-17 02:19:33 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVideoNote
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
2018-12-26 08:07:24 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.files.VideoNoteFile
2019-01-17 02:19:33 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
2018-12-26 08:07:24 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaContent
data class VideoNoteContent(
override val media: VideoNoteFile
2019-01-17 02:19:33 +00:00
) : MediaContent<VideoNoteFile> {
override fun createResend(
chatId: ChatIdentifier,
disableNotification: Boolean,
replyToMessageId: MessageIdentifier?,
replyMarkup: KeyboardMarkup?
): Request<RawMessage> = createResend(chatId, null, null, disableNotification, replyToMessageId, replyMarkup)
fun createResend(
chatId: ChatIdentifier,
caption: String?,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): Request<RawMessage> = SendVideoNote(
chatId,
media.fileId,
media.thumb ?.fileId,
caption,
parseMode,
media.duration,
media.width,
disableNotification,
replyToMessageId,
replyMarkup
)
}