2018-12-26 08:07:24 +00:00
|
|
|
package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity
|
|
|
|
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.User
|
2019-03-31 03:26:41 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.utils.mentionMarkdown
|
2018-12-26 08:07:24 +00:00
|
|
|
|
|
|
|
class TextMentionMessageEntity(
|
|
|
|
override val offset: Int,
|
|
|
|
override val length: Int,
|
|
|
|
override val sourceString: String,
|
|
|
|
val user: User
|
2019-03-31 03:26:41 +00:00
|
|
|
) : MessageEntity {
|
|
|
|
override val asMarkdownSource: String = sourceString.mentionMarkdown(user.id)
|
|
|
|
override val asHtmlSource: String = sourceString.mentionMarkdown(user.id)
|
|
|
|
}
|