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

Types

EntitiesBuilder
Link copied to clipboard
common
class EntitiesBuilder
This builder can be used to provide building of TextSources List
EntitiesBuilderBody
Link copied to clipboard
common
typealias EntitiesBuilderBody = EntitiesBuilder.() -> Unit

Functions

bold
Link copied to clipboard
common
inline fun EntitiesBuilder.bold(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.bold(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.bold(text: String): EntitiesBuilder
inline fun EntitiesBuilder.bold(parts: TextSourcesList): EntitiesBuilder
infix fun String.bold(parseMode: ParseMode): String
boldHTML
Link copied to clipboard
common
fun String.boldHTML(): String
boldMarkdown
Link copied to clipboard
common
fun String.boldMarkdown(): String
boldMarkdownV2
Link copied to clipboard
common
fun String.boldMarkdownV2(): String
botCommand
Link copied to clipboard
common
inline fun EntitiesBuilder.botCommand(command: String): EntitiesBuilder
buildEntities
Link copied to clipboard
common
fun buildEntities(init: EntitiesBuilderBody): TextSourcesList
cashTag
Link copied to clipboard
common
infix fun String.cashtag(parseMode: ParseMode): String
cashTagHtml
Link copied to clipboard
common
fun String.cashTagHtml(): String
cashTagMarkdown
Link copied to clipboard
common
fun String.cashTagMarkdown(): String
cashTagMarkdownV2
Link copied to clipboard
common
fun String.cashTagMarkdownV2(): String
code
Link copied to clipboard
common
inline fun EntitiesBuilder.code(code: String): EntitiesBuilder
infix fun String.code(parseMode: ParseMode): String
codeHTML
Link copied to clipboard
common
fun String.codeHTML(): String
codeMarkdown
Link copied to clipboard
common
fun String.codeMarkdown(): String
codeMarkdownV2
Link copied to clipboard
common
fun String.codeMarkdownV2(): String
command
Link copied to clipboard
common
infix fun String.command(parseMode: ParseMode): String
fun String.command(adapt: String.() -> String): String
commandHTML
Link copied to clipboard
common
fun String.commandHTML(): String
commandMarkdown
Link copied to clipboard
common
fun String.commandMarkdown(): String
commandMarkdownV2
Link copied to clipboard
common
fun String.commandMarkdownV2(): String
createFormattedText
Link copied to clipboard
common
fun createFormattedText(entities: TextSourcesList, partLength: Int = textLength.last, mode: ParseMode = defaultParseMode): List<String>
createHtmlText
Link copied to clipboard
common
fun createHtmlText(entities: TextSourcesList, partLength: Int = textLength.last): List<String>
createMarkdownText
Link copied to clipboard
common
fun createMarkdownText(entities: TextSourcesList, partLength: Int = textLength.last): List<String>
createMarkdownV2Text
Link copied to clipboard
common
fun createMarkdownV2Text(entities: TextSourcesList, partLength: Int = textLength.last): List<String>
email
Link copied to clipboard
common
inline fun EntitiesBuilder.email(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.email(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.email(emailAddress: String): EntitiesBuilder
inline fun EntitiesBuilder.email(parts: TextSourcesList): EntitiesBuilder
infix fun String.email(parseMode: ParseMode): String
emailHTML
Link copied to clipboard
common
fun String.emailHTML(): String
emailMarkdown
Link copied to clipboard
common
fun String.emailMarkdown(): String
emailMarkdownV2
Link copied to clipboard
common
fun String.emailMarkdownV2(): String
hashTag
Link copied to clipboard
common
inline fun EntitiesBuilder.hashtag(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.hashtag(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.hashtag(hashtag: String): EntitiesBuilder
inline fun EntitiesBuilder.hashtag(parts: TextSourcesList): EntitiesBuilder
hashTagHTML
Link copied to clipboard
common
fun String.hashTagHTML(): String
hashTagMarkdown
Link copied to clipboard
common
fun String.hashTagMarkdown(): String
hashTagMarkdownV2
Link copied to clipboard
common
fun String.hashTagMarkdownV2(): String
italic
Link copied to clipboard
common
inline fun EntitiesBuilder.italic(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.italic(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.italic(text: String): EntitiesBuilder
inline fun EntitiesBuilder.italic(parts: TextSourcesList): EntitiesBuilder
infix fun String.italic(parseMode: ParseMode): String
italicHTML
Link copied to clipboard
common
fun String.italicHTML(): String
italicMarkdown
Link copied to clipboard
common
fun String.italicMarkdown(): String
italicMarkdownV2
Link copied to clipboard
common
fun String.italicMarkdownV2(): String
link
Link copied to clipboard
common
inline fun EntitiesBuilder.link(url: String): EntitiesBuilder
infix fun Pair<String, String>.link(parseMode: ParseMode): String
inline fun EntitiesBuilder.link(text: String, url: String): EntitiesBuilder
linkHTML
Link copied to clipboard
common
fun String.linkHTML(link: String): String
linkMarkdown
Link copied to clipboard
common
fun String.linkMarkdown(link: String): String
linkMarkdownV2
Link copied to clipboard
common
fun String.linkMarkdownV2(link: String): String
makeLink
Link copied to clipboard
common
inline fun makeLink(username: Username): String
makeLinkToMessage
Link copied to clipboard
common
fun makeLinkToMessage(username: Username, messageId: MessageIdentifier): String
fun makeLinkToMessage(chat: UsernameChat, messageId: MessageIdentifier): String?
fun makeLinkToMessage(username: String, messageId: MessageIdentifier): String
fun makeLinkToMessage(chat: Chat, messageId: MessageIdentifier): String?
Link which can be used as by any user to get access to Message.
makeUsernameLink
Link copied to clipboard
common
fun makeUsernameLink(username: String): String
mention
Link copied to clipboard
common
inline fun EntitiesBuilder.mention(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.mention(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.mention(whoToMention: String): EntitiesBuilder
inline fun EntitiesBuilder.mention(parts: TextSourcesList): EntitiesBuilder
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): EntitiesBuilder
inline fun EntitiesBuilder.mention(text: String, user: User): EntitiesBuilder
inline fun EntitiesBuilder.mention(parts: TextSourcesList, user: User): EntitiesBuilder
mentionHTML
Link copied to clipboard
common
fun String.mentionHTML(): String
mentionMarkdown
Link copied to clipboard
common
fun String.mentionMarkdown(): String
mentionMarkdownV2
Link copied to clipboard
common
fun String.mentionMarkdownV2(): String
phone
Link copied to clipboard
common
inline fun EntitiesBuilder.phone(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.phone(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.phone(number: String): EntitiesBuilder
inline fun EntitiesBuilder.phone(parts: TextSourcesList): EntitiesBuilder
infix fun String.phone(parseMode: ParseMode): String
phoneHTML
Link copied to clipboard
common
fun String.phoneHTML(): String
phoneMarkdown
Link copied to clipboard
common
fun String.phoneMarkdown(): String
phoneMarkdownV2
Link copied to clipboard
common
fun String.phoneMarkdownV2(): String
pre
Link copied to clipboard
common
infix fun String.pre(parseMode: ParseMode): String
inline fun EntitiesBuilder.pre(code: String, language: String?): EntitiesBuilder
fun String.pre(parseMode: ParseMode, language: String? = null): String
preHTML
Link copied to clipboard
common
fun String.preHTML(language: String? = null): String
preMarkdown
Link copied to clipboard
common
fun String.preMarkdown(language: String? = null): String
preMarkdownV2
Link copied to clipboard
common
fun String.preMarkdownV2(language: String? = null): String
regular
Link copied to clipboard
common
inline fun EntitiesBuilder.regular(text: String): EntitiesBuilder
infix fun String.regular(parseMode: ParseMode): String
regularHtml
Link copied to clipboard
common
fun String.regularHtml(): String
regularMarkdown
Link copied to clipboard
common
fun String.regularMarkdown(): String
regularMarkdownV2
Link copied to clipboard
common
fun String.regularMarkdownV2(): String
strikethrough
Link copied to clipboard
common
inline fun EntitiesBuilder.strikethrough(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.strikethrough(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.strikethrough(text: String): EntitiesBuilder
inline fun EntitiesBuilder.strikethrough(parts: TextSourcesList): EntitiesBuilder
infix fun String.strikethrough(parseMode: ParseMode): String
strikethroughHTML
Link copied to clipboard
common
fun String.strikethroughHTML(): String
strikethroughMarkdown
Link copied to clipboard
common
fun String.strikethroughMarkdown(): String
Crutch for support of strikethrough in default markdown.
strikethroughMarkdownV2
Link copied to clipboard
common
fun String.strikethroughMarkdownV2(): String
textMentionHTML
Link copied to clipboard
common
fun String.textMentionHTML(userId: UserId): String
textMentionMarkdown
Link copied to clipboard
common
fun String.textMentionMarkdown(userId: UserId): String
textMentionMarkdownV2
Link copied to clipboard
common
fun String.textMentionMarkdownV2(userId: UserId): String
toHtmlCaptions
Link copied to clipboard
common
fun TextSourcesList.toHtmlCaptions(): List<String>
toHtmlExplanations
Link copied to clipboard
common
fun TextSourcesList.toHtmlExplanations(): List<String>
toHtmlTexts
Link copied to clipboard
common
fun TextContent.toHtmlTexts(): List<String>
fun TextSourcesList.toHtmlTexts(): List<String>
toMarkdownCaptions
Link copied to clipboard
common
fun TextSourcesList.toMarkdownCaptions(): List<String>
toMarkdownExplanations
Link copied to clipboard
common
fun TextSourcesList.toMarkdownExplanations(): List<String>
toMarkdownTexts
Link copied to clipboard
common
fun TextContent.toMarkdownTexts(): List<String>
fun TextSourcesList.toMarkdownTexts(): List<String>
toMarkdownV2Captions
Link copied to clipboard
common
fun TextSourcesList.toMarkdownV2Captions(): List<String>
toMarkdownV2Explanations
Link copied to clipboard
common
fun TextSourcesList.toMarkdownV2Explanations(): List<String>
toMarkdownV2Texts
Link copied to clipboard
common
fun TextContent.toMarkdownV2Texts(): List<String>
fun TextSourcesList.toMarkdownV2Texts(): List<String>
underline
Link copied to clipboard
common
inline fun EntitiesBuilder.underline(vararg parts: TextSource): EntitiesBuilder
inline fun EntitiesBuilder.underline(noinline init: EntitiesBuilderBody): EntitiesBuilder
inline fun EntitiesBuilder.underline(text: String): EntitiesBuilder
inline fun EntitiesBuilder.underline(parts: TextSourcesList): EntitiesBuilder
infix fun String.underline(parseMode: ParseMode): String
underlineHTML
Link copied to clipboard
common
fun String.underlineHTML(): String
underlineMarkdown
Link copied to clipboard
common
fun String.underlineMarkdown(): String
Crutch for support of underline in default markdown.
underlineMarkdownV2
Link copied to clipboard
common
fun String.underlineMarkdownV2(): String

Properties

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