mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-29 13:38:43 +00:00
partially restructurize InlineQueryResult and several its implementators
This commit is contained in:
parent
c0e81b1d6d
commit
a5982ac881
@ -1,18 +1,43 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.*
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
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.video.InlineQueryResultVideoCached
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCached
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.inlineQueryResultVideoType
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.inlineQueryResultVideoType
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.*
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.RawMessageEntity
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.toRawMessageEntities
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
fun InlineQueryResultVideoCachedImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
fileId: FileId,
|
||||||
|
title: String,
|
||||||
|
description: String? = null,
|
||||||
|
text: String? = null,
|
||||||
|
parseMode: ParseMode? = null,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVideoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
|
fun InlineQueryResultVideoCachedImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
fileId: FileId,
|
||||||
|
title: String,
|
||||||
|
description: String? = null,
|
||||||
|
entities: List<TextSource>,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVideoCachedImpl(id, fileId, title, description, entities.makeString(), null, entities.toRawMessageEntities(), replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVideoCachedImpl(
|
data class InlineQueryResultVideoCachedImpl internal constructor(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: InlineQueryIdentifier,
|
override val id: InlineQueryIdentifier,
|
||||||
@SerialName(videoFileIdField)
|
@SerialName(videoFileIdField)
|
||||||
@ -22,13 +47,18 @@ data class InlineQueryResultVideoCachedImpl(
|
|||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
override val caption: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
|
@SerialName(captionEntitiesField)
|
||||||
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVideoCached {
|
) : InlineQueryResultVideoCached {
|
||||||
override val type: String = inlineQueryResultVideoType
|
override val type: String = inlineQueryResultVideoType
|
||||||
|
override val entities: List<TextSource>? by lazy {
|
||||||
|
rawEntities ?.asTextParts(text ?: return@lazy null) ?.justTextSources()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.*
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.inlineQueryResultVideoType
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.inlineQueryResultVideoType
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.*
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.RawMessageEntity
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.toRawMessageEntities
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
@ -12,8 +16,39 @@ import dev.inmo.tgbotapi.utils.MimeType
|
|||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
fun InlineQueryResultVideoImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
url: String,
|
||||||
|
thumbUrl: String,
|
||||||
|
mimeType: MimeType,
|
||||||
|
title: String,
|
||||||
|
width: Int? = null,
|
||||||
|
height: Int? = null,
|
||||||
|
duration: Int? = null,
|
||||||
|
description: String? = null,
|
||||||
|
text: String? = null,
|
||||||
|
parseMode: ParseMode? = null,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVideoImpl(id, url, thumbUrl, mimeType, title, width, height, duration, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
|
fun InlineQueryResultVideoImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
url: String,
|
||||||
|
thumbUrl: String,
|
||||||
|
mimeType: MimeType,
|
||||||
|
title: String,
|
||||||
|
width: Int? = null,
|
||||||
|
height: Int? = null,
|
||||||
|
duration: Int? = null,
|
||||||
|
description: String? = null,
|
||||||
|
entities: List<TextSource>,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVideoImpl(id, url, thumbUrl, mimeType, title, width, height, duration, description, entities.makeString(), null, entities.toRawMessageEntities(), replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVideoImpl(
|
data class InlineQueryResultVideoImpl internal constructor(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: InlineQueryIdentifier,
|
override val id: InlineQueryIdentifier,
|
||||||
@SerialName(videoUrlField)
|
@SerialName(videoUrlField)
|
||||||
@ -33,13 +68,18 @@ data class InlineQueryResultVideoImpl(
|
|||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
override val caption: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
|
@SerialName(captionEntitiesField)
|
||||||
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVideo {
|
) : InlineQueryResultVideo {
|
||||||
override val type: String = inlineQueryResultVideoType
|
override val type: String = inlineQueryResultVideoType
|
||||||
|
override val entities: List<TextSource>? by lazy {
|
||||||
|
rawEntities ?.asTextParts(text ?: return@lazy null) ?.justTextSources()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,41 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.*
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
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.voice.InlineQueryResultVoiceCached
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.inlineQueryResultVoiceType
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.inlineQueryResultVoiceType
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.*
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.RawMessageEntity
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.asTextParts
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
fun InlineQueryResultVoiceCachedImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
fileId: FileId,
|
||||||
|
title: String,
|
||||||
|
text: String? = null,
|
||||||
|
parseMode: ParseMode? = null,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVoiceCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
|
fun InlineQueryResultVoiceCachedImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
fileId: FileId,
|
||||||
|
title: String,
|
||||||
|
entities: List<TextSource>,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVoiceCachedImpl(id, fileId, title, entities.makeString(), null, entities.toRawMessageEntities(), replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVoiceCachedImpl(
|
data class InlineQueryResultVoiceCachedImpl internal constructor(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: InlineQueryIdentifier,
|
override val id: InlineQueryIdentifier,
|
||||||
@SerialName(voiceFileIdField)
|
@SerialName(voiceFileIdField)
|
||||||
@ -20,13 +43,18 @@ data class InlineQueryResultVoiceCachedImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
override val caption: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
|
@SerialName(captionEntitiesField)
|
||||||
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVoiceCached {
|
) : InlineQueryResultVoiceCached {
|
||||||
override val type: String = inlineQueryResultVoiceType
|
override val type: String = inlineQueryResultVoiceType
|
||||||
|
override val entities: List<TextSource>? by lazy {
|
||||||
|
rawEntities ?.asTextParts(text ?: return@lazy null) ?.justTextSources()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,52 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.*
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.inlineQueryResultVoiceType
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.inlineQueryResultVoiceType
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.*
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.RawMessageEntity
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.toRawMessageEntities
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
fun InlineQueryResultVoiceImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
url: String,
|
||||||
|
title: String,
|
||||||
|
duration: Int? = null,
|
||||||
|
text: String? = null,
|
||||||
|
parseMode: ParseMode? = null,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVoiceImpl(
|
||||||
|
id,
|
||||||
|
url,
|
||||||
|
title,
|
||||||
|
duration,
|
||||||
|
text,
|
||||||
|
parseMode,
|
||||||
|
null,
|
||||||
|
replyMarkup,
|
||||||
|
inputMessageContent
|
||||||
|
)
|
||||||
|
|
||||||
|
fun InlineQueryResultVoiceImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
url: String,
|
||||||
|
title: String,
|
||||||
|
duration: Int? = null,
|
||||||
|
entities: List<TextSource>,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultVoiceImpl(id, url, title, duration, entities.makeString(), null, entities.toRawMessageEntities(), replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVoiceImpl(
|
data class InlineQueryResultVoiceImpl internal constructor(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: InlineQueryIdentifier,
|
override val id: InlineQueryIdentifier,
|
||||||
@SerialName(voiceUrlField)
|
@SerialName(voiceUrlField)
|
||||||
@ -21,13 +56,18 @@ data class InlineQueryResultVoiceImpl(
|
|||||||
@SerialName(voiceDurationField)
|
@SerialName(voiceDurationField)
|
||||||
override val duration: Int? = null,
|
override val duration: Int? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
override val caption: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
|
@SerialName(captionEntitiesField)
|
||||||
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVoice {
|
) : InlineQueryResultVoice {
|
||||||
override val type: String = inlineQueryResultVoiceType
|
override val type: String = inlineQueryResultVoiceType
|
||||||
|
override val entities: List<TextSource>? by lazy {
|
||||||
|
rawEntities ?.asTextParts(text ?: return@lazy null) ?.justTextSources()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult
|
||||||
|
|
||||||
@ -8,4 +9,9 @@ const val inlineQueryResultAudioType = "audio"
|
|||||||
|
|
||||||
interface InlineQueryResultAudioCommon : InlineQueryResult,
|
interface InlineQueryResultAudioCommon : InlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
WithInputMessageContentInlineQueryResult
|
TextedOutput,
|
||||||
|
WithInputMessageContentInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
|
|
||||||
const val inlineQueryResultDocumentType = "document"
|
const val inlineQueryResultDocumentType = "document"
|
||||||
@ -9,4 +10,9 @@ interface InlineQueryResultDocumentCommon : InlineQueryResult,
|
|||||||
TitledInlineQueryResult,
|
TitledInlineQueryResult,
|
||||||
DescribedInlineQueryResult,
|
DescribedInlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
WithInputMessageContentInlineQueryResult
|
TextedOutput,
|
||||||
|
WithInputMessageContentInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
|
|
||||||
const val inlineQueryResultGifType = "gif"
|
const val inlineQueryResultGifType = "gif"
|
||||||
@ -8,4 +9,9 @@ const val inlineQueryResultGifType = "gif"
|
|||||||
interface InlineQueryResultGifCommon : InlineQueryResult,
|
interface InlineQueryResultGifCommon : InlineQueryResult,
|
||||||
OptionallyTitledInlineQueryResult,
|
OptionallyTitledInlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
WithInputMessageContentInlineQueryResult
|
TextedOutput,
|
||||||
|
WithInputMessageContentInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
|
|
||||||
const val inlineQueryResultMpeg4GifType = "mpeg4_gif"
|
const val inlineQueryResultMpeg4GifType = "mpeg4_gif"
|
||||||
@ -8,4 +9,9 @@ const val inlineQueryResultMpeg4GifType = "mpeg4_gif"
|
|||||||
interface InlineQueryResultMpeg4GifCommon : InlineQueryResult,
|
interface InlineQueryResultMpeg4GifCommon : InlineQueryResult,
|
||||||
OptionallyTitledInlineQueryResult,
|
OptionallyTitledInlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
WithInputMessageContentInlineQueryResult
|
TextedOutput,
|
||||||
|
WithInputMessageContentInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
|
|
||||||
const val inlineQueryResultPhotoType = "photo"
|
const val inlineQueryResultPhotoType = "photo"
|
||||||
@ -9,4 +10,9 @@ interface InlineQueryResultPhotoCommon : InlineQueryResult,
|
|||||||
OptionallyTitledInlineQueryResult,
|
OptionallyTitledInlineQueryResult,
|
||||||
DescribedInlineQueryResult,
|
DescribedInlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
WithInputMessageContentInlineQueryResult
|
TextedOutput,
|
||||||
|
WithInputMessageContentInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
|
|
||||||
const val inlineQueryResultVideoType = "video"
|
const val inlineQueryResultVideoType = "video"
|
||||||
@ -9,4 +10,9 @@ interface InlineQueryResultVideoCommon : InlineQueryResult,
|
|||||||
TitledInlineQueryResult,
|
TitledInlineQueryResult,
|
||||||
DescribedInlineQueryResult,
|
DescribedInlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
WithInputMessageContentInlineQueryResult
|
TextedOutput,
|
||||||
|
WithInputMessageContentInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedOutput
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
|
|
||||||
const val inlineQueryResultVoiceType = "voice"
|
const val inlineQueryResultVoiceType = "voice"
|
||||||
|
|
||||||
interface InlineQueryResultVoiceCommon : InlineQueryResult,
|
interface InlineQueryResultVoiceCommon : InlineQueryResult,
|
||||||
CaptionedOutput,
|
CaptionedOutput,
|
||||||
|
TextedOutput,
|
||||||
WithInputMessageContentInlineQueryResult,
|
WithInputMessageContentInlineQueryResult,
|
||||||
TitledInlineQueryResult
|
TitledInlineQueryResult {
|
||||||
|
@Deprecated("Will be removed in next major release")
|
||||||
|
override val caption: String?
|
||||||
|
get() = text
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user