Package-level declarations

Types

Link copied to clipboard
@Serializable
data class BlockquoteTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class BoldTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class BotCommandTextSource constructor(val source: String) : TextSource
Link copied to clipboard
@Serializable
data class CashTagTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class CodeTextSource constructor(val source: String) : TextSource
Link copied to clipboard
@Serializable
data class CustomEmojiTextSource constructor(val source: String, val customEmojiId: CustomEmojiId, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class EMailTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class ExpandableBlockquoteTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class HashTagTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class ItalicTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class MentionTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable(with = TextSourceSerializer::class)
sealed interface MultilevelTextSource : TextSource
Link copied to clipboard
@Serializable
data class PhoneNumberTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class PreTextSource constructor(val source: String, val language: String? = null) : TextSource
Link copied to clipboard
@Serializable
data class RegularTextSource constructor(val source: String) : TextSource
Link copied to clipboard
@Serializable
data class SpoilerTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class StrikethroughTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class TextLinkTextSource constructor(val source: String, val url: String) : TextSource
Link copied to clipboard
@Serializable
data class TextMentionTextSource constructor(val source: String, val user: User, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable(with = TextSourceSerializer::class)
sealed interface TextSource
Link copied to clipboard
object TextSourceSerializer : TypedSerializer<TextSource>
Link copied to clipboard
Link copied to clipboard
@Serializable
data class UnderlineTextSource constructor(val source: String, val subsources: TextSourcesList) : MultilevelTextSource
Link copied to clipboard
@Serializable
data class URLTextSource constructor(val source: String) : TextSource

Functions

Link copied to clipboard
Link copied to clipboard
inline fun bold(vararg parts: TextSource): BoldTextSource
inline fun bold(text: String): BoldTextSource
inline fun bold(parts: TextSourcesList): BoldTextSource
Link copied to clipboard
inline fun botCommand(botCommand: BotCommand): BotCommandTextSource
inline fun botCommand(command: String): BotCommandTextSource
Link copied to clipboard
inline fun cashTag(vararg parts: TextSource): CashTagTextSource
inline fun cashTag(tag: String): CashTagTextSource
Link copied to clipboard
inline fun code(code: String): CodeTextSource
Link copied to clipboard
inline fun customEmoji(emojiId: CustomEmojiId, vararg parts: TextSource): CustomEmojiTextSource

Without sharp (#)

Link copied to clipboard
inline fun email(vararg parts: TextSource): EMailTextSource
inline fun email(emailAddress: String): EMailTextSource
Link copied to clipboard
inline fun hashtag(vararg parts: TextSource): HashTagTextSource

inline fun hashtag(hashtag: String): HashTagTextSource

Without sharp (#)

Link copied to clipboard
inline fun italic(vararg parts: TextSource): ItalicTextSource
inline fun italic(text: String): ItalicTextSource
Link copied to clipboard
inline fun link(url: String): URLTextSource
inline fun link(text: String, url: String): TextLinkTextSource
Link copied to clipboard
inline fun mention(whoToMention: Username): MentionTextSource
inline fun mention(vararg parts: TextSource): MentionTextSource
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(whoToMention: String): MentionTextSource

Without leading "@"

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

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

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

This method will prepare TextSources list for messages with textLength

Link copied to clipboard

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

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

This method will prepare TextSources list for messages with textLength

Link copied to clipboard
inline fun spoiler(vararg parts: TextSource): SpoilerTextSource
inline fun spoiler(text: String): SpoilerTextSource
Link copied to clipboard
inline fun textSourcesOrElse(textSources: TextSourcesList, block: () -> TextSourcesList): TextSourcesList
Link copied to clipboard
Link copied to clipboard