# dev.inmo.tgbotapi.types.message.textsources

docs

# Package dev.inmo.tgbotapi.types.message.textsources

## Types

BoldTextSource
Link copied to clipboard
data class BoldTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
BotCommandTextSource
Link copied to clipboard
data class BotCommandTextSource constructor(val source: String ) : TextSource
Content copied to clipboard
CashTagTextSource
Link copied to clipboard
data class CashTagTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
CodeTextSource
Link copied to clipboard
data class CodeTextSource constructor(val source: String ) : TextSource
Content copied to clipboard
EMailTextSource
Link copied to clipboard
data class EMailTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
HashTagTextSource
Link copied to clipboard
data class HashTagTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
ItalicTextSource
Link copied to clipboard
data class ItalicTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
MentionTextSource
Link copied to clipboard
data class MentionTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
MultilevelTextSource
Link copied to clipboard
interface MultilevelTextSource : TextSource
Content copied to clipboard
MutableTextSourcesList
Link copied to clipboard
typealias MutableTextSourcesList = MutableList < TextSource >
Content copied to clipboard
PhoneNumberTextSource
Link copied to clipboard
data class PhoneNumberTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
PreTextSource
Link copied to clipboard
data class PreTextSource constructor(val source: String , val language: String ? = null) : TextSource
Content copied to clipboard
RegularTextSource
Link copied to clipboard
data class RegularTextSource constructor(val source: String ) : TextSource
Content copied to clipboard
SpoilerTextSource
Link copied to clipboard
data class SpoilerTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
StrikethroughTextSource
Link copied to clipboard
data class StrikethroughTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
TextLinkTextSource
Link copied to clipboard
data class TextLinkTextSource constructor(val source: String , val url: String ) : TextSource
Content copied to clipboard
TextMentionTextSource
Link copied to clipboard
data class TextMentionTextSource constructor( val source: String , val user: User , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
TextSource
Link copied to clipboard
interface TextSource
Content copied to clipboard
TextSourceSerializer
Link copied to clipboard
object TextSourceSerializer : TypedSerializer< TextSource >
Content copied to clipboard
TextSourcesList
Link copied to clipboard
typealias TextSourcesList = List < TextSource >
Content copied to clipboard
UnderlineTextSource
Link copied to clipboard
data class UnderlineTextSource constructor(val source: String , val subsources: TextSourcesList ) : MultilevelTextSource
Content copied to clipboard
URLTextSource
Link copied to clipboard
data class URLTextSource constructor(val source: String ) : TextSource
Content copied to clipboard

## Functions

bold
Link copied to clipboard
inline fun bold (vararg parts: TextSource ): BoldTextSource
Content copied to clipboard
inline fun bold (text: String ): BoldTextSource
Content copied to clipboard
inline fun bold (parts: TextSourcesList ): BoldTextSource
Content copied to clipboard
botCommand
Link copied to clipboard
inline fun botCommand (command: String ): BotCommandTextSource
Content copied to clipboard
cashTag
Link copied to clipboard
inline fun cashTag (vararg parts: TextSource ): CashTagTextSource
Content copied to clipboard
inline fun cashTag (tag: String ): CashTagTextSource
Content copied to clipboard
inline fun cashTag (parts: TextSourcesList ): CashTagTextSource
Content copied to clipboard
code
Link copied to clipboard
inline fun code (code: String ): CodeTextSource
Content copied to clipboard
email
Link copied to clipboard
inline fun email (vararg parts: TextSource ): EMailTextSource
Content copied to clipboard
inline fun email (emailAddress: String ): EMailTextSource
Content copied to clipboard
inline fun email (parts: TextSourcesList ): EMailTextSource
Content copied to clipboard
hashtag
Link copied to clipboard
inline fun hashtag (vararg parts: TextSource ): HashTagTextSource
Content copied to clipboard
inline fun hashtag (parts: TextSourcesList ): HashTagTextSource
Content copied to clipboard
inline fun hashtag (hashtag: String ): HashTagTextSource
Content copied to clipboard

Without sharp (#)

italic
Link copied to clipboard
inline fun italic (vararg parts: TextSource ): ItalicTextSource
Content copied to clipboard
inline fun italic (text: String ): ItalicTextSource
Content copied to clipboard
inline fun italic (parts: TextSourcesList ): ItalicTextSource
Content copied to clipboard
link
Link copied to clipboard
inline fun link (url: String ): URLTextSource
Content copied to clipboard
inline fun link (text: String , url: String ): TextLinkTextSource
Content copied to clipboard
mention
Link copied to clipboard
inline fun mention (whoToMention: Username ): MentionTextSource
Content copied to clipboard
inline fun mention (vararg parts: TextSource ): MentionTextSource
Content copied to clipboard
inline fun mention (parts: TextSourcesList ): MentionTextSource
Content copied to clipboard
inline fun UserId . mention (text: String ): TextMentionTextSource
Content copied to clipboard
inline fun UserId . mention (parts: TextSourcesList ): TextMentionTextSource
Content copied to clipboard
inline fun User . mention (text: String ): TextMentionTextSource
Content copied to clipboard
inline fun User . mention (parts: TextSourcesList ): TextMentionTextSource
Content copied to clipboard
inline fun Identifier . mention (text: String ): TextMentionTextSource
Content copied to clipboard
inline fun Identifier . mention (parts: TextSourcesList ): TextMentionTextSource
Content copied to clipboard
inline fun mention (user: User , vararg parts: TextSource ): TextMentionTextSource
Content copied to clipboard
inline fun mention (text: String , userId: UserId ): TextMentionTextSource
Content copied to clipboard
inline fun mention (text: String , user: User ): TextMentionTextSource
Content copied to clipboard
inline fun mention (text: String , id: Identifier ): TextMentionTextSource
Content copied to clipboard
inline fun mention (parts: TextSourcesList , userId: UserId ): TextMentionTextSource
Content copied to clipboard
inline fun mention (parts: TextSourcesList , user: User ): TextMentionTextSource
Content copied to clipboard
inline fun mention (parts: TextSourcesList , id: Identifier ): TextMentionTextSource
Content copied to clipboard
inline fun mention (whoToMention: String ): MentionTextSource
Content copied to clipboard

Without leading "@"

phone
Link copied to clipboard
inline fun phone (vararg parts: TextSource ): PhoneNumberTextSource
Content copied to clipboard
inline fun phone (number: String ): PhoneNumberTextSource
Content copied to clipboard
inline fun phone (parts: TextSourcesList ): PhoneNumberTextSource
Content copied to clipboard
plus
Link copied to clipboard
inline operator fun TextSource . plus (other: TextSource ): List < TextSource >
Content copied to clipboard
inline operator fun TextSource . plus (text: String ): List < TextSource >
Content copied to clipboard
inline operator fun TextSource . plus (other: List < TextSource >): List < TextSource >
Content copied to clipboard
inline operator fun List < TextSource >. plus (text: String ): List < TextSource >
Content copied to clipboard
pre
Link copied to clipboard
inline fun pre (code: String , language: String ? = null): PreTextSource
Content copied to clipboard
regular
Link copied to clipboard
inline fun regular (text: String ): RegularTextSource
Content copied to clipboard
separateForCaption
Link copied to clipboard
fun List < TextSource >. separateForCaption (): List < List < TextSource >>
Content copied to clipboard

This method will prepare TextSources list for messages. Remember, that first part will be separated with captionLength and all others with

separateForMessage
Link copied to clipboard
fun List < TextSource >. separateForMessage (limit: IntRange , numberOfParts: Int ? = null): List < List < TextSource >>
Content copied to clipboard
separateForText
Link copied to clipboard
inline fun List < TextSource >. separateForText (): List < List < TextSource >>
Content copied to clipboard

This method will prepare TextSources list for messages with textLength

spoiler
Link copied to clipboard
inline fun spoiler (vararg parts: TextSource ): SpoilerTextSource
Content copied to clipboard
inline fun spoiler (text: String ): SpoilerTextSource
Content copied to clipboard
inline fun spoiler (parts: TextSourcesList ): SpoilerTextSource
Content copied to clipboard
strikethrough
Link copied to clipboard
inline fun strikethrough (vararg parts: TextSource ): StrikethroughTextSource
Content copied to clipboard
inline fun strikethrough (text: String ): StrikethroughTextSource
Content copied to clipboard
inline fun strikethrough (parts: TextSourcesList ): StrikethroughTextSource
Content copied to clipboard
textSourcesOrElse
Link copied to clipboard
inline fun textSourcesOrElse (textSources: TextSourcesList , block: () -> TextSourcesList ): TextSourcesList
Content copied to clipboard
textSourcesOrElseTextSource
Link copied to clipboard
inline fun textSourcesOrElseTextSource (textSources: TextSourcesList , block: () -> TextSource ): TextSourcesList
Content copied to clipboard
underline
Link copied to clipboard
inline fun underline (vararg parts: TextSource ): UnderlineTextSource
Content copied to clipboard
inline fun underline (text: String ): UnderlineTextSource
Content copied to clipboard
inline fun underline (parts: TextSourcesList ): UnderlineTextSource
Content copied to clipboard

## Properties

DirectInvocationOfTextSourceConstructor
Link copied to clipboard
const val DirectInvocationOfTextSourceConstructor : String
Content copied to clipboard