1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-07-03 14:50:49 +00:00
tgbotapi/docs/dev.inmo.tgbotapi.extensions.utils.formatting/index.md
2021-03-17 15:18:37 +00:00

69 KiB

//docs/dev.inmo.tgbotapi.extensions.utils.formatting

Package dev.inmo.tgbotapi.extensions.utils.formatting

Types

Name Summary
EntitiesBuilder [common]
Content
class EntitiesBuilder
More info
This builder can be used to provide building of TextSources List


Functions

Name Summary
bold [common]
Content
inline fun EntitiesBuilder.bold(vararg parts: TextSource)
inline fun EntitiesBuilder.bold(text: String)
inline fun EntitiesBuilder.bold(parts: List<TextSource>)
infix fun String.bold(parseMode: ParseMode): String


boldHTML [common]
Content
fun String.boldHTML(): String


boldMarkdown [common]
Content
fun String.boldMarkdown(): String


boldMarkdownV2 [common]
Content
fun String.boldMarkdownV2(): String


botCommand [common]
Content
inline fun EntitiesBuilder.botCommand(command: String)


buildEntities [common]
Content
fun buildEntities(init: EntitiesBuilder.() -> Unit): List<TextSource>


cashTag [common]
Content
infix fun String.cashtag(parseMode: ParseMode): String


cashTagHtml [common]
Content
fun String.cashTagHtml(): String


cashTagMarkdown [common]
Content
fun String.cashTagMarkdown(): String


cashTagMarkdownV2 [common]
Content
fun String.cashTagMarkdownV2(): String


code [common]
Content
inline fun EntitiesBuilder.code(code: String)
infix fun String.code(parseMode: ParseMode): String


codeHTML [common]
Content
fun String.codeHTML(): String


codeMarkdown [common]
Content
fun String.codeMarkdown(): String


codeMarkdownV2 [common]
Content
fun String.codeMarkdownV2(): String


command [common]
Content
infix fun String.command(parseMode: ParseMode): String
fun String.command(adapt: String.() -> String): String


commandHTML [common]
Content
fun String.commandHTML(): String


commandMarkdown [common]
Content
fun String.commandMarkdown(): String


commandMarkdownV2 [common]
Content
fun String.commandMarkdownV2(): String


createFormattedText [common]
Content
fun createFormattedText(entities: TextSourcesList, partLength: Int = textLength.last, mode: ParseMode = defaultParseMode): List<String>


createHtmlText [common]
Content
fun createHtmlText(entities: TextSourcesList, partLength: Int = textLength.last): List<String>


createMarkdownText [common]
Content
fun createMarkdownText(entities: TextSourcesList, partLength: Int = textLength.last): List<String>


createMarkdownV2Text [common]
Content
fun createMarkdownV2Text(entities: TextSourcesList, partLength: Int = textLength.last): List<String>


email [common]
Content
inline fun EntitiesBuilder.email(vararg parts: TextSource)
inline fun EntitiesBuilder.email(emailAddress: String)
inline fun EntitiesBuilder.email(parts: List<TextSource>)
infix fun String.email(parseMode: ParseMode): String


emailHTML [common]
Content
fun String.emailHTML(): String


emailMarkdown [common]
Content
fun String.emailMarkdown(): String


emailMarkdownV2 [common]
Content
fun String.emailMarkdownV2(): String


hashTag [common]
Content
inline fun EntitiesBuilder.hashtag(vararg parts: TextSource)
inline fun EntitiesBuilder.hashtag(hashtag: String)
inline fun EntitiesBuilder.hashtag(parts: List<TextSource>)


hashTagHTML [common]
Content
fun String.hashTagHTML(): String


hashTagMarkdown [common]
Content
fun String.hashTagMarkdown(): String


hashTagMarkdownV2 [common]
Content
fun String.hashTagMarkdownV2(): String


italic [common]
Content
inline fun EntitiesBuilder.italic(vararg parts: TextSource)
inline fun EntitiesBuilder.italic(text: String)
inline fun EntitiesBuilder.italic(parts: List<TextSource>)
infix fun String.italic(parseMode: ParseMode): String


