1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-06-09 09:07:24 +00:00

Compare commits

...

13 Commits

Author SHA1 Message Date
97b7b3d5d7 Merge pull request #1043 from InsanusMokrassar/33.1.0
33.1.0
2026-04-19 13:26:44 +06:00
62b4bc15ca remove kotlinpoet from changelog 2026-04-19 12:58:27 +06:00
7c2ce53713 fix changelog style 2026-04-19 12:56:22 +06:00
035c8f469a update dependencies
dev.inmo:micro_utils 0.29.1 -> 0.29.2
dev.inmo:kslog 1.6.0 -> 1.6.1
com.squareup:kotlinpoet-ksp 2.2.0 -> 2.3.0
io.ktor:ktor-* 3.4.1 -> 3.4.2
org.jetbrains.kotlinx:kotlinx-serialization-* 1.10.0 -> 1.11.0
org.jetbrains.kotlin:kotlin-* 2.3.10 -> 2.3.20
2026-04-19 12:48:40 +06:00
c982eef85b start 33.1.0 2026-04-19 12:18:46 +06:00
16e94a1e1b Merge pull request #1038 from InsanusMokrassar/33.0.0
33.0.0
2026-04-16 17:43:38 +06:00
96a5508e9a refill changelog 2026-04-16 13:05:29 +06:00
83de9fd973 fix name of allowMultipleAnswers to allowsMultipleAnswers 2026-04-16 13:02:10 +06:00
4a0b890697 fill CHANGELOG.md, fix README.md, small fix in checkSendData to not throw error 2026-04-16 12:39:26 +06:00
0e481c3dd9 fix of custom emoji icons passing in setParams of WebApp and rewrite init errors to warnings in SendQuizPoll 2026-04-15 16:13:37 +06:00
176d0d419a fix hierarchy of ManagedBotUpdated 2026-04-14 19:59:52 +06:00
77bf7b6e89 fix of onManagedBotUpdated work 2026-04-14 19:50:54 +06:00
5337f8c7cc fix of username encoding in KeyboardButtonRequestManagedBot 2026-04-14 17:26:37 +06:00
25 changed files with 353 additions and 263 deletions

View File

@@ -1,7 +1,67 @@
# TelegramBotAPI changelog # TelegramBotAPI changelog
## 33.1.0
* `Versions`:
* `Kotlin`: `2.3.10` -> `2.3.20`
* `Serialization`: `1.10.0` -> `1.11.0`
* `Ktor`: `3.4.1` -> `3.4.2`
* `MicroUtils`: `0.29.1` -> `0.29.2`
* `KSLog`: `1.6.0` -> `1.6.1`
## 33.0.0 ## 33.0.0
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 9.6](https://core.telegram.org/bots/api-changelog#april-3-2026)**
**THIS UPDATE CONTAINS BREAKING CHANGES**
* `Core`:
* **THIS IS BREAKING CHANGE** `MultipleAnswersPoll` removed; `RegularPoll` now directly implements `Poll`
* **THIS IS BREAKING CHANGE** `allowMultipleAnswers` renamed to `allowsMultipleAnswers` across poll types and requests
* **THIS IS BREAKING CHANGE** `QuizPoll.correctOptionId: Int?` changed to `correctOptionIds: List<Int>?`
* **THIS IS BREAKING CHANGE** `PollOption` is now a sealed interface with `PollOption.Simple` and `PollOption.LatelyAdded` subtypes; `SimplePollOption` removed
* **THIS IS BREAKING CHANGE** `PollAnswer.Anonymous.voterChat` type changed from `ChannelChat` to `PreviewPublicChat`
* **THIS IS BREAKING CHANGE** `requestChannelReplyButton` (group variant) renamed to `requestGroupReplyButton`
* Added `BotToken` value class
* Added `SavePreparedKeyboardButton` request with `PreparedKeyboardButton` and `PreparedKeyboardButtonId` types
* Added `GetManagedBotToken` and `ReplaceManagedBotToken` requests
* Added `KeyboardButtonRequestManagedBot` and `RequestManagedBotKeyboardButton`
* Added `ManagedBotCreated` chat event and `ManagedBotUpdated` type with `ManagedBotUpdate`
* Added `PollOptionPersistentId` value class
* Added `PollOptionAdded` and `PollOptionDeleted` chat events
* Added `pollOptionId` support in `ReplyParameters` (`reply_to_poll_option_id`)
* Added `canManageBots` to `ExtendedBot`
* Added `allowsRevoting`, `shuffleOptions`, `allowAddingOptions`, `hideResultsUntilCloses`, `description`/`descriptionTextSources` to poll types and send requests
* Added `chosenPersistentIds` to `PollAnswer`
* Added `UsernameAtLessSerializer`
* Extended `openPeriodPollSecondsLimit` from `5..600` to `5..2628000`
* Fixed quiz poll serialization type (was incorrectly using `regularPollType` in quiz branch)
* Fixed quiz poll explanation serialization (now correctly uses `explanation`/`explanationTextSources`)
* Fixed `SendQuizPoll` correct option index range validation (off-by-one)
* Several poll validation checks changed from throwing exceptions to logging warnings
* `API`:
* Added `savePreparedKeyboardButton` extensions
* Added `getManagedBotToken` and `replaceManagedBotToken` extensions
* Added optional `pollOptionId` parameter to `reply`/`replyWith*` extensions
* Updated `sendQuizPoll` extensions with `correctOptionIds`, `allowsMultipleAnswers`, `allowsRevoting`, `shuffleOptions`, `hideResultsUntilCloses`, `description` parameters
* Updated `sendRegularPoll` extensions with `allowsRevoting`, `shuffleOptions`, `allowAddingOptions`, `hideResultsUntilCloses`, `description` parameters
* `BehaviourBuilder`:
* Added `onManagedBotCreated` and `onManagedBotUpdated` triggers
* Added `onPollOptionAdded` and `onPollOptionDeleted` triggers
* Added `waitManagedBotCreatedEvents` and `waitManagedBotUpdated` expectations
* Added `waitPollOptionAddedEvents` and `waitPollOptionDeletedEvents` expectations
* Added `ManagedBotUpdatedFilterByUser` and `ByUserManagedBotUpdatedMarkerFactory`
* `Utils`:
* Added `managedBotCreationLink` formatting extensions
* Added `requestManagedBotButton` to `ReplyKeyboardBuilder`
* Added class casts for `ManagedBotUpdate`, `ManagedBotCreated`, `PollOptionAdded`, `PollOptionDeleted`
* Removed `MultipleAnswersPoll` class casts
* Updated raw poll accessors to match new model (`allowsMultipleAnswers`, `correctOptionIds`, `explanation`)
* Regenerated class casts extensions
* `WebApps`:
* Added `requestChat` support for `PreparedKeyboardButtonId`
* Fixed `iconCustomEmojiId` passing in `BottomButton`
## 32.0.0 ## 32.0.0
**THIS UPDATE CONTAINS BREAKING CHANGES** **THIS UPDATE CONTAINS BREAKING CHANGES**

View File

@@ -1,4 +1,4 @@
# TelegramBotAPI [![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-9.5-blue)](https://core.telegram.org/bots/api-changelog#march-1-2026) # TelegramBotAPI [![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-9.6-blue)](https://core.telegram.org/bots/api-changelog#april-3-2026)
| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) | | Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) |
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| |:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|

