From 6b045549f9af1f9dfd1295d6c76a476c34856c7f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 16 Apr 2019 19:22:18 +0800 Subject: [PATCH] fix pollQuestionTextLength name --- .../insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt | 4 ++-- .../github/insanusmokrassar/TelegramBotAPI/types/Common.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt index 8b03cfbb50..ee244f2788 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/SendPoll.kt @@ -25,8 +25,8 @@ data class SendPoll( ReplyingMarkupSendMessageRequest { init { - if (question.length !in pollQuectionTextLength) { - throw IllegalArgumentException("The length of questions for polls must be in $pollQuectionTextLength range, but was ${question.length}") + if (question.length !in pollQuestionTextLength) { + throw IllegalArgumentException("The length of questions for polls must be in $pollQuestionTextLength range, but was ${question.length}") } options.forEach { if (it.length !in pollOptionTextLength) { diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt index aaa6bddd33..9122be4efe 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt @@ -32,7 +32,7 @@ val invoiceDescriptionLimit = 1 until 256 val invoicePayloadBytesLimit = 1 until 128 val pollOptionTextLength = 1 .. 100 -val pollQuectionTextLength = 1 until 256 +val pollQuestionTextLength = 1 until 256 val pollOptionsLimit = 2 .. 10 val livePeriodLimit = 60 .. 86400