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.SendSticker
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
2020-01-20 08:42:38 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMediaDocument
|
2019-01-17 02:19:33 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
2018-12-26 08:07:24 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
|
2020-01-15 05:17:53 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
|
2019-08-17 05:50:46 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
2018-12-26 08:07:24 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaContent
|
2020-01-20 08:42:38 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownV2Captions
|
2018-12-26 08:07:24 +00:00
|
|
|
|
|
|
|
data class StickerContent(
|
|
|
|
override val media: Sticker
|
2019-04-04 14:10:52 +00:00
|
|
|
) : MediaContent {
|
2019-01-17 02:19:33 +00:00
|
|
|
override fun createResend(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
disableNotification: Boolean,
|
|
|
|
replyToMessageId: MessageIdentifier?,
|
|
|
|
replyMarkup: KeyboardMarkup?
|
2020-01-15 05:17:53 +00:00
|
|
|
): Request<ContentMessage<StickerContent>> = SendSticker(
|
2019-01-17 02:19:33 +00:00
|
|
|
chatId,
|
|
|
|
media.fileId,
|
|
|
|
disableNotification,
|
|
|
|
replyToMessageId,
|
|
|
|
replyMarkup
|
|
|
|
)
|
2020-01-20 08:42:38 +00:00
|
|
|
|
|
|
|
override fun asInputMedia(): InputMediaDocument = InputMediaDocument(
|
|
|
|
media.fileId,
|
|
|
|
null,
|
|
|
|
thumb = media.thumb ?.fileId
|
|
|
|
)
|
2019-01-17 02:19:33 +00:00
|
|
|
}
|