View File

@@ -6,4 +6,4 @@ kotlin.incremental=true
kotlin.incremental.js=true kotlin.incremental.js=true
library_group=dev.inmo library_group=dev.inmo
library_version=33.0.0 library_version=33.1.0

View File

@@ -1,20 +1,20 @@
[versions] [versions]
kotlin = "2.3.10" kotlin = "2.3.20"
kotlin-serialization = "1.10.0" kotlin-serialization = "1.11.0"
kotlin-coroutines = "1.10.2" kotlin-coroutines = "1.10.2"
javax-activation = "1.1.1" javax-activation = "1.1.1"
korlibs = "5.4.0" korlibs = "5.4.0"
uuid = "0.8.4" uuid = "0.8.4"
ktor = "3.4.1" ktor = "3.4.2"
ksp = "2.3.6" ksp = "2.3.6"
kotlin-poet = "2.2.0" kotlin-poet = "2.3.0"
microutils = "0.29.1" microutils = "0.29.2"
kslog = "1.6.0" kslog = "1.6.1"
versions = "0.53.0" versions = "0.53.0"

View File

@@ -2401,7 +2401,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id, replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2424,7 +2424,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2445,7 +2445,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id, replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2467,8 +2467,8 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo, closeInfo = closeInfo,
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers, isClosed = allowsMultipleAnswers,
allowMultipleAnswers = isClosed, allowsMultipleAnswers = isClosed,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2488,7 +2488,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption>, options: List<InputPollOption>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id, replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2510,7 +2510,7 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2530,7 +2530,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id, replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2551,8 +2551,8 @@ public suspend inline fun TelegramBot.reply(
options = options, options = options,
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers, isClosed = allowsMultipleAnswers,
allowMultipleAnswers = isClosed, allowsMultipleAnswers = isClosed,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2573,7 +2573,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?, explanation: String?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2602,7 +2602,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2626,7 +2626,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2655,7 +2655,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2677,7 +2677,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?, explanation: String?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2704,7 +2704,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2728,7 +2728,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2755,7 +2755,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2776,7 +2776,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>, correctOptionIds: List<Int>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
@@ -2804,7 +2804,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2827,7 +2827,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
@@ -2855,7 +2855,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2876,7 +2876,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>, correctOptionIds: List<Int>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2902,7 +2902,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2924,7 +2924,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by income QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = quizPoll.explanationTextSources, explanationTextSources: List<TextSource>? = quizPoll.explanationTextSources,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2950,7 +2950,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2995,7 +2995,7 @@ public suspend inline fun TelegramBot.reply(
question = question, question = question,
options = options, options = options,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
allowMultipleAnswers = isAnonymous, allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo, closeInfo = closeInfo,
replyInChatId = replyInChatId, replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId, replyInThreadId = replyInThreadId,
@@ -3067,7 +3067,7 @@ public suspend inline fun TelegramBot.reply(
options = options, options = options,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = isAnonymous, allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo, closeInfo = closeInfo,
replyInChatId = replyInChatId, replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId, replyInThreadId = replyInThreadId,

View File

@@ -2149,7 +2149,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId, replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2172,7 +2172,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2194,7 +2194,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId, replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2216,8 +2216,8 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo, closeInfo = closeInfo,
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers, isClosed = allowsMultipleAnswers,
allowMultipleAnswers = isClosed, allowsMultipleAnswers = isClosed,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2238,7 +2238,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption>, options: List<InputPollOption>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId, replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2260,7 +2260,7 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2281,7 +2281,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId, replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId, replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2302,8 +2302,8 @@ public suspend inline fun TelegramBot.reply(
options = options, options = options,
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers, isClosed = allowsMultipleAnswers,
allowMultipleAnswers = isClosed, allowsMultipleAnswers = isClosed,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId, businessConnectionId = replyInBusinessConnectionId,
@@ -2325,7 +2325,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?, explanation: String?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2354,7 +2354,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2379,7 +2379,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2408,7 +2408,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2431,7 +2431,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?, explanation: String?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2458,7 +2458,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2483,7 +2483,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2510,7 +2510,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2532,7 +2532,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>, correctOptionIds: List<Int>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
@@ -2560,7 +2560,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2584,7 +2584,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
@@ -2612,7 +2612,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2634,7 +2634,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>, correctOptionIds: List<Int>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2660,7 +2660,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2684,7 +2684,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"), ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = quizPoll.explanationTextSources, explanationTextSources: List<TextSource>? = quizPoll.explanationTextSources,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
@@ -2710,7 +2710,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = replyInThreadId, threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId, directMessageThreadId = replyInDirectMessageThreadId,
@@ -2756,7 +2756,7 @@ public suspend inline fun TelegramBot.reply(
question = question, question = question,
options = options, options = options,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
allowMultipleAnswers = isAnonymous, allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo, closeInfo = closeInfo,
replyInChatId = replyInChatId, replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId, replyInThreadId = replyInThreadId,
@@ -2828,7 +2828,7 @@ public suspend inline fun TelegramBot.reply(
options = options, options = options,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = isAnonymous, allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo, closeInfo = closeInfo,
replyInChatId = replyInChatId, replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId, replyInThreadId = replyInThreadId,

View File

@@ -2026,7 +2026,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2046,7 +2046,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2070,7 +2070,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption>, options: List<InputPollOption>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2089,7 +2089,7 @@ public suspend fun TelegramBot.send(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2115,7 +2115,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false, isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2135,7 +2135,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2160,7 +2160,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false, isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2179,7 +2179,7 @@ public suspend fun TelegramBot.send(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2204,7 +2204,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
@@ -2224,7 +2224,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2250,7 +2250,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false, isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
@@ -2270,7 +2270,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2295,7 +2295,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false, isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() }, options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous, isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
@@ -2314,7 +2314,7 @@ public suspend fun TelegramBot.send(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -2340,7 +2340,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2366,7 +2366,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2393,7 +2393,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2419,7 +2419,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2447,7 +2447,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2473,7 +2473,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2501,7 +2501,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2527,7 +2527,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2553,7 +2553,7 @@ public suspend fun TelegramBot.send(
correctOptionIds: List<Int>, correctOptionIds: List<Int>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2578,7 +2578,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2604,7 +2604,7 @@ public suspend fun TelegramBot.send(
correctOptionIds: List<Int>, correctOptionIds: List<Int>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2629,7 +2629,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2656,7 +2656,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2681,7 +2681,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2708,7 +2708,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
explanation: String? = null, explanation: String? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
@@ -2733,7 +2733,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2761,7 +2761,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@@ -2784,7 +2784,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2812,7 +2812,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@@ -2835,7 +2835,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2864,7 +2864,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@@ -2887,7 +2887,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2916,7 +2916,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@@ -2939,7 +2939,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -2966,7 +2966,7 @@ public suspend fun TelegramBot.send(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@@ -2988,7 +2988,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -3015,7 +3015,7 @@ public suspend fun TelegramBot.send(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@@ -3037,7 +3037,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -3065,7 +3065,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@@ -3087,7 +3087,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
@@ -3115,7 +3115,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() }, options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"), correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous, isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers, allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null, closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@@ -3137,7 +3137,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,

View File

@@ -24,7 +24,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -53,7 +53,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -83,7 +83,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -111,7 +111,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -141,7 +141,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -168,7 +168,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -196,7 +196,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -222,7 +222,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -253,7 +253,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -281,7 +281,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -310,7 +310,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -337,7 +337,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -366,7 +366,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -392,7 +392,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -419,7 +419,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -444,7 +444,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,

View File

@@ -21,7 +21,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -48,7 +48,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -76,7 +76,7 @@ public suspend fun TelegramBot.sendRegularPoll(
options: List<InputPollOption>, options: List<InputPollOption>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -102,7 +102,7 @@ public suspend fun TelegramBot.sendRegularPoll(
options = options, options = options,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -132,7 +132,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -158,7 +158,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -185,7 +185,7 @@ public suspend fun TelegramBot.sendRegularPoll(
closeInfo: ScheduledCloseInfo?, closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -210,7 +210,7 @@ public suspend fun TelegramBot.sendRegularPoll(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,

View File

@@ -674,8 +674,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitLeftChatMemberEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLeftChatMemberEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitManagedBotCreatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitManagedBotCreatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitManagedBotCreatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitManagedBotCreatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitManagedBotUpdatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitManagedBotUpdatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitMessageAutoDeleteTimerChangedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitMessageAutoDeleteTimerChangedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitMessageAutoDeleteTimerChangedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitMessageAutoDeleteTimerChangedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitNewChatMembersEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitNewChatMembersEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -1422,8 +1420,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onLeftChatMember$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onLeftChatMember$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onManagedBotCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onManagedBotCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onManagedBotCreated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onManagedBotCreated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onManagedBotUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onManagedBotUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMessageAutoDeleteTimerChangedEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMessageAutoDeleteTimerChangedEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMessageAutoDeleteTimerChangedEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMessageAutoDeleteTimerChangedEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onNewChatMembers (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onNewChatMembers (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1510,8 +1506,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ManagedBotUpdateTriggersKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ManagedBotUpdateTriggersKt {
public static final fun onManagedBotUpdate (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onManagedBotUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onManagedBotUpdate$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onManagedBotUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggersKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggersKt {

View File

@@ -267,11 +267,6 @@ fun BehaviourContext.waitPollOptionDeletedEvents(
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<PollOptionDeleted>(initRequest, errorFactory) ) = waitEvents<PollOptionDeleted>(initRequest, errorFactory)
fun BehaviourContext.waitManagedBotUpdatedEvents(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<ManagedBotUpdated>(initRequest, errorFactory)
fun BehaviourContext.waitChatBackgroundSet( fun BehaviourContext.waitChatBackgroundSet(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -1121,29 +1121,6 @@ fun <BC : BehaviourContext> BC.onPollOptionDeleted(
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PollOptionDeleted>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PollOptionDeleted>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onManagedBotUpdated(
initialFilter: SimpleFilter<ChatEventMessage<ManagedBotUpdated>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ManagedBotUpdated>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatEventMessage<ManagedBotUpdated>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ManagedBotUpdated>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ManagedBotUpdated>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,

View File

@@ -3,11 +3,15 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserManagedBotUpdatedMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserManagedBotUpdatedMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.managedBotUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.managedBotUpdateOrNull
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
import dev.inmo.tgbotapi.types.update.ManagedBotUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
/** /**
@@ -23,7 +27,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data * data
*/ */
fun <BC : BehaviourContext> BC.onManagedBotUpdate( fun <BC : BehaviourContext> BC.onManagedBotUpdated(
initialFilter: SimpleFilter<ManagedBotUpdated>? = null, initialFilter: SimpleFilter<ManagedBotUpdated>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ManagedBotUpdated, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ManagedBotUpdated, Update>? = null,
markerFactory: MarkerFactory<in ManagedBotUpdated, Any>? = ByUserManagedBotUpdatedMarkerFactory, markerFactory: MarkerFactory<in ManagedBotUpdated, Any>? = ByUserManagedBotUpdatedMarkerFactory,

View File

@@ -8048,13 +8048,19 @@ public final class dev/inmo/tgbotapi/requests/send/payments/SendInvoice$Companio
public abstract class dev/inmo/tgbotapi/requests/send/polls/SendPoll : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/requests/send/abstracts/ReplyingMarkupSendMessageRequest, dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest { public abstract class dev/inmo/tgbotapi/requests/send/polls/SendPoll : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/requests/send/abstracts/ReplyingMarkupSendMessageRequest, dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest {
public fun getAllowSendingWithoutReply ()Ljava/lang/Boolean; public fun getAllowSendingWithoutReply ()Ljava/lang/Boolean;
public abstract fun getAllowsMultipleAnswers ()Z
public abstract fun getAllowsRevoting ()Z
public fun getCloseInfo ()Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo; public fun getCloseInfo ()Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;
protected final fun getCreationDate-Wg0KzQs ()D protected final fun getCreationDate-Wg0KzQs ()D
public abstract fun getDescription ()Ljava/lang/String;
public abstract fun getDescriptionTextSources ()Ljava/util/List;
public abstract fun getHideResultsUntilCloses ()Z
public abstract fun getOptions ()Ljava/util/List; public abstract fun getOptions ()Ljava/util/List;
public abstract fun getQuestion ()Ljava/lang/String; public abstract fun getQuestion ()Ljava/lang/String;
public abstract fun getQuestionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode; public abstract fun getQuestionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public fun getReplyToMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId; public fun getReplyToMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId;
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
public abstract fun getShuffleOptions ()Z
public fun getText ()Ljava/lang/String; public fun getText ()Ljava/lang/String;
public abstract fun getType ()Ljava/lang/String; public abstract fun getType ()Ljava/lang/String;
public abstract fun isAnonymous ()Z public abstract fun isAnonymous ()Z
@@ -8082,22 +8088,22 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendQuizPoll : dev/inmo
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZZZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZZZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getAllowMultipleAnswers ()Z
public fun getAllowPaidBroadcast ()Z public fun getAllowPaidBroadcast ()Z
public final fun getAllowsRevoting ()Z public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun getCorrectOptionIds ()Ljava/util/List; public final fun getCorrectOptionIds ()Ljava/util/List;
public final fun getDescription ()Ljava/lang/String; public fun getDescription ()Ljava/lang/String;
public final fun getDescriptionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode; public final fun getDescriptionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun getDescriptionTextSources ()Ljava/util/List; public fun getDescriptionTextSources ()Ljava/util/List;
public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId; public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId;
public fun getDisableNotification ()Z public fun getDisableNotification ()Z
public fun getEffectId-Ts0V7ak ()Ljava/lang/String; public fun getEffectId-Ts0V7ak ()Ljava/lang/String;
public final fun getExplanation ()Ljava/lang/String; public final fun getExplanation ()Ljava/lang/String;
public final fun getExplanationParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode; public final fun getExplanationParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun getExplanationTextEntities ()Ljava/util/List; public final fun getExplanationTextEntities ()Ljava/util/List;
public final fun getHideResultsUntilCloses ()Z public fun getHideResultsUntilCloses ()Z
public fun getOptions ()Ljava/util/List; public fun getOptions ()Ljava/util/List;
public fun getProtectContent ()Z public fun getProtectContent ()Z
public fun getQuestion ()Ljava/lang/String; public fun getQuestion ()Ljava/lang/String;
@@ -8105,7 +8111,7 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendQuizPoll : dev/inmo
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup; public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters; public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters;
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
public final fun getShuffleOptions ()Z public fun getShuffleOptions ()Z
public fun getSuggestedPostParameters ()Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters; public fun getSuggestedPostParameters ()Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;
public fun getTextSources ()Ljava/util/List; public fun getTextSources ()Ljava/util/List;
public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId; public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId;
@@ -8153,18 +8159,18 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendRegularPoll : dev/i
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getAllowAddingOptions ()Z public final fun getAllowAddingOptions ()Z
public final fun getAllowMultipleAnswers ()Z
public fun getAllowPaidBroadcast ()Z public fun getAllowPaidBroadcast ()Z
public final fun getAllowsRevoting ()Z public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun getDescription ()Ljava/lang/String; public fun getDescription ()Ljava/lang/String;
public final fun getDescriptionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode; public final fun getDescriptionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun getDescriptionTextSources ()Ljava/util/List; public fun getDescriptionTextSources ()Ljava/util/List;
public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId; public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId;
public fun getDisableNotification ()Z public fun getDisableNotification ()Z
public fun getEffectId-Ts0V7ak ()Ljava/lang/String; public fun getEffectId-Ts0V7ak ()Ljava/lang/String;
public final fun getHideResultsUntilCloses ()Z public fun getHideResultsUntilCloses ()Z
public fun getOptions ()Ljava/util/List; public fun getOptions ()Ljava/util/List;
public fun getProtectContent ()Z public fun getProtectContent ()Z
public fun getQuestion ()Ljava/lang/String; public fun getQuestion ()Ljava/lang/String;
@@ -8172,7 +8178,7 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendRegularPoll : dev/i
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup; public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters; public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters;
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
public final fun getShuffleOptions ()Z public fun getShuffleOptions ()Z
public fun getSuggestedPostParameters ()Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters; public fun getSuggestedPostParameters ()Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;
public fun getTextSources ()Ljava/util/List; public fun getTextSources ()Ljava/util/List;
public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId; public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId;
@@ -23713,7 +23719,7 @@ public final class dev/inmo/tgbotapi/types/managed_bots/ManagedBotCreated$Compan
public final fun serializer ()Lkotlinx/serialization/KSerializer; public final fun serializer ()Lkotlinx/serialization/KSerializer;
} }
public final class dev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/CommonEvent { public final class dev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated {
public static final field Companion Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated$Companion;
public fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/chat/PreviewBot;)V public fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/chat/PreviewBot;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
@@ -31765,7 +31771,7 @@ public final class dev/inmo/tgbotapi/types/polls/InputPollOption$Companion : kot
public abstract interface class dev/inmo/tgbotapi/types/polls/Poll : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant { public abstract interface class dev/inmo/tgbotapi/types/polls/Poll : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant {
public static final field Companion Ldev/inmo/tgbotapi/types/polls/Poll$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/polls/Poll$Companion;
public abstract fun getAllowMultipleAnswers ()Z public abstract fun getAllowsMultipleAnswers ()Z
public abstract fun getAllowsRevoting ()Z public abstract fun getAllowsRevoting ()Z
public abstract fun getDescriptionTextSources ()Ljava/util/List; public abstract fun getDescriptionTextSources ()Ljava/util/List;
public abstract fun getId-S5FO_mE ()Ljava/lang/String; public abstract fun getId-S5FO_mE ()Ljava/lang/String;
@@ -32122,7 +32128,7 @@ public final class dev/inmo/tgbotapi/types/polls/QuizPoll : dev/inmo/tgbotapi/ty
public final fun copy-YPAypuI (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/util/List;Ljava/lang/String;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;)Ldev/inmo/tgbotapi/types/polls/QuizPoll; public final fun copy-YPAypuI (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/util/List;Ljava/lang/String;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;)Ldev/inmo/tgbotapi/types/polls/QuizPoll;
public static synthetic fun copy-YPAypuI$default (Ldev/inmo/tgbotapi/types/polls/QuizPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/util/List;Ljava/lang/String;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/polls/QuizPoll; public static synthetic fun copy-YPAypuI$default (Ldev/inmo/tgbotapi/types/polls/QuizPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/util/List;Ljava/lang/String;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/polls/QuizPoll;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getAllowMultipleAnswers ()Z public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z public fun getAllowsRevoting ()Z
public final fun getCorrectOptionIds ()Ljava/util/List; public final fun getCorrectOptionIds ()Ljava/util/List;
public fun getDescriptionTextSources ()Ljava/util/List; public fun getDescriptionTextSources ()Ljava/util/List;
@@ -32164,7 +32170,7 @@ public final class dev/inmo/tgbotapi/types/polls/RegularPoll : dev/inmo/tgbotapi
public final fun copy-dx2gcjE (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;IZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;)Ldev/inmo/tgbotapi/types/polls/RegularPoll; public final fun copy-dx2gcjE (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;IZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;)Ldev/inmo/tgbotapi/types/polls/RegularPoll;
public static synthetic fun copy-dx2gcjE$default (Ldev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;IZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/polls/RegularPoll; public static synthetic fun copy-dx2gcjE$default (Ldev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;IZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/polls/RegularPoll;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getAllowMultipleAnswers ()Z public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z public fun getAllowsRevoting ()Z
public fun getDescriptionTextSources ()Ljava/util/List; public fun getDescriptionTextSources ()Ljava/util/List;
public fun getId-S5FO_mE ()Ljava/lang/String; public fun getId-S5FO_mE ()Ljava/lang/String;
@@ -32204,7 +32210,7 @@ public final class dev/inmo/tgbotapi/types/polls/UnknownPollType : dev/inmo/tgbo
public final fun component8 ()Z public final fun component8 ()Z
public final fun component9 ()Z public final fun component9 ()Z
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getAllowMultipleAnswers ()Z public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z public fun getAllowsRevoting ()Z
public fun getDescriptionTextSources ()Ljava/util/List; public fun getDescriptionTextSources ()Ljava/util/List;
public fun getId-S5FO_mE ()Ljava/lang/String; public fun getId-S5FO_mE ()Ljava/lang/String;
@@ -35061,3 +35067,12 @@ public final class dev/inmo/tgbotapi/utils/serializers/UnitFromBooleanSerializer
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lkotlin/Unit;)V public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lkotlin/Unit;)V
} }
public final class dev/inmo/tgbotapi/utils/serializers/UsernameAtLessSerializer : kotlinx/serialization/KSerializer {
public static final field INSTANCE Ldev/inmo/tgbotapi/utils/serializers/UsernameAtLessSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public fun deserialize-BnpbnlE (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/String;
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun serialize-eC7Nk8U (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/String;)V
}

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.requests.send.polls package dev.inmo.tgbotapi.requests.send.polls
import dev.inmo.kslog.common.w
import dev.inmo.tgbotapi.abstracts.TextedInput import dev.inmo.tgbotapi.abstracts.TextedInput
import korlibs.time.DateTime import korlibs.time.DateTime
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
@@ -14,6 +15,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializ
import dev.inmo.tgbotapi.types.message.content.PollContent import dev.inmo.tgbotapi.types.message.content.PollContent
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.polls.* import dev.inmo.tgbotapi.types.polls.*
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
import korlibs.time.millisecondsLong import korlibs.time.millisecondsLong
import korlibs.time.seconds import korlibs.time.seconds
import kotlinx.serialization.* import kotlinx.serialization.*
@@ -30,15 +32,21 @@ internal fun checkPollInfo(
options: List<InputPollOption> options: List<InputPollOption>
) { ) {
if (question.length !in pollQuestionTextLength) { if (question.length !in pollQuestionTextLength) {
throw IllegalArgumentException("The length of questions for polls must be in $pollQuestionTextLength range, but was ${question.length}") DefaultKTgBotAPIKSLog.w("checkPollInfo") {
"The length of questions for polls must be in $pollQuestionTextLength range, but was ${question.length}"
}
} }
options.forEach { options.forEach {
if (it.text.length !in pollOptionTextLength) { if (it.text.length !in pollOptionTextLength) {
throw IllegalArgumentException("The length of question option text for polls must be in $pollOptionTextLength range, but was ${it.text.length}") DefaultKTgBotAPIKSLog.w("checkPollInfo") {
"The length of question option text for polls must be in $pollOptionTextLength range, but was ${it.text.length}"
}
} }
} }
if (options.size !in pollOptionsLimit) { if (options.size !in pollOptionsLimit) {
throw IllegalArgumentException("The amount of question options for polls must be in $pollOptionsLimit range, but was ${options.size}") DefaultKTgBotAPIKSLog.w("checkPollInfo") {
"The amount of question options for polls must be in $pollOptionsLimit range, but was ${options.size}"
}
} }
} }
@@ -74,7 +82,7 @@ fun SendPoll(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = false, allowsMultipleAnswers = false,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -122,7 +130,7 @@ fun SendPoll(
closeInfo = openPeriod?.asApproximateScheduledCloseInfo ?: closeDate?.asExactScheduledCloseInfo, closeInfo = openPeriod?.asApproximateScheduledCloseInfo ?: closeDate?.asExactScheduledCloseInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = false, allowsMultipleAnswers = false,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -165,7 +173,7 @@ fun Poll.createRequest(
closeInfo = scheduledCloseInfo, closeInfo = scheduledCloseInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -205,7 +213,7 @@ fun Poll.createRequest(
closeInfo = scheduledCloseInfo, closeInfo = scheduledCloseInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = false, allowsMultipleAnswers = false,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -224,7 +232,7 @@ fun Poll.createRequest(
closeInfo = scheduledCloseInfo, closeInfo = scheduledCloseInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = false, allowsMultipleAnswers = false,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -244,7 +252,9 @@ internal fun ScheduledCloseInfo.checkSendData() {
is ApproximateScheduledCloseInfo -> openDuration.seconds is ApproximateScheduledCloseInfo -> openDuration.seconds
}.toInt() }.toInt()
if (span !in openPeriodPollSecondsLimit) { if (span !in openPeriodPollSecondsLimit) {
error("Duration of autoclose for polls must be in range $openPeriodPollSecondsLimit, but was $span") DefaultKTgBotAPIKSLog.w("checkSendData") {
"Duration of autoclose for polls must be in range $openPeriodPollSecondsLimit, but was $span"
}
} }
} }
@@ -258,6 +268,12 @@ sealed class SendPoll : SendContentMessageRequest<ContentMessage<PollContent>>,
abstract val isAnonymous: Boolean abstract val isAnonymous: Boolean
abstract val isClosed: Boolean abstract val isClosed: Boolean
abstract val type: String abstract val type: String
abstract val allowsMultipleAnswers: Boolean
abstract val allowsRevoting: Boolean
abstract val shuffleOptions: Boolean
abstract val description: String?
abstract val hideResultsUntilCloses: Boolean
abstract val descriptionTextSources: TextSourcesList?
internal abstract val openPeriod: LongSeconds? internal abstract val openPeriod: LongSeconds?
internal abstract val closeDate: LongSeconds? internal abstract val closeDate: LongSeconds?

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.requests.send.polls package dev.inmo.tgbotapi.requests.send.polls
import dev.inmo.kslog.common.w
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
@@ -13,6 +14,7 @@ import dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo
import dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo import dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo
import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.InputPollOption
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
import dev.inmo.tgbotapi.utils.extensions.makeSourceString import dev.inmo.tgbotapi.utils.extensions.makeSourceString
import kotlinx.serialization.EncodeDefault import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.ExperimentalSerializationApi
@@ -40,13 +42,13 @@ class SendQuizPoll internal constructor(
@SerialName(isClosedField) @SerialName(isClosedField)
override val isClosed: Boolean = false, override val isClosed: Boolean = false,
@SerialName(allowsMultipleAnswersField) @SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false, override val allowsMultipleAnswers: Boolean = false,
@SerialName(allowsRevotingField) @SerialName(allowsRevotingField)
val allowsRevoting: Boolean = false, override val allowsRevoting: Boolean = false,
@SerialName(shuffleOptionsField) @SerialName(shuffleOptionsField)
val shuffleOptions: Boolean = false, override val shuffleOptions: Boolean = false,
@SerialName(hideResultsUntilClosesField) @SerialName(hideResultsUntilClosesField)
val hideResultsUntilCloses: Boolean = false, override val hideResultsUntilCloses: Boolean = false,
@SerialName(explanationField) @SerialName(explanationField)
val explanation: String? = null, val explanation: String? = null,
@SerialName(explanationParseModeField) @SerialName(explanationParseModeField)
@@ -54,7 +56,7 @@ class SendQuizPoll internal constructor(
@SerialName(explanationEntitiesField) @SerialName(explanationEntitiesField)
private val rawExplanationEntities: List<RawMessageEntity>? = null, private val rawExplanationEntities: List<RawMessageEntity>? = null,
@SerialName(descriptionField) @SerialName(descriptionField)
val description: String? = null, override val description: String? = null,
@SerialName(descriptionParseModeField) @SerialName(descriptionParseModeField)
val descriptionParseMode: ParseMode? = null, val descriptionParseMode: ParseMode? = null,
@SerialName(descriptionEntitiesField) @SerialName(descriptionEntitiesField)
@@ -96,7 +98,7 @@ class SendQuizPoll internal constructor(
val explanationTextEntities: List<TextSource>? by lazy { val explanationTextEntities: List<TextSource>? by lazy {
rawExplanationEntities?.asTextSources(text ?: return@lazy null) rawExplanationEntities?.asTextSources(text ?: return@lazy null)
} }
val descriptionTextSources: List<TextSource>? by lazy { override val descriptionTextSources: List<TextSource>? by lazy {
rawDescriptionEntities?.asTextSources(description ?: return@lazy null) rawDescriptionEntities?.asTextSources(description ?: return@lazy null)
} }
@@ -110,7 +112,7 @@ class SendQuizPoll internal constructor(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -137,7 +139,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = emptyList(), rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -170,7 +172,7 @@ class SendQuizPoll internal constructor(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -197,7 +199,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(), rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -230,7 +232,7 @@ class SendQuizPoll internal constructor(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -256,7 +258,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = emptyList(), rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -288,7 +290,7 @@ class SendQuizPoll internal constructor(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -314,7 +316,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(), rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -342,16 +344,19 @@ class SendQuizPoll internal constructor(
checkPollInfo(question, options) checkPollInfo(question, options)
closeInfo?.checkSendData() closeInfo?.checkSendData()
val correctOptionIdsRange = 0 until options.size val correctOptionIdsRange = 0 until options.size
correctOptionIds?.forEach { id -> correctOptionIds.forEach { id ->
if (id !in correctOptionIdsRange) { if (id !in correctOptionIdsRange) {
throw IllegalArgumentException("Correct option id must be in range of $correctOptionIdsRange, but actual " + DefaultKTgBotAPIKSLog.w("SendQuizPoll", "Correct option id must be in range of $correctOptionIdsRange, but actual " +
"value is $id") "value is $id")
} }
} }
if (explanation != null && explanation.length !in explanationLimit) { if (explanation != null && explanation.length !in explanationLimit) {
error("Quiz poll explanation size must be in range $explanationLimit," + DefaultKTgBotAPIKSLog.w("SendQuizPoll", "Quiz poll explanation size must be in range $explanationLimit," +
"but actual explanation contains ${text.length} symbols") "but actual explanation contains ${text.length} symbols")
} }
if (allowsMultipleAnswers == false && correctOptionIds.size > 1) {
DefaultKTgBotAPIKSLog.w("SendQuizPoll", "Multiple answers are disabled for current sendQuizPoll, but multiple correct options passed")
}
} }
} }
@@ -366,7 +371,7 @@ fun SendQuizPoll(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -392,7 +397,7 @@ fun SendQuizPoll(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -422,7 +427,7 @@ fun SendQuizPoll(
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -447,7 +452,7 @@ fun SendQuizPoll(
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -477,7 +482,7 @@ fun SendQuizPoll(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -501,7 +506,7 @@ fun SendQuizPoll(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,
@@ -529,7 +534,7 @@ fun SendQuizPoll(
explanationTextSources: List<TextSource>? = null, explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false, allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false, hideResultsUntilCloses: Boolean = false,
@@ -552,7 +557,7 @@ fun SendQuizPoll(
explanationTextSources = explanationTextSources, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses, hideResultsUntilCloses = hideResultsUntilCloses,

View File

@@ -41,17 +41,17 @@ class SendRegularPoll constructor(
@SerialName(isClosedField) @SerialName(isClosedField)
override val isClosed: Boolean = false, override val isClosed: Boolean = false,
@SerialName(allowsMultipleAnswersField) @SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false, override val allowsMultipleAnswers: Boolean = false,
@SerialName(allowsRevotingField) @SerialName(allowsRevotingField)
val allowsRevoting: Boolean = true, override val allowsRevoting: Boolean = true,
@SerialName(shuffleOptionsField) @SerialName(shuffleOptionsField)
val shuffleOptions: Boolean = false, override val shuffleOptions: Boolean = false,
@SerialName(allowAddingOptionsField) @SerialName(allowAddingOptionsField)
val allowAddingOptions: Boolean = false, val allowAddingOptions: Boolean = false,
@SerialName(hideResultsUntilClosesField) @SerialName(hideResultsUntilClosesField)
val hideResultsUntilCloses: Boolean = false, override val hideResultsUntilCloses: Boolean = false,
@SerialName(descriptionField) @SerialName(descriptionField)
val description: String? = null, override val description: String? = null,
@SerialName(descriptionParseModeField) @SerialName(descriptionParseModeField)
val descriptionParseMode: ParseMode? = null, val descriptionParseMode: ParseMode? = null,
@SerialName(descriptionEntitiesField) @SerialName(descriptionEntitiesField)
@@ -87,7 +87,7 @@ class SendRegularPoll constructor(
) : SendPoll() { ) : SendPoll() {
override val textSources: List<TextSource> override val textSources: List<TextSource>
get() = rawQuestionEntities.asTextSources(text) get() = rawQuestionEntities.asTextSources(text)
val descriptionTextSources: List<TextSource>? by lazy { override val descriptionTextSources: List<TextSource>? by lazy {
rawDescriptionEntities?.asTextSources(description ?: return@lazy null) rawDescriptionEntities?.asTextSources(description ?: return@lazy null)
} }
@@ -97,7 +97,7 @@ class SendRegularPoll constructor(
options: List<InputPollOption>, options: List<InputPollOption>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -124,7 +124,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(), rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -153,7 +153,7 @@ class SendRegularPoll constructor(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -180,7 +180,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = emptyList(), rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -209,7 +209,7 @@ class SendRegularPoll constructor(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -235,7 +235,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = emptyList(), rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -263,7 +263,7 @@ class SendRegularPoll constructor(
options: List<InputPollOption>, options: List<InputPollOption>,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -289,7 +289,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(), rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -333,7 +333,7 @@ fun SendRegularPoll(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -357,7 +357,7 @@ fun SendRegularPoll(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -385,7 +385,7 @@ fun SendRegularPoll(
closeInfo: ScheduledCloseInfo?, closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -408,7 +408,7 @@ fun SendRegularPoll(
options = options, options = options,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -435,7 +435,7 @@ fun SendRegularPoll(
closeInfo: ScheduledCloseInfo?, closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false, allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true, allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false, shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false, allowAddingOptions: Boolean = false,
@@ -460,7 +460,7 @@ fun SendRegularPoll(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers, allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting, allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions, shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions, allowAddingOptions = allowAddingOptions,
@@ -477,4 +477,4 @@ fun SendRegularPoll(
suggestedPostParameters = suggestedPostParameters, suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters, replyParameters = replyParameters,
replyMarkup = replyMarkup replyMarkup = replyMarkup
) )

View File

@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.types.buttons
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.request.RequestId import dev.inmo.tgbotapi.types.request.RequestId
import dev.inmo.tgbotapi.utils.serializers.UsernameAtLessSerializer
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@@ -17,6 +18,16 @@ data class KeyboardButtonRequestManagedBot(
@SerialName(suggestedNameField) @SerialName(suggestedNameField)
val suggestedName: String? = null, val suggestedName: String? = null,
@SerialName(suggestedUsernameField) @SerialName(suggestedUsernameField)
@Serializable(UsernameAtLessSerializer::class)
val suggestedUsername: Username? = null val suggestedUsername: Username? = null
) )
/**
* A type alias for the `KeyboardButtonRequestManagedBot` class representing the parameters
* for managing a bot request in a keyboard button.
*
* This type encapsulates properties such as:
* - A unique request identifier (`requestId`).
* - Suggested name and username for the bot (`suggestedName` and `suggestedUsername`).
*/
typealias RequestManagedBotParameters = KeyboardButtonRequestManagedBot

View File

@@ -9,4 +9,4 @@ import kotlinx.serialization.Serializable
data class ManagedBotUpdated( data class ManagedBotUpdated(
val user: PreviewUser, val user: PreviewUser,
val bot: PreviewBot val bot: PreviewBot
) : CommonEvent )

View File

@@ -63,7 +63,7 @@ sealed interface Poll : ReplyInfo.External.ContentVariant, TextedInput {
val votesCount: Int val votesCount: Int
val isClosed: Boolean val isClosed: Boolean
val isAnonymous: Boolean val isAnonymous: Boolean
val allowMultipleAnswers: Boolean val allowsMultipleAnswers: Boolean
val allowsRevoting: Boolean val allowsRevoting: Boolean
val scheduledCloseInfo: ScheduledCloseInfo? val scheduledCloseInfo: ScheduledCloseInfo?
val descriptionTextSources: List<TextSource> val descriptionTextSources: List<TextSource>
@@ -88,7 +88,7 @@ private class RawPoll(
@SerialName(typeField) @SerialName(typeField)
val type: String, val type: String,
@SerialName(allowsMultipleAnswersField) @SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false, val allowsMultipleAnswers: Boolean = false,
@SerialName(correctOptionIdsField) @SerialName(correctOptionIdsField)
val correctOptionIds: List<Int>? = null, val correctOptionIds: List<Int>? = null,
@SerialName(explanationField) @SerialName(explanationField)
@@ -128,7 +128,7 @@ data class UnknownPollType internal constructor(
override val isClosed: Boolean = false, override val isClosed: Boolean = false,
@SerialName(isAnonymousField) @SerialName(isAnonymousField)
override val isAnonymous: Boolean = false, override val isAnonymous: Boolean = false,
override val allowMultipleAnswers: Boolean = false, override val allowsMultipleAnswers: Boolean = false,
override val allowsRevoting: Boolean = true, override val allowsRevoting: Boolean = true,
override val descriptionTextSources: List<TextSource> = emptyList(), override val descriptionTextSources: List<TextSource> = emptyList(),
@Serializable @Serializable
@@ -152,7 +152,7 @@ data class RegularPoll(
override val votesCount: Int, override val votesCount: Int,
override val isClosed: Boolean = false, override val isClosed: Boolean = false,
override val isAnonymous: Boolean = false, override val isAnonymous: Boolean = false,
override val allowMultipleAnswers: Boolean = false, override val allowsMultipleAnswers: Boolean = false,
override val allowsRevoting: Boolean = true, override val allowsRevoting: Boolean = true,
override val scheduledCloseInfo: ScheduledCloseInfo? = null, override val scheduledCloseInfo: ScheduledCloseInfo? = null,
override val descriptionTextSources: List<TextSource> = emptyList() override val descriptionTextSources: List<TextSource> = emptyList()
@@ -170,7 +170,7 @@ data class QuizPoll(
val explanationTextSources: List<TextSource> = emptyList(), val explanationTextSources: List<TextSource> = emptyList(),
override val isClosed: Boolean = false, override val isClosed: Boolean = false,
override val isAnonymous: Boolean = false, override val isAnonymous: Boolean = false,
override val allowMultipleAnswers: Boolean = false, override val allowsMultipleAnswers: Boolean = false,
override val allowsRevoting: Boolean = false, override val allowsRevoting: Boolean = false,
override val scheduledCloseInfo: ScheduledCloseInfo? = null, override val scheduledCloseInfo: ScheduledCloseInfo? = null,
override val descriptionTextSources: List<TextSource> = emptyList() override val descriptionTextSources: List<TextSource> = emptyList()
@@ -196,7 +196,7 @@ object PollSerializer : KSerializer<Poll> {
explanationTextSources = rawPoll.explanation?.let { rawPoll.explanationEntities.asTextSources(it) } ?: emptyList(), explanationTextSources = rawPoll.explanation?.let { rawPoll.explanationEntities.asTextSources(it) } ?: emptyList(),
isClosed = rawPoll.isClosed, isClosed = rawPoll.isClosed,
isAnonymous = rawPoll.isAnonymous, isAnonymous = rawPoll.isAnonymous,
allowMultipleAnswers = rawPoll.allowMultipleAnswers, allowsMultipleAnswers = rawPoll.allowsMultipleAnswers,
allowsRevoting = rawPoll.allowsRevoting ?: false, allowsRevoting = rawPoll.allowsRevoting ?: false,
scheduledCloseInfo = rawPoll.scheduledCloseInfo, scheduledCloseInfo = rawPoll.scheduledCloseInfo,
descriptionTextSources = rawPoll.description?.let { rawPoll.descriptionEntities.asTextSources(it) } ?: emptyList() descriptionTextSources = rawPoll.description?.let { rawPoll.descriptionEntities.asTextSources(it) } ?: emptyList()
@@ -209,7 +209,7 @@ object PollSerializer : KSerializer<Poll> {
votesCount = rawPoll.votesCount, votesCount = rawPoll.votesCount,
isClosed = rawPoll.isClosed, isClosed = rawPoll.isClosed,
isAnonymous = rawPoll.isAnonymous, isAnonymous = rawPoll.isAnonymous,
allowMultipleAnswers = rawPoll.allowMultipleAnswers, allowsMultipleAnswers = rawPoll.allowsMultipleAnswers,
allowsRevoting = rawPoll.allowsRevoting ?: true, allowsRevoting = rawPoll.allowsRevoting ?: true,
scheduledCloseInfo = rawPoll.scheduledCloseInfo, scheduledCloseInfo = rawPoll.scheduledCloseInfo,
descriptionTextSources = rawPoll.description?.let { rawPoll.descriptionEntities.asTextSources(it) } ?: emptyList() descriptionTextSources = rawPoll.description?.let { rawPoll.descriptionEntities.asTextSources(it) } ?: emptyList()
@@ -239,7 +239,7 @@ object PollSerializer : KSerializer<Poll> {
isClosed = value.isClosed, isClosed = value.isClosed,
isAnonymous = value.isAnonymous, isAnonymous = value.isAnonymous,
type = regularPollType, type = regularPollType,
allowMultipleAnswers = value.allowMultipleAnswers, allowsMultipleAnswers = value.allowsMultipleAnswers,
allowsRevoting = value.allowsRevoting, allowsRevoting = value.allowsRevoting,
description = value.descriptionTextSources.makeSourceString().takeIf { it.isNotEmpty() }, description = value.descriptionTextSources.makeSourceString().takeIf { it.isNotEmpty() },
descriptionEntities = value.descriptionTextSources.toRawMessageEntities(), descriptionEntities = value.descriptionTextSources.toRawMessageEntities(),
@@ -255,7 +255,7 @@ object PollSerializer : KSerializer<Poll> {
isClosed = value.isClosed, isClosed = value.isClosed,
isAnonymous = value.isAnonymous, isAnonymous = value.isAnonymous,
type = quizPollType, type = quizPollType,
allowMultipleAnswers = value.allowMultipleAnswers, allowsMultipleAnswers = value.allowsMultipleAnswers,
correctOptionIds = value.correctOptionIds, correctOptionIds = value.correctOptionIds,
allowsRevoting = value.allowsRevoting, allowsRevoting = value.allowsRevoting,
explanation = value.explanation, explanation = value.explanation,

View File

@@ -0,0 +1,21 @@
package dev.inmo.tgbotapi.utils.serializers
import dev.inmo.tgbotapi.types.Username
import kotlinx.serialization.KSerializer
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
object UsernameAtLessSerializer : KSerializer<Username> {
override val descriptor: SerialDescriptor
get() = String.serializer().descriptor
override fun serialize(encoder: Encoder, value: Username) {
value.withoutAt.let(encoder::encodeString)
}
override fun deserialize(decoder: Decoder): Username {
return Username.prepare(decoder.decodeString())
}
}

View File

@@ -1895,7 +1895,6 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifLoginURLInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifLoginURLInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifManagedBotCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifManagedBotCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifManagedBotUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifManagedBotUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifManagedBotUpdated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMask (Ldev/inmo/tgbotapi/requests/stickers/InputSticker;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMask (Ldev/inmo/tgbotapi/requests/stickers/InputSticker;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMaskAnimatedSticker (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMaskAnimatedSticker (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMaskSimpleSticker (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMaskSimpleSticker (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -2312,8 +2311,6 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun managedBotCreatedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotCreated; public static final fun managedBotCreatedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotCreated;
public static final fun managedBotUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ManagedBotUpdate; public static final fun managedBotUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ManagedBotUpdate;
public static final fun managedBotUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ManagedBotUpdate; public static final fun managedBotUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ManagedBotUpdate;
public static final fun managedBotUpdatedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated;
public static final fun managedBotUpdatedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated;
public static final fun maskAnimatedStickerOrNull (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/MaskAnimatedSticker; public static final fun maskAnimatedStickerOrNull (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/MaskAnimatedSticker;
public static final fun maskAnimatedStickerOrThrow (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/MaskAnimatedSticker; public static final fun maskAnimatedStickerOrThrow (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/MaskAnimatedSticker;
public static final fun maskOrNull (Ldev/inmo/tgbotapi/requests/stickers/InputSticker;)Ldev/inmo/tgbotapi/requests/stickers/InputSticker$Mask; public static final fun maskOrNull (Ldev/inmo/tgbotapi/requests/stickers/InputSticker;)Ldev/inmo/tgbotapi/requests/stickers/InputSticker$Mask;

View File

@@ -237,7 +237,6 @@ import dev.inmo.tgbotapi.types.location.LiveLocation
import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.location.StaticLocation import dev.inmo.tgbotapi.types.location.StaticLocation
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated import dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia import dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia
import dev.inmo.tgbotapi.types.media.CoveredTelegramMedia import dev.inmo.tgbotapi.types.media.CoveredTelegramMedia
import dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia import dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia
@@ -2348,12 +2347,6 @@ public inline fun ForwardInfo.fromSupergroupOrThrow(): ForwardInfo.PublicChat.Fr
public inline fun <T> ForwardInfo.ifFromSupergroup(block: (ForwardInfo.PublicChat.FromSupergroup) -> T): T? = fromSupergroupOrNull() ?.let(block) public inline fun <T> ForwardInfo.ifFromSupergroup(block: (ForwardInfo.PublicChat.FromSupergroup) -> T): T? = fromSupergroupOrNull() ?.let(block)
public inline fun ChatEvent.managedBotUpdatedOrNull(): ManagedBotUpdated? = this as? dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
public inline fun ChatEvent.managedBotUpdatedOrThrow(): ManagedBotUpdated = this as dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
public inline fun <T> ChatEvent.ifManagedBotUpdated(block: (ManagedBotUpdated) -> T): T? = managedBotUpdatedOrNull() ?.let(block)
public inline fun ChatEvent.managedBotCreatedOrNull(): ManagedBotCreated? = this as? dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated public inline fun ChatEvent.managedBotCreatedOrNull(): ManagedBotCreated? = this as? dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated
public inline fun ChatEvent.managedBotCreatedOrThrow(): ManagedBotCreated = this as dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated public inline fun ChatEvent.managedBotCreatedOrThrow(): ManagedBotCreated = this as dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated

View File

@@ -21,7 +21,7 @@ val Poll.type: String
} }
@RiskFeature(RawFieldsUsageWarning) @RiskFeature(RawFieldsUsageWarning)
val Poll.allows_multiple_answers: Boolean val Poll.allows_multiple_answers: Boolean
get() = allowMultipleAnswers get() = allowsMultipleAnswers
@RiskFeature(RawFieldsUsageWarning) @RiskFeature(RawFieldsUsageWarning)
val Poll.correct_option_id: List<Int>? val Poll.correct_option_id: List<Int>?
get() = asQuizPoll() ?.correctOptionIds get() = asQuizPoll() ?.correctOptionIds

View File

@@ -47,7 +47,7 @@ data class BottomButtonParams(
fun BottomButton.setParams(params: BottomButtonParams) = setParams( fun BottomButton.setParams(params: BottomButtonParams) = setParams(
json( json(
*listOfNotNull( *listOfNotNull(
params.iconCustomEmojiId ?.let { "icon_custom_emoji_id" to params.iconCustomEmojiId }, params.iconCustomEmojiId ?.let { "icon_custom_emoji_id" to params.iconCustomEmojiId.string },
params.text ?.let { "text" to params.text }, params.text ?.let { "text" to params.text },
params.color ?.let { "color" to params.color }, params.color ?.let { "color" to params.color },
params.textColor ?.let { "text_color" to params.textColor }, params.textColor ?.let { "text_color" to params.textColor },