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/BotCommandMessageEntity.kt

17 lines
540 B
Kotlin
Raw Normal View History

2018-12-26 08:07:24 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity
import com.github.insanusmokrassar.TelegramBotAPI.utils.*
2018-12-26 08:07:24 +00:00
data class BotCommandMessageEntity(
override val offset: Int,
override val length: Int,
override val sourceString: String
) : MessageEntity {
override val asMarkdownSource: String = sourceString.commandMarkdown()
override val asHtmlSource: String = sourceString.commandHTML()
2018-12-26 08:07:24 +00:00
val command: String by lazy {
sourceString.substring(1)// skip first symbol like "/" or "!"
}
}