1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-06-04 06:37:21 +00:00

Compare commits

..

18 Commits

Author SHA1 Message Date
643133a87b add api exception (solution of #1048) + add classcasts for exceptions 2026-05-28 19:05:53 +06:00
cd56c7e257 rename functions names in NewRequestExceptionTests 2026-05-28 18:38:35 +06:00
03921092a4 Merge pull request #1042 from Dramex/fix/1008-too-many-requests-case-insensitive
Detect Too Many Requests case-insensitively (closes #1008)
2026-05-28 18:36:54 +06:00
4a09a6372e start 33.2.0 2026-05-28 18:25:55 +06:00
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
emad
4500711db4 Detect Too Many Requests descriptions case-insensitively
Telegram has been observed to return both "Bad Request: Too Many
Requests: retry after N" and "Bad Request: too Many Requests: retry
after N" (lowercase leading 't'). The current case-sensitive check
silently misses the latter and the caller never sees a
TooMuchRequestsException.

Added `ignoreCase = true` to the contains(...) check and three
regression tests covering canonical, lowercase-initial, and
all-lowercase casings.

Closes #1008
2026-04-19 03:24:16 +03: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
28 changed files with 608 additions and 279 deletions

View File

@@ -1,7 +1,69 @@
# TelegramBotAPI changelog # TelegramBotAPI changelog
## 33.2.0
## 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.2.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

@@ -275,16 +275,42 @@ public final class dev/inmo/tgbotapi/bot/RequestsExecutor$DefaultImpls {
public static fun getLog (Ldev/inmo/tgbotapi/bot/RequestsExecutor;)Ldev/inmo/kslog/common/KSLog; public static fun getLog (Ldev/inmo/tgbotapi/bot/RequestsExecutor;)Ldev/inmo/kslog/common/KSLog;
} }
public abstract class dev/inmo/tgbotapi/bot/exceptions/BotException : java/io/IOException, kotlinx/coroutines/CopyableThrowable { public final class dev/inmo/tgbotapi/bot/exceptions/ApiException : dev/inmo/tgbotapi/bot/exceptions/CommonBotException {
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public fun <init> (Ljava/lang/Integer;Ljava/lang/String;Ldev/inmo/tgbotapi/types/Response;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ljava/lang/Integer;Ljava/lang/String;Ldev/inmo/tgbotapi/types/Response;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun createCopy ()Ldev/inmo/tgbotapi/bot/exceptions/ApiException;
public synthetic fun createCopy ()Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException;
public synthetic fun createCopy ()Ljava/lang/Throwable;
public final fun getHttpResponseCode ()Ljava/lang/Integer;
public final fun getPlainResponse ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/bot/exceptions/CommonBotException : dev/inmo/tgbotapi/bot/exceptions/BotException { public abstract class dev/inmo/tgbotapi/bot/exceptions/BotException : java/io/IOException, kotlinx/coroutines/CopyableThrowable {
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun getMessage ()Ljava/lang/String;
public fun getPlainAnswer ()Ljava/lang/String;
public fun getResponse ()Ldev/inmo/tgbotapi/types/Response;
}
public abstract class dev/inmo/tgbotapi/bot/exceptions/CommonBotException : dev/inmo/tgbotapi/bot/exceptions/BotException {
public static final field Companion Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Companion;
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public abstract fun createCopy ()Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException;
}
public final class dev/inmo/tgbotapi/bot/exceptions/CommonBotException$Companion {
public final fun invoke (Ljava/lang/String;Ljava/lang/Throwable;)Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Default;
public static synthetic fun invoke$default (Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Companion;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Default;
}
public final class dev/inmo/tgbotapi/bot/exceptions/CommonBotException$Default : dev/inmo/tgbotapi/bot/exceptions/CommonBotException {
public fun <init> ()V public fun <init> ()V
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun createCopy ()Ldev/inmo/tgbotapi/bot/exceptions/BotException; public fun createCopy ()Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Default;
public synthetic fun createCopy ()Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException;
public synthetic fun createCopy ()Ljava/lang/Throwable; public synthetic fun createCopy ()Ljava/lang/Throwable;
} }
@@ -327,13 +353,13 @@ public final class dev/inmo/tgbotapi/bot/exceptions/ReplyMessageNotFoundExceptio
public abstract class dev/inmo/tgbotapi/bot/exceptions/RequestException : dev/inmo/tgbotapi/bot/exceptions/BotException { public abstract class dev/inmo/tgbotapi/bot/exceptions/RequestException : dev/inmo/tgbotapi/bot/exceptions/BotException {
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getPlainAnswer ()Ljava/lang/String; public fun getPlainAnswer ()Ljava/lang/String;
public final fun getResponse ()Ldev/inmo/tgbotapi/types/Response; public fun getResponse ()Ldev/inmo/tgbotapi/types/Response;
} }
public final class dev/inmo/tgbotapi/bot/exceptions/RequestExceptionKt { public final class dev/inmo/tgbotapi/bot/exceptions/RequestExceptionKt {
public static final fun newRequestException (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)Ldev/inmo/tgbotapi/bot/exceptions/RequestException; public static final fun newRequestException (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)Ldev/inmo/tgbotapi/bot/exceptions/BotException;
public static synthetic fun newRequestException$default (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/exceptions/RequestException; public static synthetic fun newRequestException$default (Ldev/inmo/tgbotapi/types/Response;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/exceptions/BotException;
} }
public final class dev/inmo/tgbotapi/bot/exceptions/TooMuchRequestsException : dev/inmo/tgbotapi/bot/exceptions/RequestException { public final class dev/inmo/tgbotapi/bot/exceptions/TooMuchRequestsException : dev/inmo/tgbotapi/bot/exceptions/RequestException {
@@ -8048,13 +8074,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 +8114,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 +8137,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 +8185,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 +8204,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 +23745,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 +31797,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 +32154,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 +32196,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 +32236,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 +35093,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

@@ -5,6 +5,7 @@ package dev.inmo.tgbotapi.bot.exceptions
import korlibs.time.DateTime import korlibs.time.DateTime
import dev.inmo.tgbotapi.types.Response import dev.inmo.tgbotapi.types.Response
import dev.inmo.tgbotapi.types.RetryAfterError import dev.inmo.tgbotapi.types.RetryAfterError
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
import kotlinx.coroutines.CopyableThrowable import kotlinx.coroutines.CopyableThrowable
import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.io.IOException import kotlinx.io.IOException
@@ -22,7 +23,7 @@ fun newRequestException(
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause) description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause) description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
description.contains("wrong file identifier") -> WrongFileIdentifierException(response, plainAnswer, message, cause) description.contains("wrong file identifier") -> WrongFileIdentifierException(response, plainAnswer, message, cause)
description.contains("Too Many Requests") -> TooMuchRequestsException( description.contains("Too Many Requests", ignoreCase = true) -> TooMuchRequestsException(
(response.parameters ?.error as? RetryAfterError) ?: RetryAfterError(60, DateTime.now().unixMillisLong), (response.parameters ?.error as? RetryAfterError) ?: RetryAfterError(60, DateTime.now().unixMillisLong),
response, response,
plainAnswer, plainAnswer,
@@ -35,19 +36,51 @@ fun newRequestException(
message, message,
cause cause
) )
response.errorCode != null -> ApiException(
response.errorCode,
plainAnswer,
response
)
else -> null else -> null
} }
} ?: CommonRequestException(response, plainAnswer, message, cause) } ?: CommonRequestException(response, plainAnswer, message, cause)
sealed class BotException(message: String = "Something went wrong", cause: Throwable? = null) : IOException(message, cause), CopyableThrowable<BotException> @ClassCastsIncluded
sealed class BotException(
override val message: String = "Something went wrong",
cause: Throwable? = null,
open val response: Response? = null,
open val plainAnswer: String? = null,
) : IOException(message, cause), CopyableThrowable<BotException>
class CommonBotException(message: String = "Something went wrong", cause: Throwable? = null) : BotException(message, cause) { sealed class CommonBotException(
override fun createCopy(): BotException = CommonBotException(message!!, cause) message: String = "Something went wrong",
cause: Throwable? = null,
response: Response? = null,
plainAnswer: String? = null,
) : BotException(message, cause, response, plainAnswer) {
class Default(message: String = "Something went wrong", cause: Throwable? = null) : CommonBotException(message, cause) {
override fun createCopy(): Default = Default(message, cause)
}
abstract override fun createCopy(): CommonBotException?
companion object {
operator fun invoke(message: String = "Something went wrong", cause: Throwable? = null) = Default(message, cause)
}
}
class ApiException(
val httpResponseCode: Int?,
val plainResponse: String,
response: Response? = null,
) :
CommonBotException("$httpResponseCode: $plainResponse", null, response, plainResponse) {
override fun createCopy(): ApiException = ApiException(httpResponseCode, plainResponse, response)
} }
sealed class RequestException ( sealed class RequestException (
val response: Response, override val response: Response,
val plainAnswer: String, override val plainAnswer: String,
message: String? = null, message: String? = null,
cause: Throwable? = null cause: Throwable? = null
) : BotException( ) : BotException(

View File

@@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.bot.ktor.base
import dev.inmo.kslog.common.* import dev.inmo.kslog.common.*
import dev.inmo.micro_utils.coroutines.runCatchingLogging import dev.inmo.micro_utils.coroutines.runCatchingLogging
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
import dev.inmo.tgbotapi.bot.exceptions.ApiException
import dev.inmo.tgbotapi.bot.exceptions.BotException import dev.inmo.tgbotapi.bot.exceptions.BotException
import dev.inmo.tgbotapi.bot.exceptions.CommonBotException import dev.inmo.tgbotapi.bot.exceptions.CommonBotException
import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
@@ -98,7 +99,15 @@ class DefaultKtorRequestsExecutor internal constructor(
) )
} }
exceptionResult.exceptionOrNull() ?.let { exceptionResult.exceptionOrNull() ?.let {
CommonBotException(cause = e) val prehandledException = runCatching {
when {
it is ResponseException -> ApiException(it.response.status.value, it.response.bodyAsText())
else -> null
}
}.getOrElse {
null
}
prehandledException ?: CommonBotException(cause = e)
} ?: exceptionResult.getOrThrow() } ?: exceptionResult.getOrThrow()
} }
is CancellationException, is CancellationException,

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

@@ -0,0 +1,39 @@
package dev.inmo.tgbotapi.bot.exceptions
import dev.inmo.tgbotapi.types.Response
import kotlin.test.Test
import kotlin.test.assertIs
/**
* Regression tests for https://github.com/InsanusMokrassar/TelegramBotAPI/issues/1008 —
* Telegram's "Too Many Requests" response is case-inconsistent (both
* `Too Many Requests` and `too Many Requests` have been observed), so the
* description match must be case-insensitive.
*/
class NewRequestExceptionTests {
private fun buildException(description: String) = newRequestException(
response = Response(ok = false, description = description, errorCode = 429),
plainAnswer = "{\"ok\":false}"
)
@Test
fun tooMuchRequestsExceptionIsCreatedForCanonicalCasing() {
assertIs<TooMuchRequestsException>(
buildException("Bad Request: Too Many Requests: retry after 8")
)
}
@Test
fun tooMuchRequestsExceptionIsCreatedForLowercaseFirstLetterCasing() {
assertIs<TooMuchRequestsException>(
buildException("Bad Request: too Many Requests: retry after 8")
)
}
@Test
fun tooMuchRequestsExceptionIsCreatedForAllLowercaseCasing() {
assertIs<TooMuchRequestsException>(
buildException("Bad Request: too many requests: retry after 8")
)
}
}

View File

@@ -1094,6 +1094,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun anonymousGroupContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/AnonymousGroupContentMessage; public static final fun anonymousGroupContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/AnonymousGroupContentMessage;
public static final fun anyOrNull (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;)Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers$Any; public static final fun anyOrNull (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;)Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers$Any;
public static final fun anyOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;)Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers$Any; public static final fun anyOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;)Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers$Any;
public static final fun apiExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/ApiException;
public static final fun apiExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/ApiException;
public static final fun approximateScheduledCloseInfoOrNull (Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;)Ldev/inmo/tgbotapi/types/polls/ApproximateScheduledCloseInfo; public static final fun approximateScheduledCloseInfoOrNull (Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;)Ldev/inmo/tgbotapi/types/polls/ApproximateScheduledCloseInfo;
public static final fun approximateScheduledCloseInfoOrThrow (Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;)Ldev/inmo/tgbotapi/types/polls/ApproximateScheduledCloseInfo; public static final fun approximateScheduledCloseInfoOrThrow (Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;)Ldev/inmo/tgbotapi/types/polls/ApproximateScheduledCloseInfo;
public static final fun audioContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/AudioContent; public static final fun audioContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/AudioContent;
@@ -1260,6 +1262,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun chosenInlineResultUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate; public static final fun chosenInlineResultUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;
public static final fun codeTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource; public static final fun codeTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource;
public static final fun codeTextSourceOrThrow (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource; public static final fun codeTextSourceOrThrow (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource;
public static final fun commonBotExceptionDefaultOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Default;
public static final fun commonBotExceptionDefaultOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException$Default;
public static final fun commonBotExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException;
public static final fun commonBotExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/CommonBotException;
public static final fun commonBotOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/CommonBot; public static final fun commonBotOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/CommonBot;
public static final fun commonBotOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/CommonBot; public static final fun commonBotOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/CommonBot;
public static final fun commonChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonChannelDirectMessagesContentMessage; public static final fun commonChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonChannelDirectMessagesContentMessage;
@@ -1294,6 +1300,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun commonPassportOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/CommonPassport; public static final fun commonPassportOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/CommonPassport;
public static final fun commonPassportSecureValueOrNull (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/CommonPassportSecureValue; public static final fun commonPassportSecureValueOrNull (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/CommonPassportSecureValue;
public static final fun commonPassportSecureValueOrThrow (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/CommonPassportSecureValue; public static final fun commonPassportSecureValueOrThrow (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/CommonPassportSecureValue;
public static final fun commonRequestExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/CommonRequestException;
public static final fun commonRequestExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/CommonRequestException;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage; public static final fun commonSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage; public static final fun commonSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage; public static final fun commonSuggestedChannelDirectMessagesContentMessageOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
@@ -1516,6 +1524,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun generalForumTopicHiddenOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicHidden; public static final fun generalForumTopicHiddenOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicHidden;
public static final fun generalForumTopicUnhiddenOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicUnhidden; public static final fun generalForumTopicUnhiddenOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicUnhidden;
public static final fun generalForumTopicUnhiddenOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicUnhidden; public static final fun generalForumTopicUnhiddenOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicUnhidden;
public static final fun getUpdatesConflictOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/GetUpdatesConflict;
public static final fun getUpdatesConflictOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/GetUpdatesConflict;
public static final fun giftCodeOrNull (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;)Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource$GiftCode; public static final fun giftCodeOrNull (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;)Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource$GiftCode;
public static final fun giftCodeOrThrow (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;)Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource$GiftCode; public static final fun giftCodeOrThrow (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;)Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource$GiftCode;
public static final fun giftSentOrReceivedEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceivedEvent; public static final fun giftSentOrReceivedEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceivedEvent;
@@ -1592,6 +1602,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifAnonymousForumContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifAnonymousForumContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifAnonymousGroupContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifAnonymousGroupContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifAny (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifAny (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifApiException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifApproximateScheduledCloseInfo (Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifApproximateScheduledCloseInfo (Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifAudioContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifAudioContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifAudioFile (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifAudioFile (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -1677,6 +1688,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommon (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommon (Ldev/inmo/tgbotapi/types/buttons/KeyboardButtonRequestUsers;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonBot (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonBot (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonBotException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonBotExceptionDefault (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonChannelDirectMessagesEventMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonChannelDirectMessagesEventMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -1692,6 +1705,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifCommonMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonPassport (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonPassport (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonPassportSecureValue (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonPassportSecureValue (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonRequestException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSupergroupEventMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifCommonSupergroupEventMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -1803,6 +1817,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifGameShortNameCallbackQuery (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGameShortNameCallbackQuery (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGeneralForumTopicHidden (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGeneralForumTopicHidden (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGeneralForumTopicUnhidden (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGeneralForumTopicUnhidden (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGetUpdatesConflict (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiftCode (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiftCode (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiftSentOrReceivedEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiftSentOrReceivedEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiftSentOrReceivedEventReceivedInBusinessAccount (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiftSentOrReceivedEventReceivedInBusinessAccount (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -1881,6 +1896,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifInternal (Ldev/inmo/tgbotapi/types/ReplyInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifInternal (Ldev/inmo/tgbotapi/types/ReplyInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifInternalPassport (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifInternalPassport (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifInternalPassportSecureValue (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifInternalPassportSecureValue (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifInvalidPhotoDimensionsException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifInvoiceContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifInvoiceContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifItalicTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifItalicTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifKickedChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifKickedChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -1895,7 +1911,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;
@@ -1915,6 +1930,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifMessageContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMessageContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMessageDataCallbackQuery (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMessageDataCallbackQuery (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMessageGameShortNameCallbackQuery (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMessageGameShortNameCallbackQuery (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMessageIsNotModifiedException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMessageToEditNotFoundException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMessageUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMessageUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMigratedToSupergroup (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMigratedToSupergroup (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifMimedMediaFile (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifMimedMediaFile (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -2038,6 +2055,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifReplyForce (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifReplyForce (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifReplyKeyboardMarkup (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifReplyKeyboardMarkup (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifReplyKeyboardRemove (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifReplyKeyboardRemove (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifReplyMessageNotFoundException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifRequestException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifRestrictedChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifRestrictedChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifRestrictedMemberChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifRestrictedMemberChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSecondaryChatInviteLink (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifSecondaryChatInviteLink (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -2114,9 +2133,11 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifTitledInlineQueryResult (Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTitledInlineQueryResult (Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifTitledTelegramMedia (Ldev/inmo/tgbotapi/types/media/TelegramMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTitledTelegramMedia (Ldev/inmo/tgbotapi/types/media/TelegramMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifToStory (Ldev/inmo/tgbotapi/types/ReplyInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifToStory (Ldev/inmo/tgbotapi/types/ReplyInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifTooMuchRequestsException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifTypingAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTypingAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifURLInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifURLInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifURLTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifURLTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifUnauthorizedException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifUnconnectedFromChannelGroupContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifUnconnectedFromChannelGroupContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifUnderlineTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifUnderlineTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifUnknown (Ldev/inmo/tgbotapi/requests/answers/InlineQueryResultsButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifUnknown (Ldev/inmo/tgbotapi/requests/answers/InlineQueryResultsButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -2190,6 +2211,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifWriteAccessAllowedFromRequest (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifWriteAccessAllowedFromRequest (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifWriteAccessAllowedFromWebAppLink (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifWriteAccessAllowedFromWebAppLink (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifWriteAccessAllowedOther (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifWriteAccessAllowedOther (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifWrongFileIdentifierException (Ldev/inmo/tgbotapi/bot/exceptions/BotException;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun inaccessibleMessageCallbackQueryOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/InaccessibleMessageCallbackQuery; public static final fun inaccessibleMessageCallbackQueryOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/InaccessibleMessageCallbackQuery;
public static final fun inaccessibleMessageCallbackQueryOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/InaccessibleMessageCallbackQuery; public static final fun inaccessibleMessageCallbackQueryOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/InaccessibleMessageCallbackQuery;
public static final fun inaccessibleMessageDataCallbackQueryOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/InaccessibleMessageDataCallbackQuery; public static final fun inaccessibleMessageDataCallbackQueryOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/InaccessibleMessageDataCallbackQuery;
@@ -2284,6 +2306,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun internalPassportOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/InternalPassport; public static final fun internalPassportOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/InternalPassport;
public static final fun internalPassportSecureValueOrNull (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/InternalPassportSecureValue; public static final fun internalPassportSecureValueOrNull (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/InternalPassportSecureValue;
public static final fun internalPassportSecureValueOrThrow (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/InternalPassportSecureValue; public static final fun internalPassportSecureValueOrThrow (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/InternalPassportSecureValue;
public static final fun invalidPhotoDimensionsExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/InvalidPhotoDimensionsException;
public static final fun invalidPhotoDimensionsExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/InvalidPhotoDimensionsException;
public static final fun invoiceContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/InvoiceContent; public static final fun invoiceContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/InvoiceContent;
public static final fun invoiceContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/InvoiceContent; public static final fun invoiceContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/InvoiceContent;
public static final fun italicTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/ItalicTextSource; public static final fun italicTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/ItalicTextSource;
@@ -2312,8 +2336,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;
@@ -2352,6 +2374,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun messageDataCallbackQueryOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/MessageDataCallbackQuery; public static final fun messageDataCallbackQueryOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/MessageDataCallbackQuery;
public static final fun messageGameShortNameCallbackQueryOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/MessageGameShortNameCallbackQuery; public static final fun messageGameShortNameCallbackQueryOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/MessageGameShortNameCallbackQuery;
public static final fun messageGameShortNameCallbackQueryOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/MessageGameShortNameCallbackQuery; public static final fun messageGameShortNameCallbackQueryOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/queries/callback/MessageGameShortNameCallbackQuery;
public static final fun messageIsNotModifiedExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/MessageIsNotModifiedException;
public static final fun messageIsNotModifiedExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/MessageIsNotModifiedException;
public static final fun messageToEditNotFoundExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/MessageToEditNotFoundException;
public static final fun messageToEditNotFoundExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/MessageToEditNotFoundException;
public static final fun messageUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; public static final fun messageUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/MessageUpdate;
public static final fun messageUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; public static final fun messageUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/MessageUpdate;
public static final fun migratedToSupergroupOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/MigratedToSupergroup; public static final fun migratedToSupergroupOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/MigratedToSupergroup;
@@ -2598,6 +2624,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun replyKeyboardMarkupOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardMarkup; public static final fun replyKeyboardMarkupOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardMarkup;
public static final fun replyKeyboardRemoveOrNull (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardRemove; public static final fun replyKeyboardRemoveOrNull (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardRemove;
public static final fun replyKeyboardRemoveOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardRemove; public static final fun replyKeyboardRemoveOrThrow (Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/types/buttons/ReplyKeyboardRemove;
public static final fun replyMessageNotFoundExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/ReplyMessageNotFoundException;
public static final fun replyMessageNotFoundExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/ReplyMessageNotFoundException;
public static final fun requestExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/RequestException;
public static final fun requestExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/RequestException;
public static final fun restrictedChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedChatMember; public static final fun restrictedChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedChatMember;
public static final fun restrictedChatMemberOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedChatMember; public static final fun restrictedChatMemberOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedChatMember;
public static final fun restrictedMemberChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedMemberChatMember; public static final fun restrictedMemberChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/RestrictedMemberChatMember;
@@ -2750,12 +2780,16 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun titledTelegramMediaOrThrow (Ldev/inmo/tgbotapi/types/media/TelegramMedia;)Ldev/inmo/tgbotapi/types/media/TitledTelegramMedia; public static final fun titledTelegramMediaOrThrow (Ldev/inmo/tgbotapi/types/media/TelegramMedia;)Ldev/inmo/tgbotapi/types/media/TitledTelegramMedia;
public static final fun toStoryOrNull (Ldev/inmo/tgbotapi/types/ReplyInfo;)Ldev/inmo/tgbotapi/types/ReplyInfo$ToStory; public static final fun toStoryOrNull (Ldev/inmo/tgbotapi/types/ReplyInfo;)Ldev/inmo/tgbotapi/types/ReplyInfo$ToStory;
public static final fun toStoryOrThrow (Ldev/inmo/tgbotapi/types/ReplyInfo;)Ldev/inmo/tgbotapi/types/ReplyInfo$ToStory; public static final fun toStoryOrThrow (Ldev/inmo/tgbotapi/types/ReplyInfo;)Ldev/inmo/tgbotapi/types/ReplyInfo$ToStory;
public static final fun tooMuchRequestsExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/TooMuchRequestsException;
public static final fun tooMuchRequestsExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/TooMuchRequestsException;
public static final fun typingActionOrNull (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/TypingAction; public static final fun typingActionOrNull (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/TypingAction;
public static final fun typingActionOrThrow (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/TypingAction; public static final fun typingActionOrThrow (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/TypingAction;
public static final fun uRLInlineKeyboardButtonOrNull (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/URLInlineKeyboardButton; public static final fun uRLInlineKeyboardButtonOrNull (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/URLInlineKeyboardButton;
public static final fun uRLInlineKeyboardButtonOrThrow (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/URLInlineKeyboardButton; public static final fun uRLInlineKeyboardButtonOrThrow (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/URLInlineKeyboardButton;
public static final fun uRLTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/URLTextSource; public static final fun uRLTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/URLTextSource;
public static final fun uRLTextSourceOrThrow (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/URLTextSource; public static final fun uRLTextSourceOrThrow (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/URLTextSource;
public static final fun unauthorizedExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/UnauthorizedException;
public static final fun unauthorizedExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/UnauthorizedException;
public static final fun unconnectedFromChannelGroupContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage; public static final fun unconnectedFromChannelGroupContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage;
public static final fun unconnectedFromChannelGroupContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage; public static final fun unconnectedFromChannelGroupContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage;
public static final fun underlineTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/UnderlineTextSource; public static final fun underlineTextSourceOrNull (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/UnderlineTextSource;
@@ -2902,6 +2936,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun writeAccessAllowedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed; public static final fun writeAccessAllowedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed;
public static final fun writeAccessAllowedOtherOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed$Other; public static final fun writeAccessAllowedOtherOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed$Other;
public static final fun writeAccessAllowedOtherOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed$Other; public static final fun writeAccessAllowedOtherOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/WriteAccessAllowed$Other;
public static final fun wrongFileIdentifierExceptionOrNull (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/WrongFileIdentifierException;
public static final fun wrongFileIdentifierExceptionOrThrow (Ldev/inmo/tgbotapi/bot/exceptions/BotException;)Ldev/inmo/tgbotapi/bot/exceptions/WrongFileIdentifierException;
} }
public final class dev/inmo/tgbotapi/extensions/utils/CommonMessageConversationsKt { public final class dev/inmo/tgbotapi/extensions/utils/CommonMessageConversationsKt {

View File

@@ -14,6 +14,19 @@ import dev.inmo.tgbotapi.abstracts.FromUser
import dev.inmo.tgbotapi.abstracts.OptionallyFromUser import dev.inmo.tgbotapi.abstracts.OptionallyFromUser
import dev.inmo.tgbotapi.abstracts.OptionallyWithUser import dev.inmo.tgbotapi.abstracts.OptionallyWithUser
import dev.inmo.tgbotapi.abstracts.WithUser import dev.inmo.tgbotapi.abstracts.WithUser
import dev.inmo.tgbotapi.bot.exceptions.ApiException
import dev.inmo.tgbotapi.bot.exceptions.BotException
import dev.inmo.tgbotapi.bot.exceptions.CommonBotException
import dev.inmo.tgbotapi.bot.exceptions.CommonRequestException
import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
import dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException
import dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException
import dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException
import dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException
import dev.inmo.tgbotapi.bot.exceptions.RequestException
import dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException
import dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException
import dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException
import dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton import dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
@@ -237,7 +250,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 +2360,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
@@ -4178,6 +4184,84 @@ public inline fun BackgroundFill.unknownOrThrow(): BackgroundFill.Unknown = this
public inline fun <T> BackgroundFill.ifUnknown(block: (BackgroundFill.Unknown) -> T): T? = unknownOrNull() ?.let(block) public inline fun <T> BackgroundFill.ifUnknown(block: (BackgroundFill.Unknown) -> T): T? = unknownOrNull() ?.let(block)
public inline fun BotException.commonBotExceptionOrNull(): CommonBotException? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonBotException
public inline fun BotException.commonBotExceptionOrThrow(): CommonBotException = this as dev.inmo.tgbotapi.bot.exceptions.CommonBotException
public inline fun <T> BotException.ifCommonBotException(block: (CommonBotException) -> T): T? = commonBotExceptionOrNull() ?.let(block)
public inline fun BotException.apiExceptionOrNull(): ApiException? = this as? dev.inmo.tgbotapi.bot.exceptions.ApiException
public inline fun BotException.apiExceptionOrThrow(): ApiException = this as dev.inmo.tgbotapi.bot.exceptions.ApiException
public inline fun <T> BotException.ifApiException(block: (ApiException) -> T): T? = apiExceptionOrNull() ?.let(block)
public inline fun BotException.requestExceptionOrNull(): RequestException? = this as? dev.inmo.tgbotapi.bot.exceptions.RequestException
public inline fun BotException.requestExceptionOrThrow(): RequestException = this as dev.inmo.tgbotapi.bot.exceptions.RequestException
public inline fun <T> BotException.ifRequestException(block: (RequestException) -> T): T? = requestExceptionOrNull() ?.let(block)
public inline fun BotException.commonRequestExceptionOrNull(): CommonRequestException? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonRequestException
public inline fun BotException.commonRequestExceptionOrThrow(): CommonRequestException = this as dev.inmo.tgbotapi.bot.exceptions.CommonRequestException
public inline fun <T> BotException.ifCommonRequestException(block: (CommonRequestException) -> T): T? = commonRequestExceptionOrNull() ?.let(block)
public inline fun BotException.unauthorizedExceptionOrNull(): UnauthorizedException? = this as? dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException
public inline fun BotException.unauthorizedExceptionOrThrow(): UnauthorizedException = this as dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException
public inline fun <T> BotException.ifUnauthorizedException(block: (UnauthorizedException) -> T): T? = unauthorizedExceptionOrNull() ?.let(block)
public inline fun BotException.replyMessageNotFoundExceptionOrNull(): ReplyMessageNotFoundException? = this as? dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException
public inline fun BotException.replyMessageNotFoundExceptionOrThrow(): ReplyMessageNotFoundException = this as dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException
public inline fun <T> BotException.ifReplyMessageNotFoundException(block: (ReplyMessageNotFoundException) -> T): T? = replyMessageNotFoundExceptionOrNull() ?.let(block)
public inline fun BotException.messageIsNotModifiedExceptionOrNull(): MessageIsNotModifiedException? = this as? dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException
public inline fun BotException.messageIsNotModifiedExceptionOrThrow(): MessageIsNotModifiedException = this as dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException
public inline fun <T> BotException.ifMessageIsNotModifiedException(block: (MessageIsNotModifiedException) -> T): T? = messageIsNotModifiedExceptionOrNull() ?.let(block)
public inline fun BotException.messageToEditNotFoundExceptionOrNull(): MessageToEditNotFoundException? = this as? dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException
public inline fun BotException.messageToEditNotFoundExceptionOrThrow(): MessageToEditNotFoundException = this as dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException
public inline fun <T> BotException.ifMessageToEditNotFoundException(block: (MessageToEditNotFoundException) -> T): T? = messageToEditNotFoundExceptionOrNull() ?.let(block)
public inline fun BotException.invalidPhotoDimensionsExceptionOrNull(): InvalidPhotoDimensionsException? = this as? dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException
public inline fun BotException.invalidPhotoDimensionsExceptionOrThrow(): InvalidPhotoDimensionsException = this as dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException
public inline fun <T> BotException.ifInvalidPhotoDimensionsException(block: (InvalidPhotoDimensionsException) -> T): T? = invalidPhotoDimensionsExceptionOrNull() ?.let(block)
public inline fun BotException.wrongFileIdentifierExceptionOrNull(): WrongFileIdentifierException? = this as? dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException
public inline fun BotException.wrongFileIdentifierExceptionOrThrow(): WrongFileIdentifierException = this as dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException
public inline fun <T> BotException.ifWrongFileIdentifierException(block: (WrongFileIdentifierException) -> T): T? = wrongFileIdentifierExceptionOrNull() ?.let(block)
public inline fun BotException.tooMuchRequestsExceptionOrNull(): TooMuchRequestsException? = this as? dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException
public inline fun BotException.tooMuchRequestsExceptionOrThrow(): TooMuchRequestsException = this as dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException
public inline fun <T> BotException.ifTooMuchRequestsException(block: (TooMuchRequestsException) -> T): T? = tooMuchRequestsExceptionOrNull() ?.let(block)
public inline fun BotException.getUpdatesConflictOrNull(): GetUpdatesConflict? = this as? dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
public inline fun BotException.getUpdatesConflictOrThrow(): GetUpdatesConflict = this as dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
public inline fun <T> BotException.ifGetUpdatesConflict(block: (GetUpdatesConflict) -> T): T? = getUpdatesConflictOrNull() ?.let(block)
public inline fun BotException.commonBotExceptionDefaultOrNull(): CommonBotException.Default? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonBotException.Default
public inline fun BotException.commonBotExceptionDefaultOrThrow(): CommonBotException.Default = this as dev.inmo.tgbotapi.bot.exceptions.CommonBotException.Default
public inline fun <T> BotException.ifCommonBotExceptionDefault(block: (CommonBotException.Default) -> T): T? = commonBotExceptionDefaultOrNull() ?.let(block)
public inline fun InlineQueryResultsButton.webAppOrNull(): InlineQueryResultsButton.WebApp? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp public inline fun InlineQueryResultsButton.webAppOrNull(): InlineQueryResultsButton.WebApp? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp
public inline fun InlineQueryResultsButton.webAppOrThrow(): InlineQueryResultsButton.WebApp = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp public inline fun InlineQueryResultsButton.webAppOrThrow(): InlineQueryResultsButton.WebApp = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp

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 },