1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-03 00:15:27 +00:00
tgbotapi/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/LinkMessageEntity.kt

15 lines
362 B
Kotlin
Raw Normal View History

2019-03-27 01:35:37 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity
abstract class LinkMessageEntity(
val linkTitle: String,
val link: String
) : MessageEntity {
override val asMarkdownSource: String by lazy {
"[$linkTitle]($link)"
}
override val asHtmlSource: String by lazy {
"<a href=\"$link\">$linkTitle</a>"
}
}