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

Types

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

Functions

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(command: String): BotCommandTextSource
Link copied to clipboard
inline fun cashTag(vararg parts: TextSource): CashTagTextSource
inline fun cashTag(tag: String): CashTagTextSource
inline fun cashTag(parts: TextSourcesList): CashTagTextSource
Link copied to clipboard
inline fun code(code: String): CodeTextSource
Link copied to clipboard
inline fun email(vararg parts: TextSource): EMailTextSource
inline fun email(emailAddress: String): EMailTextSource
inline fun email(parts: TextSourcesList): EMailTextSource
Link copied to clipboard
inline fun hashtag(vararg parts: TextSource): HashTagTextSource
inline fun hashtag(parts: TextSourcesList): 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
inline fun italic(parts: TextSourcesList): 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(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 "@"

Link copied to clipboard
inline fun phone(vararg parts: TextSource): PhoneNumberTextSource
inline fun phone(number: String): PhoneNumberTextSource
inline fun phone(parts: TextSourcesList): PhoneNumberTextSource
Link copied to clipboard
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>
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
inline fun regularln(text: String): RegularTextSource
Link copied to clipboard
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

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

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

Properties

Link copied to clipboard
const val DirectInvocationOfTextSourceConstructor: String