1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-07-19 17:01:05 +00:00
Files

21 lines
617 B
Kotlin

package dev.inmo.tgbotapi.types.MessageEntity.textsources
import dev.inmo.tgbotapi.CommonAbstracts.*
import dev.inmo.tgbotapi.utils.*
private val String.withoutCommercialAt
get() = if (startsWith("@")) {
substring(1)
} else {
this
}
class MentionTextSource(
override val source: String,
override val textSources: List<TextSource>
) : MultilevelTextSource {
override val asMarkdownSource: String by lazy { source.mentionMarkdown() }
override val asMarkdownV2Source: String by lazy { mentionMarkdownV2() }
override val asHtmlSource: String by lazy { mentionHTML() }
}