1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

potential fix of build

This commit is contained in:
InsanusMokrassar 2020-08-20 01:17:32 +06:00
parent 212d8946c8
commit 0087d02b5f
2 changed files with 12 additions and 6 deletions

View File

@ -4,7 +4,10 @@ import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
val BotCommandNameRegex = Regex("^[a-z_0-9]{${botCommandLengthLimit.first},${botCommandLengthLimit.last}}$")
// Made as lazy for correct work in K/JS
val BotCommandNameRegex by lazy {
Regex("^[a-z_0-9]{${botCommandLengthLimit.first},${botCommandLengthLimit.last}}$")
}
@Serializable
data class BotCommand(

View File

@ -65,11 +65,14 @@ val explanationLimit = 0 .. 200
val openPeriodPollSecondsLimit = 5 .. 600
val telegramInlineModeGifPermittedMimeTypes = listOf(
BuiltinMimeTypes.Image.Jpg,
BuiltinMimeTypes.Image.Gif,
BuiltinMimeTypes.Video.MP4
)
// Made as lazy for correct work in K/JS
val telegramInlineModeGifPermittedMimeTypes by lazy {
listOf(
BuiltinMimeTypes.Image.Jpg,
BuiltinMimeTypes.Image.Gif,
BuiltinMimeTypes.Video.MP4
)
}
const val chatIdField = "chat_id"
const val messageIdField = "message_id"