Package dev.inmo.tgbotapi.types.MessageEntity.textsources

Types

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

Functions

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

Without sharp (#)

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

Without leading "@"

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

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
common
fun List<TextSource>.separateForMessage(limit: IntRange, numberOfParts: Int? = null): List<List<TextSource>>
separateForText
Link copied to clipboard
common
inline fun List<TextSource>.separateForText(): List<List<TextSource>>

This method will prepare TextSources list for messages with textLength

strikethrough
Link copied to clipboard
common
inline fun strikethrough(vararg parts: TextSource): StrikethroughTextSource
inline fun strikethrough(text: String): StrikethroughTextSource
inline fun strikethrough(parts: TextSourcesList): StrikethroughTextSource
underline
Link copied to clipboard
common
inline fun underline(vararg parts: TextSource): UnderlineTextSource
inline fun underline(text: String): UnderlineTextSource
inline fun underline(parts: TextSourcesList): UnderlineTextSource

Properties

DirectInvocationOfTextSourceConstructor
Link copied to clipboard
common
const val DirectInvocationOfTextSourceConstructor: String