1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +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.SerialName
import kotlinx.serialization.Serializable 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 @Serializable
data class BotCommand( data class BotCommand(

View File

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