italicHTML [common]
Content
fun String.italicHTML(): String


italicMarkdown [common]
Content
fun String.italicMarkdown(): String


italicMarkdownV2 [common]
Content
fun String.italicMarkdownV2(): String


link [common]
Content
inline fun EntitiesBuilder.link(url: String)
infix fun Pair<String, String>.link(parseMode: ParseMode): String
inline fun EntitiesBuilder.link(text: String, url: String)


linkHTML [common]
Content
fun String.linkHTML(link: String): String


linkMarkdown [common]
Content
fun String.linkMarkdown(link: String): String


linkMarkdownV2 [common]
Content
fun String.linkMarkdownV2(link: String): String


makeLink [common]
Content
inline fun makeLink(username: Username): String


makeLinkToMessage [common]
Content
fun makeLinkToMessage(username: Username, messageId: MessageIdentifier): String
fun makeLinkToMessage(chat: UsernameChat, messageId: MessageIdentifier): String?
fun makeLinkToMessage(username: String, messageId: MessageIdentifier): String


[common]
Content
fun makeLinkToMessage(chat: Chat, messageId: MessageIdentifier): String?
More info
Link which can be used as by any user to get access to Message.


makeUsernameLink [common]
Content
fun makeUsernameLink(username: String): String


mention [common]
Content
inline fun EntitiesBuilder.mention(vararg parts: TextSource)
inline fun EntitiesBuilder.mention(whoToMention: String)
inline fun EntitiesBuilder.mention(parts: List<TextSource>)
infix fun Pair<String, ChatId>.mention(parseMode: ParseMode): String
infix fun String.mention(parseMode: ParseMode): String
inline fun EntitiesBuilder.mention(user: User, vararg parts: TextSource)
inline fun EntitiesBuilder.mention(text: String, user: User)
inline fun EntitiesBuilder.mention(parts: List<TextSource>, user: User)


mentionHTML [common]
Content
fun String.mentionHTML(): String


mentionMarkdown [common]
Content
fun String.mentionMarkdown(): String


mentionMarkdownV2 [common]
Content
fun String.mentionMarkdownV2(): String


phone [common]
Content
inline fun EntitiesBuilder.phone(vararg parts: TextSource)
inline fun EntitiesBuilder.phone(number: String)
inline fun EntitiesBuilder.phone(parts: List<TextSource>)
infix fun String.phone(parseMode: ParseMode): String


phoneHTML [common]
Content
fun String.phoneHTML(): String


phoneMarkdown [common]
Content
fun String.phoneMarkdown(): String


phoneMarkdownV2 [common]
Content
fun String.phoneMarkdownV2(): String


pre [common]
Content
infix fun String.pre(parseMode: ParseMode): String
inline fun EntitiesBuilder.pre(code: String, language: String?)
fun String.pre(parseMode: ParseMode, language: String? = null): String


preHTML [common]
Content
fun String.preHTML(language: String? = null): String


preMarkdown [common]
Content
fun String.preMarkdown(language: String? = null): String


preMarkdownV2 [common]
Content
fun String.preMarkdownV2(language: String? = null): String


regular [common]
Content
inline fun EntitiesBuilder.regular(text: String)
infix fun String.regular(parseMode: ParseMode): String


regularHtml [common]
Content
fun String.regularHtml(): String


regularMarkdown [common]
Content
fun String.regularMarkdown(): String


regularMarkdownV2 [common]
Content
fun String.regularMarkdownV2(): String


strikethrough [common]
Content
inline fun EntitiesBuilder.strikethrough(vararg parts: TextSource)
inline fun EntitiesBuilder.strikethrough(text: String)
inline fun EntitiesBuilder.strikethrough(parts: List<TextSource>)
infix fun String.strikethrough(parseMode: ParseMode): String


strikethroughHTML [common]
Content
fun String.strikethroughHTML(): String


