From 8b0e0bf820b6e24f0462cf471673daea3afbb26b Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 14 Aug 2026 20:16:47 +0600 Subject: [PATCH] fix of Replyparameters calls --- CHANGELOG.md | 4 +- .../extensions/api/LiveLocationProvider.kt | 4 +- .../tgbotapi/extensions/api/send/Replies.kt | 150 ++++++------- .../api/send/RepliesWithChatsAndMessages.kt | 144 ++++++------- .../extensions/EnablePrivacyPolicyCommand.kt | 4 +- tgbotapi.core/api/tgbotapi.core.api | 40 ++-- .../inmo/tgbotapi/types/ReplyParameters.kt | 201 ++++++++++++++---- .../types/message/content/Abstracts.kt | 2 +- .../types/ReplyParametersSerializationTest.kt | 2 +- 9 files changed, 339 insertions(+), 212 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fc5ca4fae..f02f8d4065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,11 @@ **Breaking changes**: -* `ReplyParameters` is now a sealed interface with nested `ReplyParameters.Chat` and `ReplyParameters.Ephemeral` implementations; migrate regular-message constructor calls to `ReplyParameters.Chat(...)` and ephemeral-message constructor calls to `ReplyParameters.Ephemeral(...)` +* `ReplyParameters` is now a sealed interface with nested `ReplyParameters.Chat` and `ReplyParameters.Ephemeral` implementations; regular-message construction uses `ReplyParameters(...)` companion factories returning `ReplyParameters.Chat`, and ephemeral-message construction uses `ReplyParameters.Ephemeral(...)` * The 4 group-family message implementations (`CommonGroupContentMessageImpl`, `CommonForumContentMessageImpl`, `CommonChannelDirectMessagesContentMessageImpl`, `CommonSuggestedChannelDirectMessagesContentMessageImpl`) gained trailing `receiverUser`/`ephemeralMessageId` primary-constructor parameters (defaulted to `null`) — positional construction of these classes must be updated * `reply(to = ...)` overloads for the 13 ephemeral-capable senders (see below) now detect an ephemeral `to` target (`to is PossiblyEphemeralMessage && to.ephemeralMessageId != null`) and automatically address the reply through `ephemeral_message_id`, sending the outgoing message itself as ephemeral to the same receiver — this is a behavior change for any existing code that replies to a message carrying a non-null `ephemeralMessageId` -**Migration advice**: Replace `ReplyParameters(...)` with `ReplyParameters.Chat(...)` for chat messages or `ReplyParameters.Ephemeral(...)` for ephemeral messages; pass `receiverUser`/`ephemeralMessageId` explicitly (or rely on their `null` default) when constructing the 4 group-family message implementations positionally +**Migration advice**: Keep `ReplyParameters(...)` for chat messages or use `ReplyParameters.Ephemeral(...)` for ephemeral messages; pass `receiverUser`/`ephemeralMessageId` explicitly (or rely on their `null` default) when constructing the 4 group-family message implementations positionally * `Core`: * (`Rich Messages`) Added `InputRichBlock` hierarchy with all 21 `InputRichBlock*` types (mirroring the received `RichBlock*` hierarchy and reusing `RichText`/`RichBlockCaption`/`RichBlockTableCell`), the label-less `InputRichBlockListItem` and the `InputRichBlockSerializer`; every `InputRichBlock` exposes `subBlocks` navigation diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt index 1921bb2b6d..360f3f743e 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt @@ -311,7 +311,7 @@ public suspend inline fun TelegramBot.replyWithLiveLocation( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), + replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup = replyMarkup ) @@ -353,6 +353,6 @@ public suspend inline fun TelegramBot.replyWithLiveLocation( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), + replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup = replyMarkup ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt index c8111cf5d6..ec6dae927e 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt @@ -84,7 +84,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -128,7 +128,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -171,7 +171,7 @@ public suspend inline fun TelegramBot.replyWithDice( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -240,7 +240,7 @@ public suspend inline fun TelegramBot.replyWithChecklist( disableNotification = disableNotification, protectContent = protectContent, effectId = effectId, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -267,7 +267,7 @@ public suspend inline fun TelegramBot.replyWithChecklist( disableNotification = disableNotification, protectContent = protectContent, effectId = effectId, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -295,7 +295,7 @@ public suspend inline fun TelegramBot.reply( disableNotification = disableNotification, protectContent = protectContent, effectId = effectId, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -322,7 +322,7 @@ public suspend inline fun TelegramBot.reply( disableNotification = disableNotification, protectContent = protectContent, effectId = effectId, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -371,7 +371,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -415,7 +415,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -466,7 +466,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -512,7 +512,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -663,7 +663,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -716,7 +716,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -756,7 +756,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -795,7 +795,7 @@ public suspend inline fun TelegramBot.replyWithGame( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -831,7 +831,7 @@ public suspend inline fun TelegramBot.replyWithGame( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -924,7 +924,7 @@ public suspend inline fun TelegramBot.replyWithAnimation( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -978,7 +978,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1032,7 +1032,7 @@ public suspend inline fun TelegramBot.replyWithAnimation( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1084,7 +1084,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1139,7 +1139,7 @@ public suspend inline fun TelegramBot.replyWithAudio( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1185,7 +1185,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1235,7 +1235,7 @@ public suspend inline fun TelegramBot.replyWithAudio( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1279,7 +1279,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1329,7 +1329,7 @@ public suspend inline fun TelegramBot.replyWithDocument( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1375,7 +1375,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1421,7 +1421,7 @@ public suspend inline fun TelegramBot.replyWithDocument( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1465,7 +1465,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1505,7 +1505,7 @@ public suspend inline fun TelegramBot.replyWithMediaGroup( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1539,7 +1539,7 @@ public suspend inline fun TelegramBot.replyWithPlaylist( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1573,7 +1573,7 @@ public suspend inline fun TelegramBot.replyWithDocuments( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1607,7 +1607,7 @@ public suspend inline fun TelegramBot.replyWithGallery( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( metaInfo = to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1657,7 +1657,7 @@ public suspend inline fun TelegramBot.replyWithPhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1705,7 +1705,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1753,7 +1753,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1800,7 +1800,7 @@ public suspend inline fun TelegramBot.replyWithPhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1846,7 +1846,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1892,7 +1892,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1937,7 +1937,7 @@ public suspend inline fun TelegramBot.replyWithSticker( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -1979,7 +1979,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2040,7 +2040,7 @@ public suspend inline fun TelegramBot.replyWithVideo( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2090,7 +2090,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2146,7 +2146,7 @@ public suspend inline fun TelegramBot.replyWithVideo( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2194,7 +2194,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, @@ -2247,7 +2247,7 @@ public suspend inline fun TelegramBot.replyWithLivePhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2295,7 +2295,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2343,7 +2343,7 @@ public suspend inline fun TelegramBot.replyWithLivePhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, @@ -2389,7 +2389,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat( + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters( message = to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, @@ -2438,7 +2438,7 @@ public suspend inline fun TelegramBot.replyWithVideoNote( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2473,7 +2473,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2517,7 +2517,7 @@ public suspend inline fun TelegramBot.replyWithVoice( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2556,7 +2556,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2596,7 +2596,7 @@ public suspend inline fun TelegramBot.replyWithVoice( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2633,7 +2633,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = to.ephemeralReplyParametersOrNull(allowSendingWithoutReply) ?: ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2701,7 +2701,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2745,7 +2745,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2792,7 +2792,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2836,7 +2836,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2878,7 +2878,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2920,7 +2920,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2971,7 +2971,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3024,7 +3024,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3073,7 +3073,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3124,7 +3124,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3173,7 +3173,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3224,7 +3224,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3271,7 +3271,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3319,7 +3319,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3503,7 +3503,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3613,7 +3613,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup, ) ) @@ -3651,7 +3651,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) /** @@ -3690,7 +3690,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) } @@ -3730,7 +3730,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) } @@ -4320,7 +4320,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, suggestedPostParameters = suggestedPostParameters, replyMarkup = replyMarkup, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( messageId = to.messageId, chatIdentifier = to.chat.id, allowSendingWithoutReply = allowSendingWithoutReply, @@ -4366,7 +4366,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, suggestedPostParameters = suggestedPostParameters, replyMarkup = replyMarkup, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( messageId = to.messageId, chatIdentifier = to.chat.id, allowSendingWithoutReply = allowSendingWithoutReply, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt index 48151e37e1..2991d80e5b 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt @@ -84,7 +84,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -124,7 +124,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -163,7 +163,7 @@ public suspend inline fun TelegramBot.replyWithDice( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -234,7 +234,7 @@ public suspend inline fun TelegramBot.replyWithChecklist( disableNotification = disableNotification, protectContent = protectContent, effectId = effectId, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -262,7 +262,7 @@ public suspend inline fun TelegramBot.reply( disableNotification = disableNotification, protectContent = protectContent, effectId = effectId, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -307,7 +307,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -347,7 +347,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -394,7 +394,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -436,7 +436,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -583,7 +583,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -632,7 +632,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -668,7 +668,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -703,7 +703,7 @@ public suspend inline fun TelegramBot.replyWithGame( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -735,7 +735,7 @@ public suspend inline fun TelegramBot.replyWithGame( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -826,7 +826,7 @@ public suspend inline fun TelegramBot.replyWithAnimation( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -876,7 +876,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -926,7 +926,7 @@ public suspend inline fun TelegramBot.replyWithAnimation( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -974,7 +974,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1025,7 +1025,7 @@ public suspend inline fun TelegramBot.replyWithAudio( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1067,7 +1067,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1113,7 +1113,7 @@ public suspend inline fun TelegramBot.replyWithAudio( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1153,7 +1153,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1199,7 +1199,7 @@ public suspend inline fun TelegramBot.replyWithDocument( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup, disableContentTypeDetection = disableContentTypeDetection ) @@ -1241,7 +1241,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup, disableContentTypeDetection = disableContentTypeDetection ) @@ -1283,7 +1283,7 @@ public suspend inline fun TelegramBot.replyWithDocument( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup, disableContentTypeDetection = disableContentTypeDetection ) @@ -1323,7 +1323,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup, disableContentTypeDetection = disableContentTypeDetection ) @@ -1359,7 +1359,7 @@ public suspend inline fun TelegramBot.replyWithMediaGroup( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) public suspend inline fun TelegramBot.replyWithPlaylist( @@ -1389,7 +1389,7 @@ public suspend inline fun TelegramBot.replyWithPlaylist( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) public suspend inline fun TelegramBot.replyWithDocuments( @@ -1419,7 +1419,7 @@ public suspend inline fun TelegramBot.replyWithDocuments( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) public suspend inline fun TelegramBot.replyWithGallery( @@ -1449,7 +1449,7 @@ public suspend inline fun TelegramBot.replyWithGallery( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) @@ -1495,7 +1495,7 @@ public suspend inline fun TelegramBot.replyWithPhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1539,7 +1539,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1583,7 +1583,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1626,7 +1626,7 @@ public suspend inline fun TelegramBot.replyWithPhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1668,7 +1668,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1710,7 +1710,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1751,7 +1751,7 @@ public suspend inline fun TelegramBot.replyWithSticker( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1789,7 +1789,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1844,7 +1844,7 @@ public suspend inline fun TelegramBot.replyWithVideo( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1888,7 +1888,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1938,7 +1938,7 @@ public suspend inline fun TelegramBot.replyWithVideo( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -1980,7 +1980,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2029,7 +2029,7 @@ public suspend inline fun TelegramBot.replyWithLivePhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2073,7 +2073,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2117,7 +2117,7 @@ public suspend inline fun TelegramBot.replyWithLivePhoto( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2159,7 +2159,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2204,7 +2204,7 @@ public suspend inline fun TelegramBot.replyWithVideoNote( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2240,7 +2240,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2285,7 +2285,7 @@ public suspend inline fun TelegramBot.replyWithVoice( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2325,7 +2325,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2366,7 +2366,7 @@ public suspend inline fun TelegramBot.replyWithVoice( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2404,7 +2404,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2473,7 +2473,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2520,7 +2520,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2565,7 +2565,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2608,7 +2608,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2651,7 +2651,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2703,7 +2703,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2757,7 +2757,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2807,7 +2807,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2859,7 +2859,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2909,7 +2909,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -2961,7 +2961,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3009,7 +3009,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3059,7 +3059,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3245,7 +3245,7 @@ public suspend inline fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup ) @@ -3361,7 +3361,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId), replyMarkup = replyMarkup, ) ) @@ -3401,7 +3401,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) /** @@ -3441,7 +3441,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) } @@ -3482,7 +3482,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, effectId = effectId, suggestedPostParameters = suggestedPostParameters, - replyParameters = ReplyParameters.Chat(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) + replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply, checklistTaskId = checklistTaskId, pollOptionId = pollOptionId) ) } @@ -4096,7 +4096,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, suggestedPostParameters = suggestedPostParameters, replyMarkup = replyMarkup, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( messageId = toMessageId, chatIdentifier = toChatId, allowSendingWithoutReply = allowSendingWithoutReply, @@ -4143,7 +4143,7 @@ public suspend fun TelegramBot.reply( allowPaidBroadcast = allowPaidBroadcast, suggestedPostParameters = suggestedPostParameters, replyMarkup = replyMarkup, - replyParameters = ReplyParameters.Chat( + replyParameters = ReplyParameters( messageId = toMessageId, chatIdentifier = toChatId, allowSendingWithoutReply = allowSendingWithoutReply, diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/utils/extensions/EnablePrivacyPolicyCommand.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/utils/extensions/EnablePrivacyPolicyCommand.kt index 5949cf5d70..fdd8d4e85d 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/utils/extensions/EnablePrivacyPolicyCommand.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/utils/extensions/EnablePrivacyPolicyCommand.kt @@ -67,7 +67,7 @@ suspend fun BC.onCommandPrivacy( it.chat.id, textSources, allowPaidBroadcast = allowPaidBroadcast, - replyParameters = ReplyParameters.Chat(it.metaInfo) + replyParameters = ReplyParameters(it.metaInfo) ) ) } @@ -100,7 +100,7 @@ suspend fun BC.onCommandPrivacy( text = text, parseMode = parseMode, allowPaidBroadcast = allowPaidBroadcast, - replyParameters = ReplyParameters.Chat(it.metaInfo) + replyParameters = ReplyParameters(it.metaInfo) ) ) } diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index 3a37f901fe..5581cf8835 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -15319,27 +15319,9 @@ public abstract interface class dev/inmo/tgbotapi/types/ReplyParameters { public abstract fun getMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId; } -public final class dev/inmo/tgbotapi/types/ReplyParameters$Chat : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/types/ReplyParameters { +public final class dev/inmo/tgbotapi/types/ReplyParameters$Chat : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/abstracts/WithMessageId, dev/inmo/tgbotapi/types/ReplyParameters { public static final field Companion Ldev/inmo/tgbotapi/types/ReplyParameters$Chat$Companion; - public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Lkotlin/Triple;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Lkotlin/Triple;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Lkotlin/Triple;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Lkotlin/Triple;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public final fun component2-APLFQys ()J public final fun component3 ()Ljava/lang/Boolean; @@ -15348,8 +15330,6 @@ public final class dev/inmo/tgbotapi/types/ReplyParameters$Chat : dev/inmo/tgbot public final fun component7 ()Ljava/lang/Integer; public final fun component8-Wby8Lsc ()Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId; public final fun component9-y3a_nt8 ()Ljava/lang/String; - public final fun copy-LVJNs80 (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; - public static synthetic fun copy-LVJNs80$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; public fun equals (Ljava/lang/Object;)Z public fun getAllowSendingWithoutReply ()Ljava/lang/Boolean; public final fun getChatIdentifier ()Ldev/inmo/tgbotapi/types/ChatIdentifier; @@ -15371,6 +15351,24 @@ public final class dev/inmo/tgbotapi/types/ReplyParameters$Chat$Companion { } public final class dev/inmo/tgbotapi/types/ReplyParameters$Companion { + public final fun invoke-0u1beqo (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-0u1beqo$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-BPLC4m8 (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-BPLC4m8$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-HmWr8k0 (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-HmWr8k0$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-SSz3Fa8 (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-SSz3Fa8$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-YCjLccs (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-YCjLccs$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-Z5nmqEk (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-Z5nmqEk$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-_9xweQk (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-_9xweQk$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-sl8XBEg (Lkotlin/Triple;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-sl8XBEg$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Lkotlin/Triple;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public final fun invoke-yfm4f28 (Lkotlin/Triple;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; + public static synthetic fun invoke-yfm4f28$default (Ldev/inmo/tgbotapi/types/ReplyParameters$Companion;Lkotlin/Triple;Ljava/lang/Boolean;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ReplyParameters$Chat; public final fun serializer ()Lkotlinx/serialization/KSerializer; } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyParameters.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyParameters.kt index 73c4df77be..45029ebcf9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyParameters.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyParameters.kt @@ -1,6 +1,7 @@ package dev.inmo.tgbotapi.types import dev.inmo.tgbotapi.abstracts.TextedInput +import dev.inmo.tgbotapi.abstracts.WithMessageId import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.RawMessageEntity @@ -28,7 +29,8 @@ sealed interface ReplyParameters { /** * Reply parameters targeting a regular message identified by [messageId]. A `null` [chatIdentifier] targets a - * message in the current chat; a non-null [chatIdentifier] targets a message in a different chat. + * message in the current chat; a non-null [chatIdentifier] targets a message in a different chat. Public + * construction uses the `ReplyParameters(...)` companion factories. */ @Suppress("SERIALIZER_TYPE_INCOMPATIBLE") @ConsistentCopyVisibility @@ -43,46 +45,12 @@ sealed interface ReplyParameters { val quotePosition: Int? = null, val checklistTaskId: ChecklistTaskId? = null, val pollOptionId: PollOptionPersistentId? = null, - ) : ReplyParameters, TextedInput { + ) : WithMessageId, ReplyParameters, TextedInput { override val text: String? get() = quote override val textSources: List by lazy { quoteEntities ?.asTextSources(quote ?: return@lazy emptyList()) ?: emptyList() } - - constructor( - chatIdentifier: ChatIdentifier, - messageId: MessageId, - entities: TextSourcesList, - allowSendingWithoutReply: Boolean? = null, - quotePosition: Int? = null, - checklistTaskId: ChecklistTaskId? = null, - pollOptionId: PollOptionPersistentId? = null, - ) : this(chatIdentifier, messageId, allowSendingWithoutReply, entities.makeSourceString(), null, entities.toRawMessageEntities(), quotePosition, checklistTaskId, pollOptionId) - - constructor(metaInfo: Message.MetaInfo, entities: TextSourcesList, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(metaInfo.chatId, metaInfo.messageId, entities, allowSendingWithoutReply, quotePosition, checklistTaskId, pollOptionId) - - constructor(message: Message, entities: TextSourcesList, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(message.metaInfo, entities, allowSendingWithoutReply, quotePosition, checklistTaskId, pollOptionId) - - constructor(chatIdentifier: ChatIdentifier, messageId: MessageId, quote: String, quoteParseMode: ParseMode, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(chatIdentifier, messageId, allowSendingWithoutReply, quote, quoteParseMode, null, quotePosition, checklistTaskId, pollOptionId) - - constructor(metaInfo: Message.MetaInfo, quote: String, quoteParseMode: ParseMode, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(metaInfo.chatId, metaInfo.messageId, quote, quoteParseMode, allowSendingWithoutReply, quotePosition, checklistTaskId, pollOptionId) - - constructor(message: Message, quote: String, quoteParseMode: ParseMode, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(message.metaInfo, quote, quoteParseMode, allowSendingWithoutReply, quotePosition, checklistTaskId, pollOptionId) - - constructor(chatIdentifier: ChatIdentifier, messageId: MessageId, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(chatIdentifier, messageId, allowSendingWithoutReply, null, null, null, quotePosition, checklistTaskId, pollOptionId) - - constructor(metaInfo: Message.MetaInfo, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(metaInfo.chatId, metaInfo.messageId, allowSendingWithoutReply, quotePosition, checklistTaskId, pollOptionId) - - constructor(message: Message, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null) : - this(message.metaInfo, allowSendingWithoutReply, quotePosition, checklistTaskId, pollOptionId) } @Suppress("SERIALIZER_TYPE_INCOMPATIBLE") @@ -98,6 +66,167 @@ sealed interface ReplyParameters { override val messageId: MessageId? = null } + companion object { + operator fun invoke( + chatIdentifier: ChatIdentifier, + messageId: MessageId, + entities: TextSourcesList, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = Chat( + chatIdentifier, + messageId, + allowSendingWithoutReply, + entities.makeSourceString(), + null, + entities.toRawMessageEntities(), + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + metaInfo: Message.MetaInfo, + entities: TextSourcesList, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = invoke( + metaInfo.chatId, + metaInfo.messageId, + entities, + allowSendingWithoutReply, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + message: Message, + entities: TextSourcesList, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = invoke( + message.metaInfo, + entities, + allowSendingWithoutReply, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + chatIdentifier: ChatIdentifier, + messageId: MessageId, + quote: String, + quoteParseMode: ParseMode, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = Chat( + chatIdentifier, + messageId, + allowSendingWithoutReply, + quote, + quoteParseMode, + null, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + metaInfo: Message.MetaInfo, + quote: String, + quoteParseMode: ParseMode, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = invoke( + metaInfo.chatId, + metaInfo.messageId, + quote, + quoteParseMode, + allowSendingWithoutReply, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + message: Message, + quote: String, + quoteParseMode: ParseMode, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = invoke( + message.metaInfo, + quote, + quoteParseMode, + allowSendingWithoutReply, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + chatIdentifier: ChatIdentifier, + messageId: MessageId, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = Chat( + chatIdentifier, + messageId, + allowSendingWithoutReply, + null, + null, + null, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + metaInfo: Message.MetaInfo, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = invoke( + metaInfo.chatId, + metaInfo.messageId, + allowSendingWithoutReply, + quotePosition, + checklistTaskId, + pollOptionId + ) + + operator fun invoke( + message: Message, + allowSendingWithoutReply: Boolean? = null, + quotePosition: Int? = null, + checklistTaskId: ChecklistTaskId? = null, + pollOptionId: PollOptionPersistentId? = null, + ): Chat = invoke( + message.metaInfo, + allowSendingWithoutReply, + quotePosition, + checklistTaskId, + pollOptionId + ) + } + object Serializer : KSerializer { @Serializable private data class Surrogate( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt index 6e7869cc3d..a6231626ba 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt @@ -192,7 +192,7 @@ sealed interface ResendableContent { effectId = effectId, suggestedPostParameters = suggestedPostParameters, replyParameters = replyToMessageId ?.let { - ReplyParameters.Chat( + ReplyParameters( chatId, replyToMessageId, allowSendingWithoutReply = allowSendingWithoutReply diff --git a/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ReplyParametersSerializationTest.kt b/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ReplyParametersSerializationTest.kt index 246dfab75b..864ede25f8 100644 --- a/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ReplyParametersSerializationTest.kt +++ b/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/ReplyParametersSerializationTest.kt @@ -16,7 +16,7 @@ class ReplyParametersSerializationTest { @Test fun chatRoundTripUsesFlatShape() { - val value: ReplyParameters = ReplyParameters.Chat( + val value: ReplyParameters = ReplyParameters( ChatId(RawChatId(123L)), MessageId(456L), allowSendingWithoutReply = true