mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 07:09:23 +00:00
start normal filling of docs
This commit is contained in:
@@ -12,7 +12,15 @@ interface CaptionedOutput : Captioned {
|
||||
}
|
||||
|
||||
interface CaptionedInput : Captioned {
|
||||
/**
|
||||
* Not full list of entities. This list WILL NOT contain [TextPart]s with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
|
||||
* @see [CaptionedInput.fullEntitiesList]
|
||||
*/
|
||||
val captionEntities: List<TextPart>
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert its [CaptionedInput.captionEntities] to list of [com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextSource]
|
||||
* with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
|
||||
*/
|
||||
fun CaptionedInput.fullEntitiesList(): FullTextSourcesList = caption ?.fullListOfSubSource(captionEntities) ?.map { it.source } ?: emptyList()
|
||||
|
@@ -12,7 +12,15 @@ interface ExplainedOutput : Explained {
|
||||
}
|
||||
|
||||
interface ExplainedInput : Explained {
|
||||
/**
|
||||
* Not full list of entities. This list WILL NOT contain [TextPart]s with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
|
||||
* @see [ExplainedInput.fullEntitiesList]
|
||||
*/
|
||||
val explanationEntities: List<TextPart>
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert its [ExplainedInput.explanationEntities] to list of [com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextSource]
|
||||
* with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
|
||||
*/
|
||||
fun ExplainedInput.fullEntitiesList(): FullTextSourcesList = explanation ?.fullListOfSubSource(explanationEntities) ?.map { it.source } ?: emptyList()
|
||||
|
@@ -14,6 +14,10 @@ import com.github.insanusmokrassar.TelegramBotAPI.utils.*
|
||||
|
||||
data class TextContent(
|
||||
val text: String,
|
||||
/**
|
||||
* Not full list of entities. This list WILL NOT contain [TextPart]s with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
|
||||
* @see [TextContent.fullEntitiesList]
|
||||
*/
|
||||
val entities: List<TextPart> = emptyList()
|
||||
) : MessageContent {
|
||||
override fun createResend(
|
||||
@@ -67,4 +71,8 @@ data class TextContent(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert its [TextContent.entities] to list of [com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextSource]
|
||||
* with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
|
||||
*/
|
||||
fun TextContent.fullEntitiesList(): FullTextSourcesList = text.fullListOfSubSource(entities).map { it.source }
|
||||
|
Reference in New Issue
Block a user