strikethroughMarkdown [common]
Content
fun String.strikethroughMarkdown(): String
More info
Crutch for support of strikethrough in default markdown.


strikethroughMarkdownV2 [common]
Content
fun String.strikethroughMarkdownV2(): String


textMentionHTML [common]
Content
fun String.textMentionHTML(userId: UserId): String


textMentionMarkdown [common]
Content
fun String.textMentionMarkdown(userId: UserId): String


textMentionMarkdownV2 [common]
Content
fun String.textMentionMarkdownV2(userId: UserId): String


toHtmlCaptions [common]
Content
fun CaptionedInput.toHtmlCaptions(): List<String>
fun TextSourcesList.toHtmlCaptions(): List<String>


toHtmlExplanations [common]
Content
fun ExplainedInput.toHtmlExplanations(): List<String>
fun TextSourcesList.toHtmlExplanations(): List<String>


toHtmlTexts [common]
Content
fun TextContent.toHtmlTexts(): List<String>
fun TextSourcesList.toHtmlTexts(): List<String>


toMarkdownCaptions [common]
Content
fun CaptionedInput.toMarkdownCaptions(): List<String>
fun TextSourcesList.toMarkdownCaptions(): List<String>


toMarkdownExplanations [common]
Content
fun ExplainedInput.toMarkdownExplanations(): List<String>
fun TextSourcesList.toMarkdownExplanations(): List<String>


toMarkdownTexts [common]
Content
fun TextContent.toMarkdownTexts(): List<String>
fun TextSourcesList.toMarkdownTexts(): List<String>


toMarkdownV2Captions [common]
Content
fun CaptionedInput.toMarkdownV2Captions(): List<String>
fun TextSourcesList.toMarkdownV2Captions(): List<String>


toMarkdownV2Explanations [common]
Content
fun ExplainedInput.toMarkdownV2Explanations(): List<String>
fun TextSourcesList.toMarkdownV2Explanations(): List<String>


toMarkdownV2Texts [common]
Content
fun TextContent.toMarkdownV2Texts(): List<String>
fun TextSourcesList.toMarkdownV2Texts(): List<String>


underline [common]
Content
inline fun EntitiesBuilder.underline(vararg parts: TextSource)
inline fun EntitiesBuilder.underline(text: String)
inline fun EntitiesBuilder.underline(parts: List<TextSource>)
infix fun String.underline(parseMode: ParseMode): String


underlineHTML [common]
Content
fun String.underlineHTML(): String


underlineMarkdown [common]
Content
fun String.underlineMarkdown(): String
More info
Crutch for support of underline in default markdown.


underlineMarkdownV2 [common]
Content
fun String.underlineMarkdownV2(): String


Properties

Name Summary
htmlBoldControl [common] const val htmlBoldControl: String
htmlCodeControl [common] const val htmlCodeControl: String
htmlItalicControl [common] const val htmlItalicControl: String
htmlPreControl [common] const val htmlPreControl: String
htmlStrikethroughControl [common] const val htmlStrikethroughControl: String
htmlUnderlineControl [common] const val htmlUnderlineControl: String
link [common] val Username.link: String
link [common] val Message.link: String?
link [common] val Chat.link: String?Link which can be used as by any user to get access to Chat.
markdownBoldControl [common] const val markdownBoldControl: String
markdownCodeControl [common] const val markdownCodeControl: String
markdownItalicControl [common] const val markdownItalicControl: String
markdownPreControl [common] const val markdownPreControl: String
markdownV2ItalicEndControl [common] const val markdownV2ItalicEndControl: String
markdownV2ItalicUnderlineDelimiter [common] const val markdownV2ItalicUnderlineDelimiter: String
markdownV2StrikethroughControl [common] const val markdownV2StrikethroughControl: String
markdownV2UnderlineControl [common] const val markdownV2UnderlineControl: String
markdownV2UnderlineEndControl [common] const val markdownV2UnderlineEndControl: String
stickerSetLink [common] val StickerSetName.stickerSetLink: TextLinkTextSource