1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-02 22:59:48 +00:00

replacement of CaptionAndTextSourcesToText

This commit is contained in:
2020-06-02 13:05:15 +06:00
parent 0a162c4129
commit b484a31a4a
3 changed files with 145 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.*
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.TextContent
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.fullEntitiesList
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun createFormattedText(
entities: FullTextSourcesList,
partLength: Int = textLength.last,
@@ -47,75 +48,96 @@ fun createFormattedText(
}
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun createMarkdownText(
entities: FullTextSourcesList,
partLength: Int = textLength.last
): List<String> = createFormattedText(entities, partLength, MarkdownParseMode)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toMarkdownCaptions(): List<String> = createMarkdownText(
this,
captionLength.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun CaptionedInput.toMarkdownCaptions(): List<String> = fullEntitiesList().toMarkdownCaptions()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toMarkdownTexts(): List<String> = createMarkdownText(
this,
textLength.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun TextContent.toMarkdownTexts(): List<String> = fullEntitiesList().toMarkdownTexts()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toMarkdownExplanations(): List<String> = createMarkdownText(
this,
explanationLimit.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun ExplainedInput.toMarkdownExplanations(): List<String> = fullEntitiesList().toMarkdownTexts()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun createMarkdownV2Text(
entities: FullTextSourcesList,
partLength: Int = textLength.last
): List<String> = createFormattedText(entities, partLength, MarkdownV2ParseMode)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toMarkdownV2Captions(): List<String> = createMarkdownV2Text(
this,
captionLength.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun CaptionedInput.toMarkdownV2Captions(): List<String> = fullEntitiesList().toMarkdownV2Captions()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toMarkdownV2Texts(): List<String> = createMarkdownV2Text(
this,
textLength.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun TextContent.toMarkdownV2Texts(): List<String> = fullEntitiesList().toMarkdownV2Texts()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toMarkdownV2Explanations(): List<String> = createMarkdownV2Text(
this,
explanationLimit.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun ExplainedInput.toMarkdownV2Explanations(): List<String> = fullEntitiesList().toMarkdownV2Texts()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun createHtmlText(
entities: FullTextSourcesList,
partLength: Int = textLength.last
): List<String> = createFormattedText(entities, partLength, HTMLParseMode)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toHtmlCaptions(): List<String> = createHtmlText(
this,
captionLength.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun CaptionedInput.toHtmlCaptions(): List<String> = fullEntitiesList().toHtmlCaptions()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toHtmlTexts(): List<String> = createHtmlText(
this,
textLength.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun TextContent.toHtmlTexts(): List<String> = fullEntitiesList().toHtmlTexts()
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun FullTextSourcesList.toHtmlExplanations(): List<String> = createHtmlText(
this,
explanationLimit.last
)
@Deprecated("Replaced into TelegramBotAPI-extensions-utils")
fun ExplainedInput.toHtmlExplanations(): List<String> = fullEntitiesList().toHtmlTexts()