mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
extend InlineQueryResultGif fun with FileId and add ProtectContent + extend SendMessageRequest with it in advance
This commit is contained in:
parent
5c5a19c91a
commit
148791ad68
@ -0,0 +1,5 @@
|
|||||||
|
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||||
|
|
||||||
|
interface ProtectContent {
|
||||||
|
val contentProtected: Boolean
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package dev.inmo.tgbotapi.requests.send.abstracts
|
package dev.inmo.tgbotapi.requests.send.abstracts
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.types.DisableNotification
|
import dev.inmo.tgbotapi.CommonAbstracts.types.*
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.types.ReplyMessageId
|
|
||||||
|
|
||||||
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification
|
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification, ProtectContent
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.inlineQueryResultGifType
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.inlineQueryResultGifType
|
||||||
@ -57,6 +58,37 @@ fun InlineQueryResultGifImpl(
|
|||||||
inputMessageContent
|
inputMessageContent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun InlineQueryResultGifImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
gifFile: FileId,
|
||||||
|
thumbUrl: String,
|
||||||
|
thumbMimeType: MimeType? = null,
|
||||||
|
width: Int? = null,
|
||||||
|
height: Int? = null,
|
||||||
|
duration: Int? = null,
|
||||||
|
title: String? = null,
|
||||||
|
text: String? = null,
|
||||||
|
parseMode: ParseMode? = null,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultGifImpl(id, gifFile.fileId, thumbUrl, thumbMimeType, width, height, duration, title, text, parseMode, replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
|
fun InlineQueryResultGifImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
gifFile: FileId,
|
||||||
|
thumbUrl: String,
|
||||||
|
thumbMimeType: MimeType? = null,
|
||||||
|
width: Int? = null,
|
||||||
|
height: Int? = null,
|
||||||
|
duration: Int? = null,
|
||||||
|
title: String? = null,
|
||||||
|
entities: TextSourcesList,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultGifImpl(
|
||||||
|
id, gifFile.fileId, thumbUrl, thumbMimeType, width, height, duration, title, entities, replyMarkup, inputMessageContent
|
||||||
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultGifImpl internal constructor(
|
data class InlineQueryResultGifImpl internal constructor(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
|
Loading…
Reference in New Issue
Block a user