mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-08-15 13:46:19 +00:00
Compare commits
1 Commits
36.0.0
...
renovate/k
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65feff87a3 |
49
CHANGELOG.md
49
CHANGELOG.md
@@ -1,54 +1,5 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 36.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.2](https://core.telegram.org/bots/api-changelog#july-14-2026)**
|
||||
|
||||
**Breaking changes**:
|
||||
|
||||
* `ReplyParameters` is now a sealed interface with nested `ReplyParameters.Chat` and `ReplyParameters.Ephemeral` implementations; overloaded `ReplyParameters(...)` companion factories construct both regular-message and ephemeral-message variants
|
||||
* 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**: Keep `ReplyParameters(...)` for both chat-message and ephemeral-message targets; explicit `ReplyParameters.Ephemeral(...)` subtype construction also remains available; 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
|
||||
* (`Rich Messages`) Added `TelegramMediaVoiceNote` (`InputMediaVoiceNote`) and the `RichMessageMemberTelegramMedia` marker interface implemented by it, `TelegramMediaAnimation`, `TelegramMediaAudio`, `TelegramMediaPhoto` and `TelegramMediaVideo`; added `VoiceFile.toTelegramMediaVoiceNote` converters
|
||||
* (`Rich Messages`) Added `InputRichMessageMedia` type (media referenced from `InputRichMessage.html`/`.markdown` via `tg://photo?id=`, `tg://video?id=` and `tg://audio?id=` links)
|
||||
* (`Rich Messages`) `InputRichMessage` gained `blocks` and `media` fields ("exactly one of `html`, `markdown` or `blocks` must be used") and the `InputRichMessageBlocks` factory; `InputRichMessageHTML`/`InputRichMessageMarkdown` gained a trailing `media` parameter
|
||||
* (`Rich Messages`) Added Rich Messages input DSL builders `buildInputRichBlocks`/`InputRichBlocksBuilder`, `InputRichBlockListBuilder` and the `InputRichMessageBlocks { }` builder overload (marked with the `@RichTextDsl` DSL marker)
|
||||
* (`Rich Messages`) `SendRichMessage` now supports `attach://` upload of new files referenced from `InputRichMessage.blocks`/`.media`; `SendRichMessageDraft` now rejects rich messages that require direct file upload (unsupported by the method)
|
||||
* (`Ephemeral Messages`) Added `EphemeralMessageId` value class, `PossiblyEphemeralMessage` (`receiverUser`/`ephemeralMessageId`) and `EphemeralMessageAction` (`receiverUserId`/`ephemeralMessageId`) abstractions
|
||||
* (`Ephemeral Messages`) `RawMessage` parses `receiver_user`/`ephemeral_message_id`; the 4 group-family `Common*ContentMessage` types (`CommonGroupContentMessage`, `CommonForumContentMessage`, `CommonChannelDirectMessagesContentMessage`, `CommonSuggestedChannelDirectMessagesContentMessage`, via the shared `PotentiallyFromUserGroupContentMessage`) now also implement `PossiblyEphemeralMessage`
|
||||
* (`Ephemeral Messages`) `BotCommand` gained the `isEphemeral` field
|
||||
* (`Ephemeral Messages`) `ReplyParameters` became a sealed interface with nested `Chat` and `Ephemeral` implementations and a shared surrogate-backed serializer preserving the flat Bot API JSON shape; added the `Message.ephemeralReplyParametersOrNull()`/`Message.ephemeralReplyReceiverUserIdOrNull` helpers used by the `reply(to = ...)` smart-branch
|
||||
* (`Ephemeral Messages`) `ReplyParameters.Ephemeral` and `Message.ephemeralReplyParametersOrNull()` support and forward `allowSendingWithoutReply`, `checklistTaskId`, and `pollOptionId` together with `ephemeralMessageId`
|
||||
* (`Ephemeral Messages`) Added `receiverUserId`/`callbackQueryId` params (via the new `OptionallyEphemeralSendRequest`) to the 13 ephemeral-capable send requests: `SendTextMessage`, `SendContact`, `SendLocation` (`Static`/`Live`), `SendVenue`, `SendPhotoData`, `SendLivePhotoData`, `SendAudioData`, `SendDocumentData`, `SendVideoData`, `SendAnimationData`, `SendVoiceData`, `SendVideoNoteData`, `SendStickerByFileId`
|
||||
* (`Ephemeral Messages`) Added `EditEphemeralMessageText`/`EditEphemeralMessageMedia`/`EditEphemeralMessageCaption`/`EditEphemeralMessageReplyMarkup` and `DeleteEphemeralMessage` requests (all return `Unit`, mirroring the inline-message edit family); `EditEphemeralMessageMedia` rejects `MultipartFile` media (new file upload is not supported for ephemeral edits)
|
||||
* (`Ephemeral Messages`) Added `EphemeralChatId` (`IdChatIdentifier`, carrying `chatId`/`receiverUser`/`ephemeralMessageId`) and the `ChatIdentifier.receiverUser`/`ChatIdentifier.ephemeralMessageId` extensions (mirroring `ChatIdentifier.threadId`); `FullChatIdentifierSerializer` gained the `chatId/eph/receiverUserChatId/ephemeralMessageId` string format. The nullable `receiverUserId` param of the 13 ephemeral-capable send requests still defaults from the passed `chatId` when it is an `EphemeralChatId`; `DeleteEphemeralMessage` and `EditEphemeralMessageText`/`EditEphemeralMessageCaption`/`EditEphemeralMessageMedia`/`EditEphemeralMessageReplyMarkup` instead keep `receiverUserId`/`ephemeralMessageId` REQUIRED on their primary constructor/factory form, gaining `EphemeralChatId`-taking secondary constructors/factory overloads that source both params from the identifier (throwing `IllegalArgumentException` if it carries no `ephemeralMessageId`)
|
||||
* (`Communities`) Added `CommunityId` value class and `Community` type (`id`/`name`)
|
||||
* (`Communities`) Added `CommunityChatAdded` (`community`) and `CommunityChatRemoved` (fieldless) chat events (`CommonEvent`); `RawMessage` parses `community_chat_added`/`community_chat_removed`
|
||||
* (`Communities`) Added `community` field to `ExtendedChat` (`ChatFullInfo.community`), parsed for `ExtendedChannelChatImpl`, `ExtendedGroupChatImpl`, `ExtendedSupergroupChatImpl`, `ExtendedForumChatImpl`, `ExtendedChannelDirectMessagesChatImpl` and `ExtendedBot`
|
||||
* (`Bot Subscriptions`) Added `BotSubscriptionUpdated` (`user`, `invoicePayload`, `state`) and `BotSubscriptionUpdatedUpdate`; `state` is modeled as the typed sealed `BotSubscriptionUpdated.State` (`Canceled`/`Active`/`Failed`, with an `Unknown` fallback), mirroring `TransactionType`
|
||||
* (`Bot Subscriptions`) `RawUpdate` parses the new `subscription` field; added `UPDATE_SUBSCRIPTION` to `ALL_UPDATES_LIST_WITHOUT_REACTIONS`; `FlowsUpdatesFilter` gained `botSubscriptionUpdatedUpdatesFlow`
|
||||
* `API`:
|
||||
* (`Ephemeral Messages`) Threaded `receiverUserId`/`callbackQueryId` through the `sendXxx`/`send`/`reply`/`replyWithXxx` extensions for the 13 ephemeral-capable senders (`send/Sends.kt`, `send/Replies.kt`, `send/RepliesWithChatsAndMessages.kt` and their per-type extension files); `reply(to = ...)` now automatically sends an ephemeral reply when `to` is itself ephemeral (see Breaking changes)
|
||||
* (`Ephemeral Messages`) Ephemeral-capable `reply(to = ...)` overloads gained `replyToEphemeralMessageId`, defaulting from `PossiblyEphemeralMessage.ephemeralMessageId`; direct and dispatcher overloads forward the explicit target into `ephemeralReplyParametersOrNull`
|
||||
* (`Ephemeral Messages`) Added 48 ephemeral-only `reply`/`replyWithXxx` overloads in `RepliesWithEphemeral.kt` without a `ChatMessage`; each overload requires `replyInChatId`, `receiverUserId`, and `replyToEphemeralMessageId`, with complete content-form and dispatcher parity across the 13 ephemeral-capable senders
|
||||
* (`Ephemeral Messages`) Added `editEphemeralMessageText`/`editEphemeralMessageMedia`/`editEphemeralMessageCaption`/`editEphemeralMessageReplyMarkup` and `deleteEphemeralMessage` `TelegramBot` extensions (the latter also accepts a `PossiblyEphemeralMessage` directly)
|
||||
* (`Ephemeral Messages`) Added explicit `replyToEphemeral`/`replyToEphemeralWithXxx` `TelegramBot` extensions for the 13 ephemeral-capable senders, replying to an ephemeral message by `chatId`/`ephemeralMessageId` without requiring the original `Message` object
|
||||
* (`Ephemeral Messages`) `receiverUserId`/`ephemeralMessageId` params of the edit/delete/`replyToEphemeral*` extensions remain REQUIRED on the `chatId: ChatIdentifier`/`chat: Chat` forms; each `chatId: ChatIdentifier` form additionally gained a convenience overload taking `chatId: EphemeralChatId` (dropping `receiverUserId`/`ephemeralMessageId`) that sources both from the identifier, throwing `IllegalArgumentException` if it carries no `ephemeralMessageId` (the `chat: Chat` forms got no such overload, since `Chat.id` is statically only an `IdChatIdentifier`); `Replies.kt`'s `receiverUserId` default now also checks `replyInChatId.receiverUser` before falling back to `to.ephemeralReplyReceiverUserIdOrNull`
|
||||
* (`Ephemeral Messages`) Not covered by this iteration (follow-up): `createResend`/`ResendMessage` do not carry ephemeral fields (a resend is always a regular message); `handleLiveLocation` and the generic `reply(mediaFile = ...)`/`reply(content = ...)` dispatchers in `RepliesWithChatsAndMessages.kt`'s `copyMessage`/live-location branches are unaffected; `behaviour_builder` triggers/waiters gained no ephemeral-specific helpers
|
||||
* `BehaviourBuilder`:
|
||||
* (`Communities`) Added `onCommunityChatAdded`/`onCommunityChatRemoved` triggers
|
||||
* (`Communities`) Added `waitCommunityChatAdded`/`waitCommunityChatRemoved` and `waitCommunityChatAddedEventsMessages`/`waitCommunityChatRemovedEventsMessages` expectations
|
||||
* (`Bot Subscriptions`) Added `onBotSubscriptionUpdated` trigger, `waitBotSubscriptionUpdated` expectation and `ByUserBotSubscriptionUpdatedMarkerFactory`
|
||||
* `Utils`:
|
||||
* (`Bot Subscriptions`) Added class casts for `BotSubscriptionUpdatedUpdate` (`whenBotSubscriptionUpdatedUpdate`/`asBotSubscriptionUpdatedUpdate`/`requireBotSubscriptionUpdatedUpdate`); regenerated class casts extensions (`botSubscriptionUpdatedUpdateOrNull`/`OrThrow`, `botSubscriptionUpdatedOrNull`/`OrThrow`)
|
||||
* `WebApps`:
|
||||
* Telegram hardened Mini App method-origin security, auto-enabling for all Mini Apps on July 20, 2026; no library change required
|
||||
|
||||
## 35.1.0
|
||||
|
||||
* `Dependencies`:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# TelegramBotAPI [](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#july-14-2026)
|
||||
# TelegramBotAPI [](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#june-11-2026)
|
||||
|
||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
|
||||
@@ -60,13 +60,3 @@ All work MUST be performed in the normal (main) working worktree of the reposito
|
||||
---
|
||||
|
||||
When a prompt contains a list of several subtasks, run each subtask as its own subagent (one subagent per subtask) instead of doing all of them inline in the main thread.
|
||||
|
||||
---
|
||||
|
||||
For any substantial change, drive it through a three-phase agent pipeline, each phase run as its own subagent(s), and each section/subtask committed separately:
|
||||
|
||||
1. **Plan / Architect** the changes — model range best → medium, best is the most suitable.
|
||||
2. **Coding / implementation** — model range medium → high, medium is the most suitable.
|
||||
3. **Check / validation** — model range high → best, high is the most suitable.
|
||||
|
||||
Model tiers: **best = Fable**, **high = Opus**, **medium = Sonnet**. (Tier names, not the concrete models, are the contract — remap the models if the roster changes.)
|
||||
|
||||
@@ -6,4 +6,4 @@ kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=36.0.0
|
||||
library_version=35.1.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "2.3.21"
|
||||
kotlin = "2.4.10"
|
||||
kotlin-serialization = "1.11.0"
|
||||
kotlin-coroutines = "1.11.0"
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.DeleteEphemeralMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.EphemeralChatId
|
||||
import dev.inmo.tgbotapi.types.EphemeralMessageId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage
|
||||
|
||||
public suspend fun TelegramBot.deleteEphemeralMessage(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId
|
||||
): Unit = execute(
|
||||
DeleteEphemeralMessage(chatId, receiverUserId, ephemeralMessageId)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.deleteEphemeralMessage(
|
||||
chatId: EphemeralChatId
|
||||
): Unit = execute(
|
||||
DeleteEphemeralMessage(chatId)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.deleteEphemeralMessage(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId
|
||||
): Unit = deleteEphemeralMessage(chat.id, receiverUserId, ephemeralMessageId)
|
||||
|
||||
/**
|
||||
* Convenience overload requiring [message] to carry non-null [PossiblyEphemeralMessage.receiverUser] and
|
||||
* [PossiblyEphemeralMessage.ephemeralMessageId] (as returned by any of the ephemeral send requests)
|
||||
*/
|
||||
public suspend fun TelegramBot.deleteEphemeralMessage(
|
||||
message: PossiblyEphemeralMessage
|
||||
): Unit = deleteEphemeralMessage(
|
||||
message.chat.id,
|
||||
message.receiverUser ?.id ?: error("Message ${message.messageId} in chat ${message.chat.id} is not ephemeral: receiverUser is null"),
|
||||
message.ephemeralMessageId ?: error("Message ${message.messageId} in chat ${message.chat.id} is not ephemeral: ephemeralMessageId is null")
|
||||
)
|
||||
@@ -1,103 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.caption
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.caption.EditEphemeralMessageCaption
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
caption: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageCaption(chatId, receiverUserId, ephemeralMessageId, caption, parseMode, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageCaption(
|
||||
chatId: EphemeralChatId,
|
||||
caption: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageCaption(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
caption,
|
||||
parseMode,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageCaption(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
caption: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageCaption(chat.id, receiverUserId, ephemeralMessageId, caption, parseMode, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageCaption(chatId, receiverUserId, ephemeralMessageId, entities, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageCaption(
|
||||
chatId: EphemeralChatId,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageCaption(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
entities,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageCaption(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageCaption(chat.id, receiverUserId, ephemeralMessageId, entities, replyMarkup)
|
||||
@@ -1,49 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.media.EditEphemeralMessageMedia
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageMedia(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
media: TelegramFreeMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageMedia(chatId, receiverUserId, ephemeralMessageId, media, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageMedia(
|
||||
chatId: EphemeralChatId,
|
||||
media: TelegramFreeMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageMedia(chatId, media, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageMedia(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
media: TelegramFreeMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageMedia(chat.id, receiverUserId, ephemeralMessageId, media, replyMarkup)
|
||||
@@ -1,45 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.reply_markup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditEphemeralMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageReplyMarkup(chatId, receiverUserId, ephemeralMessageId, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
|
||||
chatId: EphemeralChatId,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageReplyMarkup(chatId, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageReplyMarkup(chat.id, receiverUserId, ephemeralMessageId, replyMarkup)
|
||||
@@ -1,200 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.text
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.text.EditEphemeralMessageText
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.buildEntities
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, text, parseMode, linkPreviewOptions, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: EphemeralChatId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageText(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
text,
|
||||
parseMode,
|
||||
linkPreviewOptions,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, text, parseMode, linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = execute(
|
||||
EditEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, entities, linkPreviewOptions, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: EphemeralChatId,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageText(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
entities,
|
||||
linkPreviewOptions,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, entities, linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
): Unit = editEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: EphemeralChatId,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
): Unit = editEphemeralMessageText(chatId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
): Unit = editEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chatId: EphemeralChatId,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
): Unit = editEphemeralMessageText(chatId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editEphemeralMessageText(
|
||||
chat: Chat,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -58,8 +58,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -77,8 +75,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -100,8 +96,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -117,8 +111,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -282,8 +274,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -300,8 +290,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -323,8 +311,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -340,8 +326,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -368,8 +352,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -387,8 +369,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -411,8 +391,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -429,8 +407,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -453,8 +429,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -498,8 +472,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -552,8 +524,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -576,8 +546,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -601,8 +569,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -625,8 +591,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -644,8 +608,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -661,8 +623,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -794,8 +754,6 @@ public suspend inline fun TelegramBot.replyWithAnimation(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -819,8 +777,6 @@ public suspend inline fun TelegramBot.replyWithAnimation(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -845,8 +801,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -869,8 +823,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -895,8 +847,6 @@ public suspend inline fun TelegramBot.replyWithAnimation(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -919,8 +869,6 @@ public suspend inline fun TelegramBot.replyWithAnimation(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -944,8 +892,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -967,8 +913,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -995,8 +939,6 @@ public suspend inline fun TelegramBot.replyWithAudio(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1018,8 +960,6 @@ public suspend inline fun TelegramBot.replyWithAudio(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1040,8 +980,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1060,8 +998,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1084,8 +1020,6 @@ public suspend inline fun TelegramBot.replyWithAudio(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1106,8 +1040,6 @@ public suspend inline fun TelegramBot.replyWithAudio(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1127,8 +1059,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1146,8 +1076,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1171,8 +1099,6 @@ public suspend inline fun TelegramBot.replyWithDocument(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1192,8 +1118,6 @@ public suspend inline fun TelegramBot.replyWithDocument(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1214,8 +1138,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1234,8 +1156,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1256,8 +1176,6 @@ public suspend inline fun TelegramBot.replyWithDocument(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1276,8 +1194,6 @@ public suspend inline fun TelegramBot.replyWithDocument(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1297,8 +1213,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1316,8 +1230,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1467,8 +1379,6 @@ public suspend inline fun TelegramBot.replyWithPhoto(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1488,8 +1398,6 @@ public suspend inline fun TelegramBot.replyWithPhoto(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1511,8 +1419,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1532,8 +1438,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1555,8 +1459,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1576,8 +1478,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1599,8 +1499,6 @@ public suspend inline fun TelegramBot.replyWithPhoto(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1619,8 +1517,6 @@ public suspend inline fun TelegramBot.replyWithPhoto(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1641,8 +1537,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1661,8 +1555,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1683,8 +1575,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1703,8 +1593,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1725,8 +1613,6 @@ public suspend inline fun TelegramBot.replyWithSticker(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -1743,8 +1629,6 @@ public suspend inline fun TelegramBot.replyWithSticker(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -1763,8 +1647,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -1781,8 +1663,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -1812,8 +1692,6 @@ public suspend inline fun TelegramBot.replyWithVideo(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1837,8 +1715,6 @@ public suspend inline fun TelegramBot.replyWithVideo(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1860,8 +1736,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1881,8 +1755,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1907,8 +1779,6 @@ public suspend inline fun TelegramBot.replyWithVideo(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1931,8 +1801,6 @@ public suspend inline fun TelegramBot.replyWithVideo(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1953,8 +1821,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1973,8 +1839,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2000,8 +1864,6 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2022,8 +1884,6 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2045,8 +1905,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2066,8 +1924,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2089,8 +1945,6 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2110,8 +1964,6 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2132,8 +1984,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2152,8 +2002,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2177,8 +2025,6 @@ public suspend inline fun TelegramBot.replyWithVideoNote(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2197,8 +2043,6 @@ public suspend inline fun TelegramBot.replyWithVideoNote(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2216,8 +2060,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2233,8 +2075,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2258,8 +2098,6 @@ public suspend inline fun TelegramBot.replyWithVoice(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2278,8 +2116,6 @@ public suspend inline fun TelegramBot.replyWithVoice(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2299,8 +2135,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2318,8 +2152,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2340,8 +2172,6 @@ public suspend inline fun TelegramBot.replyWithVoice(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2359,8 +2189,6 @@ public suspend inline fun TelegramBot.replyWithVoice(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2379,8 +2207,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2397,8 +2223,6 @@ public suspend inline fun TelegramBot.reply(
|
||||
threadId = replyInThreadId,
|
||||
directMessageThreadId = replyInDirectMessageThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3494,8 +3318,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3515,8 +3337,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3535,8 +3355,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3555,8 +3373,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3575,8 +3391,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3595,8 +3409,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3615,8 +3427,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3635,8 +3445,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3655,8 +3463,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3675,8 +3481,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3695,8 +3499,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3720,8 +3522,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3743,8 +3543,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3765,8 +3563,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3787,8 +3583,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3809,8 +3603,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3831,8 +3623,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3853,8 +3643,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3875,8 +3663,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3899,8 +3685,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
receiverUserId: UserId? = replyInChatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3921,8 +3705,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3942,8 +3724,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3963,8 +3743,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3983,8 +3761,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4004,8 +3780,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4025,8 +3799,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4046,8 +3818,6 @@ public suspend fun TelegramBot.reply(
|
||||
replyInThreadId = replyInThreadId,
|
||||
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
|
||||
replyInBusinessConnectionId = replyInBusinessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,553 +0,0 @@
|
||||
@file:Suppress("KDocUnresolvedReference")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.api.send
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.media.*
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.*
|
||||
|
||||
/**
|
||||
* Explicit helpers replying directly to an incoming ephemeral message identified by [chatId]/[ephemeralMessageId]
|
||||
* (as opposed to the `reply(to = someMessage, ...)` smart-branch overloads, which detect an ephemeral
|
||||
* [dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage] target automatically). The outgoing message
|
||||
* is itself sent as ephemeral, addressed to the same [receiverUserId] as the message being replied to.
|
||||
*
|
||||
* Each helper has two forms: one taking explicit `receiverUserId`/`ephemeralMessageId`, and a convenience overload
|
||||
* taking an [dev.inmo.tgbotapi.types.EphemeralChatId] which sources both from the identifier (throwing
|
||||
* [IllegalArgumentException] if it does not carry an `ephemeralMessageId`).
|
||||
*
|
||||
* @see dev.inmo.tgbotapi.types.ephemeralReplyParametersOrNull
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeral(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<TextContent> = sendMessage(
|
||||
chatId = chatId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeral(
|
||||
chatId: EphemeralChatId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<TextContent> = replyToEphemeral(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
photo: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chatId,
|
||||
fileId = photo,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithPhoto(
|
||||
chatId: EphemeralChatId,
|
||||
photo: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<PhotoContent> = replyToEphemeralWithPhoto(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
photo = photo,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithLivePhoto(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
livePhoto: InputFile,
|
||||
photo: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
|
||||
chatId = chatId,
|
||||
livePhoto = livePhoto,
|
||||
photo = photo,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithLivePhoto(
|
||||
chatId: EphemeralChatId,
|
||||
livePhoto: InputFile,
|
||||
photo: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<LivePhotoContent> = replyToEphemeralWithLivePhoto(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
livePhoto = livePhoto,
|
||||
photo = photo,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithAudio(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
audio: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<AudioContent> = sendAudio(
|
||||
chatId = chatId,
|
||||
audio = audio,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithAudio(
|
||||
chatId: EphemeralChatId,
|
||||
audio: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<AudioContent> = replyToEphemeralWithAudio(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
audio = audio,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithDocument(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
document: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<DocumentContent> = sendDocument(
|
||||
chatId = chatId,
|
||||
document = document,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithDocument(
|
||||
chatId: EphemeralChatId,
|
||||
document: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<DocumentContent> = replyToEphemeralWithDocument(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
document = document,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVideo(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
video: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chatId,
|
||||
video = video,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVideo(
|
||||
chatId: EphemeralChatId,
|
||||
video: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VideoContent> = replyToEphemeralWithVideo(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
video = video,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
animation: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chatId,
|
||||
animation = animation,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithAnimation(
|
||||
chatId: EphemeralChatId,
|
||||
animation: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<AnimationContent> = replyToEphemeralWithAnimation(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
animation = animation,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVoice(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
voice: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VoiceContent> = sendVoice(
|
||||
chatId = chatId,
|
||||
voice = voice,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVoice(
|
||||
chatId: EphemeralChatId,
|
||||
voice: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VoiceContent> = replyToEphemeralWithVoice(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
voice = voice,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
videoNote: InputFile,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VideoNoteContent> = sendVideoNote(
|
||||
chatId = chatId,
|
||||
videoNote = videoNote,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVideoNote(
|
||||
chatId: EphemeralChatId,
|
||||
videoNote: InputFile,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VideoNoteContent> = replyToEphemeralWithVideoNote(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
videoNote = videoNote,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithSticker(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
sticker: InputFile,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<StickerContent> = sendSticker(
|
||||
chatId = chatId,
|
||||
sticker = sticker,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithSticker(
|
||||
chatId: EphemeralChatId,
|
||||
sticker: InputFile,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<StickerContent> = replyToEphemeralWithSticker(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
sticker = sticker,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Sends a static location (`live_period` is not supported for ephemeral messages, see [SendLocation.Live])
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithLocation(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<StaticLocationContent> = sendStaticLocation(
|
||||
chatId = chatId,
|
||||
latitude = latitude,
|
||||
longitude = longitude,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Sends a static location (`live_period` is not supported for ephemeral messages, see [SendLocation.Live]).
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithLocation(
|
||||
chatId: EphemeralChatId,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<StaticLocationContent> = replyToEphemeralWithLocation(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
latitude = latitude,
|
||||
longitude = longitude,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVenue(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
title: String,
|
||||
address: String,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VenueContent> = sendVenue(
|
||||
chatId = chatId,
|
||||
latitude = latitude,
|
||||
longitude = longitude,
|
||||
title = title,
|
||||
address = address,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithVenue(
|
||||
chatId: EphemeralChatId,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
title: String,
|
||||
address: String,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<VenueContent> = replyToEphemeralWithVenue(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
latitude = latitude,
|
||||
longitude = longitude,
|
||||
title = title,
|
||||
address = address,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.replyToEphemeralWithContact(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
phoneNumber: String,
|
||||
firstName: String,
|
||||
lastName: String? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<ContactContent> = sendContact(
|
||||
chatId = chatId,
|
||||
phoneNumber = phoneNumber,
|
||||
firstName = firstName,
|
||||
lastName = lastName,
|
||||
receiverUserId = receiverUserId,
|
||||
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
|
||||
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
|
||||
*/
|
||||
public suspend fun TelegramBot.replyToEphemeralWithContact(
|
||||
chatId: EphemeralChatId,
|
||||
phoneNumber: String,
|
||||
firstName: String,
|
||||
lastName: String? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ChatContentMessage<ContactContent> = replyToEphemeralWithContact(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
phoneNumber = phoneNumber,
|
||||
firstName = firstName,
|
||||
lastName = lastName,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
@@ -24,8 +24,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -42,8 +40,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -64,8 +60,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -80,8 +74,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -104,8 +96,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -121,8 +111,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -142,8 +130,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -157,8 +143,6 @@ public suspend fun TelegramBot.sendContact(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -27,8 +27,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -48,8 +46,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -74,8 +70,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -94,8 +88,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -120,8 +112,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -140,8 +130,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -165,8 +153,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -185,8 +171,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -211,8 +195,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -231,8 +213,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -256,8 +236,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -276,8 +254,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -302,8 +278,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -322,8 +296,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -347,8 +319,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -367,8 +337,6 @@ public suspend fun TelegramBot.sendLiveLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -29,8 +29,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -47,8 +45,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -71,8 +67,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -88,8 +82,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -111,8 +103,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -128,8 +118,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -152,8 +140,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -169,8 +155,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -191,8 +175,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -208,8 +190,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -231,8 +211,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -248,8 +226,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -271,8 +247,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -288,8 +262,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -310,8 +282,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -326,8 +296,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -348,8 +316,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -365,8 +331,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -388,8 +352,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -405,8 +367,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -427,8 +387,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -443,8 +401,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -465,8 +421,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -482,8 +436,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -505,8 +457,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -522,8 +472,6 @@ public suspend fun TelegramBot.sendMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -545,8 +493,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -561,8 +507,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -583,8 +527,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -600,8 +542,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -623,8 +563,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -640,8 +578,6 @@ public suspend fun TelegramBot.sendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -25,8 +25,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -42,8 +40,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -64,8 +60,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -80,8 +74,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -102,8 +94,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -118,8 +108,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -139,8 +127,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -155,8 +141,6 @@ public suspend fun TelegramBot.sendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -177,8 +161,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -193,8 +175,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -214,8 +194,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -230,8 +208,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -252,8 +228,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -268,8 +242,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -289,8 +261,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -305,8 +275,6 @@ public suspend fun TelegramBot.sendStaticLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -31,8 +31,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -54,8 +52,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -83,8 +79,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -105,8 +99,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -132,8 +124,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -154,8 +144,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -181,8 +169,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -203,8 +189,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -224,8 +208,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -240,8 +222,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -262,8 +242,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -277,8 +255,6 @@ public suspend fun TelegramBot.sendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -71,8 +71,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -93,8 +91,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -122,8 +118,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -144,8 +138,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -172,8 +164,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -193,8 +183,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -221,8 +209,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -242,8 +228,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -267,8 +251,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -285,8 +267,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -310,8 +290,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -328,8 +306,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -352,8 +328,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -369,8 +343,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -393,8 +365,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -410,8 +380,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -434,8 +402,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -451,8 +417,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -473,8 +437,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -488,8 +450,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -512,8 +472,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -529,8 +487,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -551,8 +507,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -566,8 +520,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -700,8 +652,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -718,8 +668,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -743,8 +691,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -761,8 +707,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -785,8 +729,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -802,8 +744,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -826,8 +766,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -842,8 +780,6 @@ public suspend inline fun TelegramBot.send(
|
||||
entities = entities,
|
||||
threadId = threadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1055,8 +991,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1071,8 +1005,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1093,8 +1025,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1108,8 +1038,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1131,8 +1059,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1147,8 +1073,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1169,8 +1093,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1184,8 +1106,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1208,8 +1128,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1225,8 +1143,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1249,8 +1165,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1266,8 +1180,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1289,8 +1201,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1305,8 +1215,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1327,8 +1235,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1344,8 +1250,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1367,8 +1271,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1384,8 +1286,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1408,8 +1308,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1424,8 +1322,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1578,8 +1474,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1595,8 +1489,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1618,8 +1510,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1635,8 +1525,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1661,8 +1549,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1680,8 +1566,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1866,8 +1750,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1885,8 +1767,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1911,8 +1791,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1930,8 +1808,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -1956,8 +1832,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -1975,8 +1849,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2000,8 +1872,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2018,8 +1888,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2043,8 +1911,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2061,8 +1927,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2086,8 +1950,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2104,8 +1966,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -2129,8 +1989,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -2147,8 +2005,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3306,8 +3162,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -3322,8 +3176,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -3345,8 +3197,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -3361,8 +3211,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -3390,8 +3238,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3410,8 +3256,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3436,8 +3280,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3455,8 +3297,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3482,8 +3322,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3502,8 +3340,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3528,8 +3364,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3547,8 +3381,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3576,8 +3408,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3598,8 +3428,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3627,8 +3455,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3649,8 +3475,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3677,8 +3501,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3698,8 +3520,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3726,8 +3546,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3747,8 +3565,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3769,8 +3585,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3784,8 +3598,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3806,8 +3618,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3821,8 +3631,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3848,8 +3656,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3868,8 +3674,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3895,8 +3699,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3915,8 +3717,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3941,8 +3741,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -3960,8 +3758,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -3986,8 +3782,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4005,8 +3799,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4031,8 +3823,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4050,8 +3840,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4076,8 +3864,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4095,8 +3881,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4120,8 +3904,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4138,8 +3920,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4163,8 +3943,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4181,8 +3959,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4203,8 +3979,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4217,8 +3991,6 @@ public suspend fun TelegramBot.send(
|
||||
videoNote = videoNote,
|
||||
threadId = threadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4240,8 +4012,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4255,8 +4025,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4279,8 +4047,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4296,8 +4062,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4320,8 +4084,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4337,8 +4099,6 @@ public suspend fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4360,8 +4120,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4376,8 +4134,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -4399,8 +4155,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -4415,8 +4169,6 @@ public suspend inline fun TelegramBot.send(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -34,8 +34,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -58,8 +56,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -87,8 +83,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -110,8 +104,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -139,8 +131,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -162,8 +152,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -190,8 +178,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -212,8 +198,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -241,8 +225,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -264,8 +246,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -292,8 +272,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -314,8 +292,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -342,8 +318,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -364,8 +338,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -391,8 +363,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -412,8 +382,6 @@ public suspend fun TelegramBot.sendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -30,8 +30,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -52,8 +50,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -80,8 +76,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -101,8 +95,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -125,8 +117,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -146,8 +136,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -170,8 +158,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -188,8 +174,6 @@ public suspend fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -215,8 +199,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -236,8 +218,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -263,8 +243,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -283,8 +261,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -306,8 +282,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -326,8 +300,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -349,8 +321,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -366,8 +336,6 @@ public suspend inline fun TelegramBot.sendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -27,8 +27,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -47,8 +45,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -73,8 +69,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -92,8 +86,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -116,8 +108,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -135,8 +125,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -159,8 +147,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -177,8 +163,6 @@ public suspend fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -201,8 +185,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -220,8 +202,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -245,8 +225,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -263,8 +241,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -286,8 +262,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -304,8 +278,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -327,8 +299,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -344,8 +314,6 @@ public suspend inline fun TelegramBot.sendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -31,8 +31,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -52,8 +50,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -78,8 +74,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -98,8 +92,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -124,8 +116,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -144,8 +134,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -169,8 +157,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -188,8 +174,6 @@ public suspend fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -213,8 +197,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -233,8 +215,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -258,8 +238,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -277,8 +255,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -302,8 +278,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -321,8 +295,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -345,8 +317,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -363,8 +333,6 @@ public suspend inline fun TelegramBot.sendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -30,8 +30,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -50,8 +48,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -76,8 +72,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -95,8 +89,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -120,8 +112,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -139,8 +129,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -164,8 +152,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -183,8 +169,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -208,8 +192,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -227,8 +209,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -252,8 +232,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -271,8 +249,6 @@ public suspend fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -296,8 +272,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -315,8 +289,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -340,8 +312,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -358,8 +328,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -382,8 +350,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -400,8 +366,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -424,8 +388,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -442,8 +404,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -466,8 +426,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -484,8 +442,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -508,8 +464,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -526,8 +480,6 @@ public suspend inline fun TelegramBot.sendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -24,8 +24,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -41,8 +39,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -64,8 +60,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -80,8 +74,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -102,8 +94,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -118,8 +108,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -140,8 +128,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -156,8 +142,6 @@ public suspend fun TelegramBot.sendSticker(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
|
||||
@@ -37,8 +37,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -64,8 +62,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -91,8 +87,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -117,8 +111,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -149,8 +141,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -175,8 +165,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -202,8 +190,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -222,8 +208,6 @@ public suspend fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -253,8 +237,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -279,8 +261,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -305,8 +285,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -330,8 +308,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -361,8 +337,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -386,8 +360,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -412,8 +384,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -431,8 +401,6 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -25,8 +25,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -44,8 +42,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -66,8 +62,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -84,8 +78,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -108,8 +100,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -126,8 +116,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -147,8 +135,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -162,8 +148,6 @@ public suspend fun TelegramBot.sendVideoNote(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -27,8 +27,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -46,8 +44,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -71,8 +67,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -89,8 +83,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -112,8 +104,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -130,8 +120,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -153,8 +141,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -170,8 +156,6 @@ public suspend fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -194,8 +178,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -211,8 +193,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
duration = duration,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -236,8 +216,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -253,8 +231,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -275,8 +251,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -292,8 +266,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -313,8 +285,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||
receiverUserId: UserId? = chat.id.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -329,8 +299,6 @@ public suspend inline fun TelegramBot.sendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -83,7 +83,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
|
||||
public fun getAllowedUpdates ()Ljava/util/List;
|
||||
public fun getAsUpdateReceiver ()Lkotlin/jvm/functions/Function2;
|
||||
public fun getBot ()Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public fun getBotSubscriptionUpdatedUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getBusinessConnectionUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getBusinessMessageUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getCallbackQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
|
||||
@@ -166,11 +166,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/B
|
||||
public static synthetic fun expectOne$default (Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitBotSubscriptionUpdatedKt {
|
||||
public static final fun waitBotSubscriptionUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitBotSubscriptionUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitBusinessConnectionKt {
|
||||
public static final fun waitBusinessConnection (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitBusinessConnection$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
@@ -663,10 +658,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
|
||||
public static synthetic fun waitChecklistTasksDone$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitCommonEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitCommonEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitCommunityChatAdded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitCommunityChatAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitCommunityChatRemoved (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitCommunityChatRemoved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitDeleteChatPhotoEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitDeleteChatPhotoEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitForumTopicClosed (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
@@ -788,10 +779,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
|
||||
public static synthetic fun waitChatSharedRequestEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitCommonEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitCommonEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitCommunityChatAddedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitCommunityChatAddedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitCommunityChatRemovedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitCommunityChatRemovedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitDeleteChatPhotoEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun waitDeleteChatPhotoEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun waitForumTopicClosedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
@@ -1037,11 +1024,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/Messag
|
||||
public static final fun getMessageFilterForums ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BotSubscriptionUpdatedTriggersKt {
|
||||
public static final fun onBotSubscriptionUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
public static synthetic fun onBotSubscriptionUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggersKt {
|
||||
public static final fun onBusinessConnection (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
public static synthetic fun onBusinessConnection$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
@@ -1437,10 +1419,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
|
||||
public static synthetic fun onChecklistTasksDone$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
public static final fun onCommonEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
public static synthetic fun onCommonEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
public static final fun onCommunityChatAdded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
public static synthetic fun onCommunityChatAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
public static final fun onCommunityChatRemoved (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
public static synthetic fun onCommunityChatRemoved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
public static final fun onDeleteChatPhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
public static synthetic fun onDeleteChatPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||
public static final fun onForumTopicClosed (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||
@@ -1892,12 +1870,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_f
|
||||
public fun invoke-ErVIubg (Ldev/inmo/tgbotapi/types/polls/Poll;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBotSubscriptionUpdatedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBotSubscriptionUpdatedMarkerFactory;
|
||||
public fun invoke (Ldev/inmo/tgbotapi/types/payments/BotSubscriptionUpdated;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBusinessConnectionUpdatedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBusinessConnectionUpdatedMarkerFactory;
|
||||
public fun invoke (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
import dev.inmo.tgbotapi.extensions.utils.botSubscriptionUpdatedUpdateOrNull
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
fun BehaviourContext.waitBotSubscriptionUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<BotSubscriptionUpdated> = expectFlow(
|
||||
initRequest,
|
||||
errorFactory
|
||||
) {
|
||||
(it.botSubscriptionUpdatedUpdateOrNull() ?.data).let(::listOfNotNull)
|
||||
}
|
||||
@@ -10,8 +10,6 @@ import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
|
||||
@@ -329,16 +327,6 @@ fun BehaviourContext.waitSuggestedPostRefunded(
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<SuggestedPostRefunded>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitCommunityChatAdded(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<CommunityChatAdded>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitCommunityChatRemoved(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<CommunityChatRemoved>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitSuggestedPostDeclined(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
|
||||
@@ -7,8 +7,6 @@ import dev.inmo.tgbotapi.extensions.utils.*
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
|
||||
@@ -253,13 +251,3 @@ fun BehaviourContext.waitUniqueGiftSentOrReceivedMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GiftSentOrReceivedEvent.UniqueGift>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitCommunityChatAddedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<CommunityChatAdded>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitCommunityChatRemovedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<CommunityChatRemoved>(initRequest, errorFactory)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserBotSubscriptionUpdatedMarkerFactory
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
||||
import dev.inmo.tgbotapi.extensions.utils.botSubscriptionUpdatedUpdateOrNull
|
||||
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onBotSubscriptionUpdated(
|
||||
initialFilter: SimpleFilter<BotSubscriptionUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BotSubscriptionUpdated, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BotSubscriptionUpdated, Any>? = ByUserBotSubscriptionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BotSubscriptionUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BotSubscriptionUpdated>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.botSubscriptionUpdatedUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
@@ -15,8 +15,6 @@ import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
|
||||
@@ -1454,45 +1452,3 @@ fun <BC : BehaviourContext> BC.onSuggestedPostRefunded(
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onCommunityChatAdded(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<CommunityChatAdded>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<CommunityChatAdded>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<CommunityChatAdded>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<CommunityChatAdded>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<CommunityChatAdded>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onCommunityChatRemoved(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<CommunityChatRemoved>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<CommunityChatRemoved>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<CommunityChatRemoved>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<CommunityChatRemoved>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<CommunityChatRemoved>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
|
||||
|
||||
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
|
||||
|
||||
object ByUserBotSubscriptionUpdatedMarkerFactory : MarkerFactory<BotSubscriptionUpdated, Any> {
|
||||
override suspend fun invoke(data: BotSubscriptionUpdated) = data.user
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
||||
package dev.inmo.tgbotapi.abstracts.types
|
||||
|
||||
import dev.inmo.tgbotapi.types.EphemeralMessageId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
|
||||
interface EphemeralMessageAction : ChatRequest {
|
||||
val receiverUserId: UserId
|
||||
val ephemeralMessageId: EphemeralMessageId
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.EphemeralMessageAction
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
@Serializable
|
||||
data class DeleteEphemeralMessage(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(receiverUserIdField)
|
||||
@EncodeDefault
|
||||
override val receiverUserId: UserId,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
@EncodeDefault
|
||||
override val ephemeralMessageId: EphemeralMessageId
|
||||
) : SimpleRequest<Unit>, EphemeralMessageAction {
|
||||
constructor(
|
||||
chatId: EphemeralChatId
|
||||
): this(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" }
|
||||
)
|
||||
|
||||
override fun method(): String = "deleteEphemeralMessage"
|
||||
|
||||
override val resultDeserializer: DeserializationStrategy<Unit>
|
||||
get() = UnitFromBooleanSerializer
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.EphemeralMessageAction
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
interface EditEphemeralMessage : SimpleRequest<Unit>, EphemeralMessageAction {
|
||||
override val resultDeserializer: DeserializationStrategy<Unit>
|
||||
get() = UnitFromBooleanSerializer
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.caption
|
||||
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.parseModeField
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.message.*
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
import kotlinx.serialization.*
|
||||
|
||||
const val editEphemeralMessageCaptionMethod = "editEphemeralMessageCaption"
|
||||
|
||||
fun EditEphemeralMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
caption: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageCaption(
|
||||
chatId = chatId,
|
||||
receiverUserId = receiverUserId,
|
||||
ephemeralMessageId = ephemeralMessageId,
|
||||
text = caption,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
fun EditEphemeralMessageCaption(
|
||||
chatId: EphemeralChatId,
|
||||
caption: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageCaption(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
caption = caption,
|
||||
parseMode = parseMode,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
fun EditEphemeralMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageCaption(
|
||||
chatId = chatId,
|
||||
receiverUserId = receiverUserId,
|
||||
ephemeralMessageId = ephemeralMessageId,
|
||||
text = entities.makeString(),
|
||||
parseMode = null,
|
||||
rawEntities = entities.toRawMessageEntities(),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
fun EditEphemeralMessageCaption(
|
||||
chatId: EphemeralChatId,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageCaption(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
entities = entities,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
@ConsistentCopyVisibility
|
||||
@Serializable
|
||||
data class EditEphemeralMessageCaption internal constructor(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(receiverUserIdField)
|
||||
@EncodeDefault
|
||||
override val receiverUserId: UserId,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
@EncodeDefault
|
||||
override val ephemeralMessageId: EphemeralMessageId,
|
||||
@SerialName(captionField)
|
||||
override val text: String? = null,
|
||||
@SerialName(parseModeField)
|
||||
override val parseMode: ParseMode? = null,
|
||||
@SerialName(captionEntitiesField)
|
||||
private val rawEntities: List<RawMessageEntity>? = null,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||
) : EditEphemeralMessage, EditTextChatMessage, EditReplyMessage {
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
}
|
||||
|
||||
override fun method(): String = editEphemeralMessageCaptionMethod
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.media
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import kotlinx.serialization.*
|
||||
|
||||
const val editEphemeralMessageMediaMethod = "editEphemeralMessageMedia"
|
||||
|
||||
@Serializable
|
||||
data class EditEphemeralMessageMedia(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(receiverUserIdField)
|
||||
@EncodeDefault
|
||||
override val receiverUserId: UserId,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
@EncodeDefault
|
||||
override val ephemeralMessageId: EphemeralMessageId,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@SerialName(mediaField)
|
||||
override val media: TelegramFreeMedia,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||
) : EditEphemeralMessage, EditReplyMessage, EditMediaMessage {
|
||||
constructor(
|
||||
chatId: EphemeralChatId,
|
||||
media: TelegramFreeMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): this(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
media,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
init {
|
||||
require(media.file !is MultipartFile) {
|
||||
"For editing of ephemeral media messages you MUST use file id (uploading of a new file is not supported)"
|
||||
}
|
||||
}
|
||||
|
||||
override fun method(): String = editEphemeralMessageMediaMethod
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.reply_markup
|
||||
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.EditEphemeralMessage
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.EditReplyMessage
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import kotlinx.serialization.*
|
||||
|
||||
const val editEphemeralMessageReplyMarkupMethod = "editEphemeralMessageReplyMarkup"
|
||||
|
||||
@Serializable
|
||||
data class EditEphemeralMessageReplyMarkup(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(receiverUserIdField)
|
||||
@EncodeDefault
|
||||
override val receiverUserId: UserId,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
@EncodeDefault
|
||||
override val ephemeralMessageId: EphemeralMessageId,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||
) : EditEphemeralMessage, EditReplyMessage {
|
||||
constructor(
|
||||
chatId: EphemeralChatId,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): this(
|
||||
chatId,
|
||||
chatId.receiverUser,
|
||||
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
override fun method(): String = editEphemeralMessageReplyMarkupMethod
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.text
|
||||
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.parseModeField
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.message.*
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
import dev.inmo.tgbotapi.utils.throwRangeError
|
||||
import kotlinx.serialization.*
|
||||
|
||||
const val editEphemeralMessageTextMethod = "editEphemeralMessageText"
|
||||
|
||||
fun EditEphemeralMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageText(
|
||||
chatId = chatId,
|
||||
receiverUserId = receiverUserId,
|
||||
ephemeralMessageId = ephemeralMessageId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
linkPreviewOptions = linkPreviewOptions,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
fun EditEphemeralMessageText(
|
||||
chatId: EphemeralChatId,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageText(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
linkPreviewOptions = linkPreviewOptions,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
fun EditEphemeralMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
receiverUserId: UserId,
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageText(
|
||||
chatId = chatId,
|
||||
receiverUserId = receiverUserId,
|
||||
ephemeralMessageId = ephemeralMessageId,
|
||||
text = entities.makeString(),
|
||||
parseMode = null,
|
||||
rawEntities = entities.toRawMessageEntities(),
|
||||
linkPreviewOptions = linkPreviewOptions,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
fun EditEphemeralMessageText(
|
||||
chatId: EphemeralChatId,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = EditEphemeralMessageText(
|
||||
chatId = chatId,
|
||||
receiverUserId = chatId.receiverUser,
|
||||
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
|
||||
entities = entities,
|
||||
linkPreviewOptions = linkPreviewOptions,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
@ConsistentCopyVisibility
|
||||
@Serializable
|
||||
data class EditEphemeralMessageText internal constructor(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(receiverUserIdField)
|
||||
@EncodeDefault
|
||||
override val receiverUserId: UserId,
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
@EncodeDefault
|
||||
override val ephemeralMessageId: EphemeralMessageId,
|
||||
@SerialName(textField)
|
||||
override val text: String,
|
||||
@SerialName(parseModeField)
|
||||
override val parseMode: ParseMode? = null,
|
||||
@SerialName(entitiesField)
|
||||
private val rawEntities: List<RawMessageEntity>? = null,
|
||||
@SerialName(linkPreviewOptionsField)
|
||||
override val linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||
) : EditEphemeralMessage, EditTextChatMessage, EditReplyMessage, EditLinkPreviewOptionsContainer {
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text)
|
||||
}
|
||||
|
||||
init {
|
||||
if (text.length !in textLength) {
|
||||
throwRangeError("Text length", textLength, text.length)
|
||||
}
|
||||
}
|
||||
|
||||
override fun method(): String = editEphemeralMessageTextMethod
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package dev.inmo.tgbotapi.requests.send
|
||||
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyEphemeralSendRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
||||
@@ -37,10 +36,6 @@ data class SendContact(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -56,8 +51,7 @@ data class SendContact(
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: KeyboardMarkup? = null
|
||||
) : SendContentMessageRequest<ChatContentMessage<ContactContent>>,
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<ContactContent>>,
|
||||
OptionallyEphemeralSendRequest
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<ContactContent>>
|
||||
{
|
||||
constructor(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -65,8 +59,6 @@ data class SendContact(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -82,8 +74,6 @@ data class SendContact(
|
||||
threadId,
|
||||
directMessageThreadId,
|
||||
businessConnectionId,
|
||||
receiverUserId,
|
||||
callbackQueryId,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
allowPaidBroadcast,
|
||||
@@ -105,8 +95,6 @@ fun Contact.toRequest(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -120,8 +108,6 @@ fun Contact.toRequest(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -34,8 +34,6 @@ fun SendLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -50,8 +48,6 @@ fun SendLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -68,8 +64,6 @@ fun SendStaticLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -84,8 +78,6 @@ fun SendStaticLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -95,11 +87,6 @@ fun SendStaticLocation(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param livePeriod According to Telegram Bots API, must be `0` when sending as an ephemeral message (with
|
||||
* [receiverUserId] set), as ephemeral messages do not support live location updates. Prefer [SendStaticLocation]
|
||||
* for ephemeral locations.
|
||||
*/
|
||||
fun SendLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
@@ -111,8 +98,6 @@ fun SendLiveLocation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -131,8 +116,6 @@ fun SendLiveLocation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -149,15 +132,9 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
HorizontallyAccured,
|
||||
Livable,
|
||||
ProximityAlertable,
|
||||
Headed,
|
||||
OptionallyEphemeralSendRequest {
|
||||
Headed {
|
||||
override fun method(): String = "sendLocation"
|
||||
|
||||
/**
|
||||
* @property livePeriod According to Telegram Bots API, must be `0` when sending as an ephemeral message (with
|
||||
* [receiverUserId] set), as ephemeral messages do not support live location updates. Prefer [Static]
|
||||
* for ephemeral locations.
|
||||
*/
|
||||
@Serializable
|
||||
data class Live (
|
||||
@SerialName(chatIdField)
|
||||
@@ -188,10 +165,6 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@EncodeDefault
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -242,10 +215,6 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@EncodeDefault
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -298,10 +267,6 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -332,8 +297,6 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
threadId = surrogate.threadId,
|
||||
directMessageThreadId = surrogate.directMessageThreadId,
|
||||
businessConnectionId = surrogate.businessConnectionId,
|
||||
receiverUserId = surrogate.receiverUserId,
|
||||
callbackQueryId = surrogate.callbackQueryId,
|
||||
disableNotification = surrogate.disableNotification,
|
||||
protectContent = surrogate.protectContent,
|
||||
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
||||
@@ -353,8 +316,6 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
threadId = surrogate.threadId,
|
||||
directMessageThreadId = surrogate.directMessageThreadId,
|
||||
businessConnectionId = surrogate.businessConnectionId,
|
||||
receiverUserId = surrogate.receiverUserId,
|
||||
callbackQueryId = surrogate.callbackQueryId,
|
||||
disableNotification = surrogate.disableNotification,
|
||||
protectContent = surrogate.protectContent,
|
||||
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
||||
@@ -379,8 +340,6 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -30,8 +30,6 @@ fun SendTextMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -47,8 +45,6 @@ fun SendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
linkPreviewOptions = linkPreviewOptions,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -66,8 +62,6 @@ fun SendTextMessage(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -83,8 +77,6 @@ fun SendTextMessage(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
linkPreviewOptions = linkPreviewOptions,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -116,10 +108,6 @@ data class SendTextMessage internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(linkPreviewOptionsField)
|
||||
override val linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
@@ -139,8 +127,7 @@ data class SendTextMessage internal constructor(
|
||||
) : SendContentMessageRequest<ChatContentMessage<TextContent>>,
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<TextContent>>,
|
||||
TextableSendMessageRequest<ChatContentMessage<TextContent>>,
|
||||
LinkPreviewOptionsContainer,
|
||||
OptionallyEphemeralSendRequest
|
||||
LinkPreviewOptionsContainer
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text)
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package dev.inmo.tgbotapi.requests.send
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartRequest
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
@@ -13,7 +10,6 @@ import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||
import dev.inmo.tgbotapi.types.message.content.RichMessageContent
|
||||
import dev.inmo.tgbotapi.types.rich.InputRichMessage
|
||||
import dev.inmo.tgbotapi.types.rich.multipartFiles
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.EncodeDefault
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
@@ -60,14 +56,10 @@ data class SendRichMessage(
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: KeyboardMarkup? = null
|
||||
) : SendContentMessageRequest<ChatContentMessage<RichMessageContent>>,
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<RichMessageContent>>,
|
||||
MultipartRequest.Common<ChatContentMessage<RichMessageContent>> {
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<RichMessageContent>> {
|
||||
override fun method(): String = "sendRichMessage"
|
||||
override val resultDeserializer: DeserializationStrategy<ChatContentMessage<RichMessageContent>>
|
||||
get() = RichMessageContentMessageResultDeserializer
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
override val data: SimpleRequest<ChatContentMessage<RichMessageContent>>
|
||||
get() = this
|
||||
override val mediaMap: Map<String, MultipartFile> by lazy { richMessage.multipartFiles }
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.draftIdField
|
||||
import dev.inmo.tgbotapi.types.messageThreadIdField
|
||||
import dev.inmo.tgbotapi.types.richMessageField
|
||||
import dev.inmo.tgbotapi.types.rich.InputRichMessage
|
||||
import dev.inmo.tgbotapi.types.rich.multipartFiles
|
||||
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
@@ -40,9 +39,6 @@ data class SendRichMessageDraft(
|
||||
require(draftId != 0L) {
|
||||
"draftId of SendRichMessageDraft must be non-zero"
|
||||
}
|
||||
require(richMessage.multipartFiles.isEmpty()) {
|
||||
"sendRichMessageDraft does not support direct upload of new files"
|
||||
}
|
||||
}
|
||||
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
|
||||
@@ -45,10 +45,6 @@ data class SendVenue(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -66,8 +62,7 @@ data class SendVenue(
|
||||
) : SendContentMessageRequest<ChatContentMessage<VenueContent>>,
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<VenueContent>>,
|
||||
TitledSendMessageRequest<ChatContentMessage<VenueContent>>,
|
||||
PositionedSendMessageRequest<ChatContentMessage<VenueContent>>,
|
||||
OptionallyEphemeralSendRequest
|
||||
PositionedSendMessageRequest<ChatContentMessage<VenueContent>>
|
||||
{
|
||||
constructor(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -75,8 +70,6 @@ data class SendVenue(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -97,8 +90,6 @@ data class SendVenue(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -120,8 +111,6 @@ fun Venue.toRequest(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -135,8 +124,6 @@ fun Venue.toRequest(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.send.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.CallbackQueryId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
|
||||
/**
|
||||
* Inheritors of this interface may be sent as ephemeral messages (visible only to [receiverUserId] and the bot)
|
||||
* by passing a non-null [receiverUserId]. Available for groups/supergroups only.
|
||||
*/
|
||||
interface OptionallyEphemeralSendRequest {
|
||||
val receiverUserId: UserId?
|
||||
val callbackQueryId: CallbackQueryId?
|
||||
}
|
||||
@@ -38,8 +38,6 @@ fun SendAnimation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -66,8 +64,6 @@ fun SendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -100,8 +96,6 @@ fun SendAnimation(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -128,8 +122,6 @@ fun SendAnimation(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -187,10 +179,6 @@ data class SendAnimationData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -213,8 +201,7 @@ data class SendAnimationData internal constructor(
|
||||
DuratedSendMessageRequest<ChatContentMessage<AnimationContent>>,
|
||||
SizedSendMessageRequest<ChatContentMessage<AnimationContent>>,
|
||||
WithCustomizableCaptionRequest<ChatContentMessage<AnimationContent>>,
|
||||
OptionallyWithSpoilerRequest,
|
||||
OptionallyEphemeralSendRequest
|
||||
OptionallyWithSpoilerRequest
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -37,8 +37,6 @@ fun SendAudio(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -63,8 +61,6 @@ fun SendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -95,8 +91,6 @@ fun SendAudio(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -121,8 +115,6 @@ fun SendAudio(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -176,10 +168,6 @@ data class SendAudioData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -201,8 +189,7 @@ data class SendAudioData internal constructor(
|
||||
ThumbedSendMessageRequest<ChatContentMessage<AudioContent>>,
|
||||
TitledSendMessageRequest<ChatContentMessage<AudioContent>>,
|
||||
DuratedSendMessageRequest<ChatContentMessage<AudioContent>>,
|
||||
Performerable,
|
||||
OptionallyEphemeralSendRequest
|
||||
Performerable
|
||||
{
|
||||
override val textSources: List<TextSource>? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -42,8 +42,6 @@ fun SendDocument(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -66,8 +64,6 @@ fun SendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -105,8 +101,6 @@ fun SendDocument(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -129,8 +123,6 @@ fun SendDocument(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -188,10 +180,6 @@ data class SendDocumentData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -212,8 +200,7 @@ data class SendDocumentData internal constructor(
|
||||
SendContentMessageRequest<ChatContentMessage<DocumentContent>>,
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<DocumentContent>>,
|
||||
TextableSendMessageRequest<ChatContentMessage<DocumentContent>>,
|
||||
ThumbedSendMessageRequest<ChatContentMessage<DocumentContent>>,
|
||||
OptionallyEphemeralSendRequest
|
||||
ThumbedSendMessageRequest<ChatContentMessage<DocumentContent>>
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -35,8 +35,6 @@ fun SendLivePhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -60,8 +58,6 @@ fun SendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -91,8 +87,6 @@ fun SendLivePhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -116,8 +110,6 @@ fun SendLivePhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -169,10 +161,6 @@ data class SendLivePhotoData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -192,8 +180,7 @@ data class SendLivePhotoData internal constructor(
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<LivePhotoContent>>,
|
||||
TextableSendMessageRequest<ChatContentMessage<LivePhotoContent>>,
|
||||
WithCustomizableCaptionRequest<ChatContentMessage<LivePhotoContent>>,
|
||||
OptionallyWithSpoilerRequest,
|
||||
OptionallyEphemeralSendRequest
|
||||
OptionallyWithSpoilerRequest
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -33,8 +33,6 @@ fun SendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -54,8 +52,6 @@ fun SendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -83,8 +79,6 @@ fun SendPhoto(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -104,8 +98,6 @@ fun SendPhoto(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -155,10 +147,6 @@ data class SendPhotoData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -178,8 +166,7 @@ data class SendPhotoData internal constructor(
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<PhotoContent>>,
|
||||
TextableSendMessageRequest<ChatContentMessage<PhotoContent>>,
|
||||
WithCustomizableCaptionRequest<ChatContentMessage<PhotoContent>>,
|
||||
OptionallyWithSpoilerRequest,
|
||||
OptionallyEphemeralSendRequest
|
||||
OptionallyWithSpoilerRequest
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.requests.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.*
|
||||
import dev.inmo.tgbotapi.requests.common.CommonMultipartFileRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyEphemeralSendRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
||||
@@ -23,8 +22,6 @@ fun SendSticker(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
emoji: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -39,8 +36,6 @@ fun SendSticker(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
emoji = emoji,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
@@ -79,10 +74,6 @@ data class SendStickerByFileId internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(emojiField)
|
||||
val emoji: String? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
@@ -99,7 +90,7 @@ data class SendStickerByFileId internal constructor(
|
||||
override val replyParameters: ReplyParameters? = null,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: KeyboardMarkup? = null
|
||||
) : SendContentMessageRequest<ChatContentMessage<StickerContent>>, ReplyingMarkupSendMessageRequest<ChatContentMessage<StickerContent>>, OptionallyEphemeralSendRequest {
|
||||
) : SendContentMessageRequest<ChatContentMessage<StickerContent>>, ReplyingMarkupSendMessageRequest<ChatContentMessage<StickerContent>> {
|
||||
override fun method(): String = "sendSticker"
|
||||
override val resultDeserializer: DeserializationStrategy<ChatContentMessage<StickerContent>>
|
||||
get() = commonResultDeserializer
|
||||
|
||||
@@ -43,8 +43,6 @@ fun SendVideo(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -75,8 +73,6 @@ fun SendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -112,8 +108,6 @@ fun SendVideo(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -144,8 +138,6 @@ fun SendVideo(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -209,10 +201,6 @@ data class SendVideoData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -238,8 +226,7 @@ data class SendVideoData internal constructor(
|
||||
CoveredSendMessageRequest<ChatContentMessage<VideoContent>>,
|
||||
WithCustomStartMediaData,
|
||||
OptionallyWithSpoilerRequest,
|
||||
OptionallyStreamable,
|
||||
OptionallyEphemeralSendRequest
|
||||
OptionallyStreamable
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -25,8 +25,6 @@ fun SendVideoNote(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -47,8 +45,6 @@ fun SendVideoNote(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -94,10 +90,6 @@ data class SendVideoNoteData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -117,8 +109,7 @@ data class SendVideoNoteData internal constructor(
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
|
||||
ThumbedSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
|
||||
DuratedSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
|
||||
SizedSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
|
||||
OptionallyEphemeralSendRequest
|
||||
SizedSendMessageRequest<ChatContentMessage<VideoNoteContent>>
|
||||
{
|
||||
override val height: Int?
|
||||
get() = width
|
||||
|
||||
@@ -31,8 +31,6 @@ fun SendVoice(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -53,8 +51,6 @@ fun SendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -81,8 +77,6 @@ fun SendVoice(
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
receiverUserId: UserId? = chatId.receiverUser,
|
||||
callbackQueryId: CallbackQueryId? = null,
|
||||
duration: Long? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
@@ -104,8 +98,6 @@ fun SendVoice(
|
||||
threadId = threadId,
|
||||
directMessageThreadId = directMessageThreadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
receiverUserId = receiverUserId,
|
||||
callbackQueryId = callbackQueryId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -153,10 +145,6 @@ data class SendVoiceData internal constructor(
|
||||
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||
@SerialName(receiverUserIdField)
|
||||
override val receiverUserId: UserId? = chatId.receiverUser,
|
||||
@SerialName(callbackQueryIdField)
|
||||
override val callbackQueryId: CallbackQueryId? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -175,8 +163,7 @@ data class SendVoiceData internal constructor(
|
||||
SendContentMessageRequest<ChatContentMessage<VoiceContent>>,
|
||||
ReplyingMarkupSendMessageRequest<ChatContentMessage<VoiceContent>>,
|
||||
TextableSendMessageRequest<ChatContentMessage<VoiceContent>>,
|
||||
DuratedSendMessageRequest<ChatContentMessage<VoiceContent>>,
|
||||
OptionallyEphemeralSendRequest
|
||||
DuratedSendMessageRequest<ChatContentMessage<VoiceContent>>
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
|
||||
@@ -14,9 +14,7 @@ data class BotCommand(
|
||||
@SerialName(botCommandField)
|
||||
val command: String,
|
||||
@SerialName(descriptionField)
|
||||
val description: String,
|
||||
@SerialName(isEphemeralField)
|
||||
val isEphemeral: Boolean = false
|
||||
val description: String
|
||||
) {
|
||||
init {
|
||||
if (command.length !in botCommandLengthLimit) {
|
||||
|
||||
@@ -39,10 +39,6 @@ sealed interface IdChatIdentifier : ChatIdentifier {
|
||||
get() = null
|
||||
val directMessageThreadId: DirectMessageThreadId?
|
||||
get() = null
|
||||
val receiverUser: UserId?
|
||||
get() = null
|
||||
val ephemeralMessageId: EphemeralMessageId?
|
||||
get() = null
|
||||
|
||||
companion object {
|
||||
operator fun invoke(chatId: RawChatId, threadId: MessageThreadId? = null, businessConnectionId: BusinessConnectionId? = null) = threadId ?.let {
|
||||
@@ -52,7 +48,6 @@ sealed interface IdChatIdentifier : ChatIdentifier {
|
||||
} ?: ChatId(chatId)
|
||||
operator fun invoke(chatId: RawChatId, threadId: MessageThreadId) = ChatIdWithThreadId(chatId, threadId)
|
||||
operator fun invoke(chatId: RawChatId, businessConnectionId: BusinessConnectionId) = BusinessChatId(chatId, businessConnectionId)
|
||||
operator fun invoke(chatId: RawChatId, receiverUser: UserId, ephemeralMessageId: EphemeralMessageId? = null) = EphemeralChatId(chatId, receiverUser, ephemeralMessageId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,26 +91,6 @@ value class BusinessChatId(val chatIdWithBusinessConnectionId: Pair<RawChatId, B
|
||||
constructor(chatId: RawChatId, businessConnectionId: BusinessConnectionId): this(chatId to businessConnectionId)
|
||||
}
|
||||
|
||||
/**
|
||||
* Chat id of group/supergroup additionally carrying ephemeral [receiverUser] (and optional [ephemeralMessageId]);
|
||||
* used to default `receiverUserId`/`ephemeralMessageId` params of ephemeral-related requests
|
||||
*/
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@Serializable(ChatIdentifierSerializer::class)
|
||||
@JvmInline
|
||||
value class EphemeralChatId(
|
||||
val chatIdWithReceiverUserAndEphemeralMessageId: Triple<RawChatId, UserId, EphemeralMessageId?>
|
||||
) : IdChatIdentifier {
|
||||
override val chatId: RawChatId
|
||||
get() = chatIdWithReceiverUserAndEphemeralMessageId.first
|
||||
override val receiverUser: UserId
|
||||
get() = chatIdWithReceiverUserAndEphemeralMessageId.second
|
||||
override val ephemeralMessageId: EphemeralMessageId?
|
||||
get() = chatIdWithReceiverUserAndEphemeralMessageId.third
|
||||
|
||||
constructor(chatId: RawChatId, receiverUser: UserId, ephemeralMessageId: EphemeralMessageId? = null): this(Triple(chatId, receiverUser, ephemeralMessageId))
|
||||
}
|
||||
|
||||
val ChatIdentifier.threadId: MessageThreadId?
|
||||
get() = (this as? IdChatIdentifier) ?.threadId
|
||||
|
||||
@@ -125,24 +100,16 @@ val ChatIdentifier.directMessageThreadId: DirectMessageThreadId?
|
||||
val ChatIdentifier.businessConnectionId: BusinessConnectionId?
|
||||
get() = (this as? IdChatIdentifier) ?.businessConnectionId
|
||||
|
||||
val ChatIdentifier.receiverUser: UserId?
|
||||
get() = (this as? IdChatIdentifier) ?.receiverUser
|
||||
|
||||
val ChatIdentifier.ephemeralMessageId: EphemeralMessageId?
|
||||
get() = (this as? IdChatIdentifier) ?.ephemeralMessageId
|
||||
|
||||
fun IdChatIdentifier.toChatId() = when (this) {
|
||||
is ChatId -> this
|
||||
is ChatIdWithThreadId -> ChatId(chatId)
|
||||
is ChatIdWithChannelDirectMessageThreadId -> ChatId(chatId)
|
||||
is BusinessChatId -> ChatId(chatId)
|
||||
is EphemeralChatId -> ChatId(chatId)
|
||||
}
|
||||
|
||||
fun IdChatIdentifier.toChatWithThreadId(threadId: MessageThreadId) = IdChatIdentifier(chatId, threadId)
|
||||
fun IdChatIdentifier.toChatIdWithChannelDirectMessageThreadId(threadId: DirectMessageThreadId) = ChatIdWithChannelDirectMessageThreadId(chatId, threadId)
|
||||
fun IdChatIdentifier.toBusinessChatId(businessConnectionId: BusinessConnectionId) = IdChatIdentifier(chatId, businessConnectionId)
|
||||
fun IdChatIdentifier.toEphemeralChatId(receiverUser: UserId, ephemeralMessageId: EphemeralMessageId? = null) = IdChatIdentifier(chatId, receiverUser, ephemeralMessageId)
|
||||
|
||||
/**
|
||||
* https://core.telegram.org/bots/api#formatting-options
|
||||
@@ -289,17 +256,6 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
|
||||
)
|
||||
}
|
||||
}
|
||||
4 -> {
|
||||
val (chatId, intermediateDelimiter, receiverUserChatId, ephemeralMessageId) = splitted
|
||||
when (intermediateDelimiter) {
|
||||
"eph" -> EphemeralChatId(
|
||||
chatId.toLongOrNull() ?.let(::RawChatId) ?: return@let null,
|
||||
receiverUserChatId.toLongOrNull() ?.let { ChatId(RawChatId(it)) } ?: return@let null,
|
||||
ephemeralMessageId.toLongOrNull() ?.let(::EphemeralMessageId)
|
||||
)
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
} ?: id.content.let {
|
||||
@@ -313,7 +269,6 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
|
||||
is ChatIdWithThreadId -> encoder.encodeString("${value.chatId}/${value.threadId}")
|
||||
is BusinessChatId -> encoder.encodeString("${value.chatId}//${value.businessConnectionId}")
|
||||
is ChatIdWithChannelDirectMessageThreadId -> encoder.encodeString("${value.chatId}/cdm/${value.directMessageThreadId}")
|
||||
is EphemeralChatId -> encoder.encodeString("${value.chatId}/eph/${value.receiverUser.chatId}/${value.ephemeralMessageId?.long ?: ""}")
|
||||
is Username -> encoder.encodeString(value.full)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,7 +466,6 @@ const val botCommandField = "command"
|
||||
const val botCommandFullField = "bot_command"
|
||||
const val botCommandsField = "commands"
|
||||
const val scopeField = "scope"
|
||||
const val isEphemeralField = "is_ephemeral"
|
||||
|
||||
const val isMemberField = "is_member"
|
||||
const val isForumField = "is_forum"
|
||||
@@ -757,9 +756,6 @@ const val mainFrameTimestampField = "main_frame_timestamp"
|
||||
const val firstProfileAudioField = "first_profile_audio"
|
||||
const val paidMessageStarCountField = "paid_message_star_count"
|
||||
const val senderTagField = "sender_tag"
|
||||
const val receiverUserField = "receiver_user"
|
||||
const val receiverUserIdField = "receiver_user_id"
|
||||
const val ephemeralMessageIdField = "ephemeral_message_id"
|
||||
const val countField = "count"
|
||||
const val ratingField = "rating"
|
||||
const val uniqueGiftColorsField = "unique_gift_colors"
|
||||
@@ -946,6 +942,4 @@ const val temperatureField = "temperature"
|
||||
const val backgroundColorField = "background_color"
|
||||
const val keepOriginalDetailsField = "keep_original_details"
|
||||
|
||||
const val communityField = "community"
|
||||
|
||||
const val codecField = "codec"
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class EphemeralMessageId(
|
||||
val long: Long
|
||||
) {
|
||||
override fun toString(): String {
|
||||
return long.toString()
|
||||
}
|
||||
}
|
||||
|
||||
fun Long.asEphemeralMessageId() = EphemeralMessageId(this)
|
||||
@@ -2,351 +2,195 @@ package dev.inmo.tgbotapi.types
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.TextedInput
|
||||
import dev.inmo.tgbotapi.abstracts.WithMessageId
|
||||
import dev.inmo.tgbotapi.types.chat.Bot
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewBot
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
|
||||
import dev.inmo.tgbotapi.types.polls.PollOptionPersistentId
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage
|
||||
import dev.inmo.tgbotapi.types.message.asTextSources
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.polls.PollOptionPersistentId
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationException
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
|
||||
@Serializable(ReplyParameters.Serializer::class)
|
||||
sealed interface ReplyParameters {
|
||||
val messageId: MessageId?
|
||||
val allowSendingWithoutReply: Boolean?
|
||||
val checklistTaskId: ChecklistTaskId?
|
||||
val pollOptionId: PollOptionPersistentId?
|
||||
|
||||
/**
|
||||
* 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. Public
|
||||
* construction uses the `ReplyParameters(...)` companion factories.
|
||||
*/
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@ConsistentCopyVisibility
|
||||
@Serializable(ReplyParameters.Serializer::class)
|
||||
data class Chat internal constructor(
|
||||
val chatIdentifier: ChatIdentifier?,
|
||||
override val messageId: MessageId,
|
||||
override val allowSendingWithoutReply: Boolean? = null,
|
||||
val quote: String? = null,
|
||||
val quoteParseMode: ParseMode? = null,
|
||||
internal val quoteEntities: List<RawMessageEntity>? = null,
|
||||
val quotePosition: Int? = null,
|
||||
override val checklistTaskId: ChecklistTaskId? = null,
|
||||
override val pollOptionId: PollOptionPersistentId? = null,
|
||||
) : WithMessageId, ReplyParameters, TextedInput {
|
||||
override val text: String?
|
||||
get() = quote
|
||||
override val textSources: List<TextSource> by lazy {
|
||||
quoteEntities ?.asTextSources(quote ?: return@lazy emptyList()) ?: emptyList()
|
||||
}
|
||||
@ConsistentCopyVisibility
|
||||
@Serializable
|
||||
data class ReplyParameters internal constructor(
|
||||
@SerialName(chatIdField)
|
||||
val chatIdentifier: ChatIdentifier,
|
||||
@SerialName(messageIdField)
|
||||
override val messageId: MessageId,
|
||||
@SerialName(allowSendingWithoutReplyField)
|
||||
val allowSendingWithoutReply: Boolean? = null,
|
||||
@SerialName(quoteField)
|
||||
val quote: String? = null,
|
||||
@SerialName(quoteParseModeField)
|
||||
val quoteParseMode: ParseMode? = null,
|
||||
@SerialName(quoteEntitiesField)
|
||||
private val quoteEntities: List<RawMessageEntity>? = null,
|
||||
@SerialName(quotePositionField)
|
||||
val quotePosition: Int? = null,
|
||||
@SerialName(checklistTaskIdField)
|
||||
val checklistTaskId: ChecklistTaskId? = null,
|
||||
@SerialName(pollOptionIdField)
|
||||
val pollOptionId: PollOptionPersistentId? = null,
|
||||
) : WithMessageId, TextedInput {
|
||||
override val text: String?
|
||||
get() = quote
|
||||
override val textSources: List<TextSource> by lazy {
|
||||
quoteEntities ?.asTextSources(quote ?: return@lazy emptyList()) ?: emptyList()
|
||||
}
|
||||
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@Serializable(ReplyParameters.Serializer::class)
|
||||
/**
|
||||
* Reply parameters targeting an incoming ephemeral message identified by [ephemeralMessageId]. The outgoing
|
||||
* reply must also be ephemeral; chat and quote fields are unsupported for ephemeral replies. Type-neutral
|
||||
* construction is available through the `ReplyParameters(...)` companion factory.
|
||||
*/
|
||||
data class Ephemeral(
|
||||
val ephemeralMessageId: EphemeralMessageId,
|
||||
override val allowSendingWithoutReply: Boolean? = null,
|
||||
override val checklistTaskId: ChecklistTaskId? = null,
|
||||
override val pollOptionId: PollOptionPersistentId? = null,
|
||||
) : ReplyParameters {
|
||||
override val messageId: MessageId? = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
operator fun invoke(
|
||||
ephemeralMessageId: EphemeralMessageId,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
checklistTaskId: ChecklistTaskId? = null,
|
||||
pollOptionId: PollOptionPersistentId? = null,
|
||||
): Ephemeral = Ephemeral(
|
||||
ephemeralMessageId,
|
||||
allowSendingWithoutReply,
|
||||
checklistTaskId,
|
||||
pollOptionId
|
||||
)
|
||||
|
||||
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<ReplyParameters> {
|
||||
@Serializable
|
||||
private data class Surrogate(
|
||||
@SerialName(chatIdField) val chatIdentifier: ChatIdentifier? = null,
|
||||
@SerialName(messageIdField) val messageId: MessageId? = null,
|
||||
@SerialName(allowSendingWithoutReplyField) val allowSendingWithoutReply: Boolean? = null,
|
||||
@SerialName(quoteField) val quote: String? = null,
|
||||
@SerialName(quoteParseModeField) val quoteParseMode: ParseMode? = null,
|
||||
@SerialName(quoteEntitiesField) val quoteEntities: List<RawMessageEntity>? = null,
|
||||
@SerialName(quotePositionField) val quotePosition: Int? = null,
|
||||
@SerialName(checklistTaskIdField) val checklistTaskId: ChecklistTaskId? = null,
|
||||
@SerialName(pollOptionIdField) val pollOptionId: PollOptionPersistentId? = null,
|
||||
@SerialName(ephemeralMessageIdField) val ephemeralMessageId: EphemeralMessageId? = null,
|
||||
)
|
||||
|
||||
override val descriptor: SerialDescriptor = Surrogate.serializer().descriptor
|
||||
|
||||
override fun deserialize(decoder: Decoder): ReplyParameters {
|
||||
val surrogate = decoder.decodeSerializableValue(Surrogate.serializer())
|
||||
if (surrogate.messageId != null && surrogate.ephemeralMessageId != null) {
|
||||
throw SerializationException("ReplyParameters must contain either message_id or ephemeral_message_id, not both")
|
||||
}
|
||||
return when {
|
||||
surrogate.ephemeralMessageId != null -> Ephemeral(
|
||||
ephemeralMessageId = surrogate.ephemeralMessageId,
|
||||
allowSendingWithoutReply = surrogate.allowSendingWithoutReply,
|
||||
checklistTaskId = surrogate.checklistTaskId,
|
||||
pollOptionId = surrogate.pollOptionId
|
||||
)
|
||||
surrogate.messageId != null -> Chat(
|
||||
chatIdentifier = surrogate.chatIdentifier,
|
||||
messageId = surrogate.messageId,
|
||||
allowSendingWithoutReply = surrogate.allowSendingWithoutReply,
|
||||
quote = surrogate.quote,
|
||||
quoteParseMode = surrogate.quoteParseMode,
|
||||
quoteEntities = surrogate.quoteEntities,
|
||||
quotePosition = surrogate.quotePosition,
|
||||
checklistTaskId = surrogate.checklistTaskId,
|
||||
pollOptionId = surrogate.pollOptionId
|
||||
)
|
||||
else -> throw SerializationException("ReplyParameters must contain message_id or ephemeral_message_id")
|
||||
}
|
||||
}
|
||||
|
||||
override fun serialize(encoder: Encoder, value: ReplyParameters) {
|
||||
val surrogate = when (value) {
|
||||
is Chat -> Surrogate(
|
||||
chatIdentifier = value.chatIdentifier,
|
||||
messageId = value.messageId,
|
||||
allowSendingWithoutReply = value.allowSendingWithoutReply,
|
||||
quote = value.quote,
|
||||
quoteParseMode = value.quoteParseMode,
|
||||
quoteEntities = value.quoteEntities,
|
||||
quotePosition = value.quotePosition,
|
||||
checklistTaskId = value.checklistTaskId,
|
||||
pollOptionId = value.pollOptionId
|
||||
)
|
||||
is Ephemeral -> Surrogate(
|
||||
allowSendingWithoutReply = value.allowSendingWithoutReply,
|
||||
ephemeralMessageId = value.ephemeralMessageId,
|
||||
checklistTaskId = value.checklistTaskId,
|
||||
pollOptionId = value.pollOptionId
|
||||
)
|
||||
}
|
||||
encoder.encodeSerializableValue(Surrogate.serializer(), surrogate)
|
||||
}
|
||||
}
|
||||
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
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds [ReplyParameters.Ephemeral] with [allowSendingWithoutReply], [checklistTaskId], and [pollOptionId], targeting
|
||||
* [ephemeralMessageId]. The target defaults to [PossiblyEphemeralMessage.ephemeralMessageId]; a missing target produces
|
||||
* `null`.
|
||||
*/
|
||||
fun Message.ephemeralReplyParametersOrNull(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
ephemeralMessageId: EphemeralMessageId? = (this as? PossiblyEphemeralMessage) ?.ephemeralMessageId,
|
||||
checklistTaskId: ChecklistTaskId? = null,
|
||||
pollOptionId: PollOptionPersistentId? = null,
|
||||
): ReplyParameters? =
|
||||
ephemeralMessageId ?.let {
|
||||
ReplyParameters(
|
||||
ephemeralMessageId = it,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||
checklistTaskId = checklistTaskId,
|
||||
pollOptionId = pollOptionId,
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the receiver [UserId] for an ephemeral reply: [PossiblyEphemeralMessage.receiverUser] when available,
|
||||
* otherwise [OptionallyFromUserMessage.from]; returns `null` for a non-ephemeral message.
|
||||
*/
|
||||
val Message.ephemeralReplyReceiverUserIdOrNull: UserId?
|
||||
get() = (this as? PossiblyEphemeralMessage) ?.takeIf { it.ephemeralMessageId != null } ?.let {
|
||||
val receiverUser = it.receiverUser
|
||||
val thisAsOptionallyFromUserMessage = this as? OptionallyFromUserMessage
|
||||
val from = thisAsOptionallyFromUserMessage ?.from
|
||||
when {
|
||||
receiverUser != null && receiverUser !is PreviewBot && from !is Bot -> receiverUser.id
|
||||
from != null && from !is PreviewBot && from !is Bot -> from.id
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@ const val UPDATE_GUEST_MESSAGE = "guest_message"
|
||||
|
||||
const val UPDATE_MANAGED_BOT = "managed_bot"
|
||||
|
||||
const val UPDATE_SUBSCRIPTION = "subscription"
|
||||
|
||||
val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
|
||||
UPDATE_MESSAGE,
|
||||
UPDATE_EDITED_MESSAGE,
|
||||
@@ -67,8 +65,6 @@ val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
|
||||
UPDATE_REMOVE_CHAT_BOOST,
|
||||
|
||||
UPDATE_MANAGED_BOT,
|
||||
|
||||
UPDATE_SUBSCRIPTION,
|
||||
)
|
||||
|
||||
val ALL_UPDATES_LIST = ALL_UPDATES_LIST_WITHOUT_REACTIONS + listOf(
|
||||
|
||||
@@ -5,7 +5,6 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessIntro
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessLocation
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours
|
||||
import dev.inmo.tgbotapi.types.colors.ColorId
|
||||
import dev.inmo.tgbotapi.types.communities.Community
|
||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||
import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes
|
||||
import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftColors
|
||||
@@ -72,9 +71,7 @@ data class ExtendedChannelChatImpl(
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
@SerialName(guardBotField)
|
||||
override val guardBot: User? = null,
|
||||
@SerialName(communityField)
|
||||
override val community: Community? = null
|
||||
override val guardBot: User? = null
|
||||
) : ExtendedChannelChat
|
||||
|
||||
@Serializable
|
||||
@@ -123,9 +120,7 @@ data class ExtendedGroupChatImpl(
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
@SerialName(guardBotField)
|
||||
override val guardBot: User? = null,
|
||||
@SerialName(communityField)
|
||||
override val community: Community? = null
|
||||
override val guardBot: User? = null
|
||||
) : ExtendedGroupChat
|
||||
|
||||
@Serializable
|
||||
@@ -327,9 +322,7 @@ data class ExtendedSupergroupChatImpl(
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
@SerialName(guardBotField)
|
||||
override val guardBot: User? = null,
|
||||
@SerialName(communityField)
|
||||
override val community: Community? = null
|
||||
override val guardBot: User? = null
|
||||
) : ExtendedSupergroupChat
|
||||
|
||||
@Serializable
|
||||
@@ -405,9 +398,7 @@ data class ExtendedForumChatImpl(
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
@SerialName(guardBotField)
|
||||
override val guardBot: User? = null,
|
||||
@SerialName(communityField)
|
||||
override val community: Community? = null
|
||||
override val guardBot: User? = null
|
||||
) : ExtendedForumChat
|
||||
|
||||
@Serializable
|
||||
@@ -486,9 +477,7 @@ data class ExtendedChannelDirectMessagesChatImpl(
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
@SerialName(guardBotField)
|
||||
override val guardBot: User? = null,
|
||||
@SerialName(communityField)
|
||||
override val community: Community? = null
|
||||
override val guardBot: User? = null
|
||||
) : ExtendedChannelDirectMessagesChat {
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@SerialName(isDirectMessagesField)
|
||||
@@ -544,8 +533,6 @@ data class ExtendedBot(
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
@SerialName(canManageBotsField)
|
||||
val canManageBots: Boolean = false,
|
||||
@SerialName(communityField)
|
||||
override val community: Community? = null,
|
||||
) : Bot(), ExtendedChat {
|
||||
@SerialName(isBotField)
|
||||
private val isBot = true
|
||||
|
||||
@@ -6,7 +6,6 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessIntro
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessLocation
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours
|
||||
import dev.inmo.tgbotapi.types.colors.ColorId
|
||||
import dev.inmo.tgbotapi.types.communities.Community
|
||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||
import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes
|
||||
import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftColors
|
||||
@@ -36,14 +35,6 @@ sealed interface ExtendedChat : Chat {
|
||||
val guardBot: User?
|
||||
get() = null
|
||||
|
||||
/**
|
||||
* The Community to which the chat belongs
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#chatfullinfo">ChatFullInfo.community</a>
|
||||
*/
|
||||
val community: Community?
|
||||
get() = null
|
||||
|
||||
@Deprecated(
|
||||
message = "Telegram Bot API v9.0 introduced the new field, `acceptedGiftTypes`, to allow granular" +
|
||||
" control over which types of gifts user, bot, or chat can accept.",
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.communities
|
||||
|
||||
import dev.inmo.tgbotapi.types.idField
|
||||
import dev.inmo.tgbotapi.types.nameField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Represents a community (a group of chats)
|
||||
*/
|
||||
@Serializable
|
||||
data class Community(
|
||||
@SerialName(idField)
|
||||
val id: CommunityId,
|
||||
@SerialName(nameField)
|
||||
val name: String
|
||||
)
|
||||
@@ -1,15 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.communities
|
||||
|
||||
import dev.inmo.tgbotapi.types.communityField
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Service message about a chat being added to a community
|
||||
*/
|
||||
@Serializable
|
||||
data class CommunityChatAdded(
|
||||
@SerialName(communityField)
|
||||
val community: Community
|
||||
) : CommonEvent
|
||||
@@ -1,10 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.communities
|
||||
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Service message about a chat being removed from a community. Currently holds no information
|
||||
*/
|
||||
@Serializable
|
||||
object CommunityChatRemoved : CommonEvent
|
||||
@@ -1,14 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.communities
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class CommunityId(
|
||||
val long: Long
|
||||
) {
|
||||
override fun toString(): String {
|
||||
return long.toString()
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.media
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@Serializable(TelegramMediaSerializer::class)
|
||||
sealed interface RichMessageMemberTelegramMedia : TelegramMedia
|
||||
@@ -67,7 +67,7 @@ data class TelegramMediaAnimation internal constructor(
|
||||
override val height: Int? = null,
|
||||
override val duration: Long? = null,
|
||||
override val thumb: InputFile? = null
|
||||
) : TelegramFreeMedia, RichMessageMemberTelegramMedia, SizedTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TextedOutput, SpoilerableTelegramMedia, WithCustomizableCaptionTelegramMedia, InputPollMedia, InputPollOptionMedia {
|
||||
) : TelegramFreeMedia, SizedTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TextedOutput, SpoilerableTelegramMedia, WithCustomizableCaptionTelegramMedia, InputPollMedia, InputPollOptionMedia {
|
||||
@EncodeDefault
|
||||
override val type: String = TYPE
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
|
||||
@@ -51,7 +51,7 @@ data class TelegramMediaAudio internal constructor(
|
||||
override val performer: String? = null,
|
||||
override val title: String? = null,
|
||||
override val thumb: InputFile? = null
|
||||
) : TelegramFreeMedia, RichMessageMemberTelegramMedia, AudioMediaGroupMemberTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TitledTelegramMedia,
|
||||
) : TelegramFreeMedia, AudioMediaGroupMemberTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TitledTelegramMedia,
|
||||
Performerable, InputPollMedia {
|
||||
@EncodeDefault
|
||||
override val type: String = TYPE
|
||||
|
||||
@@ -44,7 +44,7 @@ data class TelegramMediaPhoto internal constructor(
|
||||
override val spoilered: Boolean = false,
|
||||
@SerialName(showCaptionAboveMediaField)
|
||||
override val showCaptionAboveMedia: Boolean = false,
|
||||
) : TelegramFreeMedia, RichMessageMemberTelegramMedia, VisualMediaGroupMemberTelegramMedia, InputPollMedia, InputPollOptionMedia {
|
||||
) : TelegramFreeMedia, VisualMediaGroupMemberTelegramMedia, InputPollMedia, InputPollOptionMedia {
|
||||
@EncodeDefault
|
||||
override val type: String = TYPE
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
|
||||
@@ -25,7 +25,6 @@ object TelegramMediaSerializer : KSerializer<TelegramMedia> {
|
||||
is TelegramPaidMediaPhoto -> TelegramPaidMediaPhoto.serializer().serialize(encoder, value)
|
||||
is TelegramPaidMediaLivePhoto -> TelegramPaidMediaLivePhoto.serializer().serialize(encoder, value)
|
||||
is TelegramMediaSticker -> TelegramMediaSticker.serializer().serialize(encoder, value)
|
||||
is TelegramMediaVoiceNote -> TelegramMediaVoiceNote.serializer().serialize(encoder, value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@ data class TelegramMediaVideo internal constructor (
|
||||
@SerialName(supportsStreamingField)
|
||||
override val supportsStreaming: Boolean = false,
|
||||
) : TelegramFreeMedia,
|
||||
RichMessageMemberTelegramMedia,
|
||||
SizedTelegramMedia,
|
||||
DuratedTelegramMedia,
|
||||
ThumbedTelegramMedia,
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.media
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.TextedOutput
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.requests.abstracts.fileIdToSend
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.parseModeField
|
||||
import dev.inmo.tgbotapi.types.files.VoiceFile
|
||||
import dev.inmo.tgbotapi.types.message.*
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
import kotlinx.serialization.EncodeDefault
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun TelegramMediaVoiceNote(
|
||||
file: InputFile,
|
||||
entities: TextSourcesList,
|
||||
duration: Long? = null
|
||||
) = TelegramMediaVoiceNote(
|
||||
file, entities.makeString(), null, entities.toRawMessageEntities(), duration
|
||||
)
|
||||
|
||||
fun TelegramMediaVoiceNote(
|
||||
file: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
duration: Long? = null
|
||||
) = TelegramMediaVoiceNote(
|
||||
file, text, parseMode, null, duration
|
||||
)
|
||||
|
||||
@ConsistentCopyVisibility
|
||||
@Serializable
|
||||
data class TelegramMediaVoiceNote internal constructor(
|
||||
override val file: InputFile,
|
||||
@SerialName(captionField)
|
||||
override val text: String? = null,
|
||||
@SerialName(parseModeField)
|
||||
override val parseMode: ParseMode? = null,
|
||||
@SerialName(captionEntitiesField)
|
||||
private val rawEntities: List<RawMessageEntity>? = null,
|
||||
override val duration: Long? = null
|
||||
) : RichMessageMemberTelegramMedia, DuratedTelegramMedia, TextedOutput {
|
||||
@EncodeDefault
|
||||
override val type: String = TYPE
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text ?: return@lazy null)
|
||||
}
|
||||
|
||||
@SerialName(mediaField)
|
||||
override val media: String
|
||||
init { media = file.fileIdToSend } // crutch until js compiling will be fixed
|
||||
|
||||
companion object {
|
||||
const val TYPE = "voice_note"
|
||||
}
|
||||
}
|
||||
|
||||
fun VoiceFile.toTelegramMediaVoiceNote(
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null
|
||||
): TelegramMediaVoiceNote = TelegramMediaVoiceNote(
|
||||
fileId,
|
||||
text,
|
||||
parseMode,
|
||||
duration
|
||||
)
|
||||
|
||||
fun VoiceFile.toTelegramMediaVoiceNote(
|
||||
textSources: TextSourcesList = emptyList()
|
||||
): TelegramMediaVoiceNote = TelegramMediaVoiceNote(
|
||||
fileId,
|
||||
textSources,
|
||||
duration
|
||||
)
|
||||
@@ -189,11 +189,6 @@ data class CommonGroupContentMessageImpl<T : MessageContent>(
|
||||
override val cost: Int? = null,
|
||||
@SerialName(senderTagField)
|
||||
override val senderTag: UserTag? = null,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@SerialName(receiverUserField)
|
||||
override val receiverUser: PreviewUser? = null,
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
override val ephemeralMessageId: EphemeralMessageId? = null,
|
||||
) : CommonGroupContentMessage<T> {
|
||||
constructor(
|
||||
chat: PreviewGroupChat,
|
||||
@@ -480,11 +475,6 @@ data class CommonForumContentMessageImpl<T : MessageContent>(
|
||||
override val cost: Int? = null,
|
||||
@SerialName(senderTagField)
|
||||
override val senderTag: UserTag? = null,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@SerialName(receiverUserField)
|
||||
override val receiverUser: PreviewUser? = null,
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
override val ephemeralMessageId: EphemeralMessageId? = null,
|
||||
) : CommonForumContentMessage<T> {
|
||||
constructor(
|
||||
chat: PreviewForumChat,
|
||||
@@ -547,12 +537,7 @@ data class CommonChannelDirectMessagesContentMessageImpl<T : MessageContent>(
|
||||
@SerialName(paidMessageStarCountField)
|
||||
override val cost: Int? = null,
|
||||
@SerialName(senderTagField)
|
||||
override val senderTag: UserTag? = null,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@SerialName(receiverUserField)
|
||||
override val receiverUser: PreviewUser? = null,
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
override val ephemeralMessageId: EphemeralMessageId? = null,
|
||||
override val senderTag: UserTag? = null
|
||||
) : CommonChannelDirectMessagesContentMessage<T> {
|
||||
constructor(
|
||||
chat: PreviewChannelDirectMessagesChat,
|
||||
@@ -612,12 +597,7 @@ data class CommonSuggestedChannelDirectMessagesContentMessageImpl<T : MessageCon
|
||||
@SerialName(paidMessageStarCountField)
|
||||
override val cost: Int? = null,
|
||||
@SerialName(senderTagField)
|
||||
override val senderTag: UserTag? = null,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@SerialName(receiverUserField)
|
||||
override val receiverUser: PreviewUser? = null,
|
||||
@SerialName(ephemeralMessageIdField)
|
||||
override val ephemeralMessageId: EphemeralMessageId? = null,
|
||||
override val senderTag: UserTag? = null
|
||||
) : CommonSuggestedChannelDirectMessagesContentMessage<T> {
|
||||
constructor(
|
||||
chat: PreviewChannelDirectMessagesChat,
|
||||
|
||||
@@ -10,8 +10,6 @@ import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
|
||||
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
|
||||
import dev.inmo.tgbotapi.types.dice.Dice
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.files.Sticker
|
||||
@@ -74,9 +72,6 @@ internal data class RawMessage(
|
||||
private val from: PreviewUser? = null,
|
||||
private val sender_tag: UserTag? = null,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
private val receiver_user: PreviewUser? = null,
|
||||
private val ephemeral_message_id: EphemeralMessageId? = null,
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
private val sender_chat: PreviewPublicChat? = null,
|
||||
private val forward_origin: MessageOrigin? = null,
|
||||
private val is_topic_message: Boolean? = null,
|
||||
@@ -208,10 +203,6 @@ internal data class RawMessage(
|
||||
private val checklist_tasks_done: ChecklistTasksDone? = null,
|
||||
private val checklist_tasks_added: ChecklistTasksAdded? = null,
|
||||
|
||||
// Communities
|
||||
private val community_chat_added: CommunityChatAdded? = null,
|
||||
private val community_chat_removed: CommunityChatRemoved? = null,
|
||||
|
||||
// Channel direct messages
|
||||
private val direct_message_price_changed: DirectMessagesConfigurationChanged? = null,
|
||||
private val is_paid_post: Boolean = false,
|
||||
@@ -377,8 +368,6 @@ internal data class RawMessage(
|
||||
gift_upgrade_sent != null -> gift_upgrade_sent
|
||||
checklist_tasks_done != null -> checklist_tasks_done
|
||||
checklist_tasks_added != null -> checklist_tasks_added
|
||||
community_chat_added != null -> community_chat_added
|
||||
community_chat_removed != null -> community_chat_removed
|
||||
direct_message_price_changed != null -> direct_message_price_changed
|
||||
suggested_post_approved != null -> suggested_post_approved
|
||||
suggested_post_approval_failed != null -> suggested_post_approval_failed
|
||||
@@ -545,8 +534,6 @@ internal data class RawMessage(
|
||||
fromOffline = is_from_offline,
|
||||
cost = paid_star_count,
|
||||
senderTag = sender_tag,
|
||||
receiverUser = receiver_user,
|
||||
ephemeralMessageId = ephemeral_message_id,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -591,8 +578,6 @@ internal data class RawMessage(
|
||||
suggestedPostInfo = suggested_post_info,
|
||||
cost = paid_star_count,
|
||||
senderTag = sender_tag,
|
||||
receiverUser = receiver_user,
|
||||
ephemeralMessageId = ephemeral_message_id,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -702,8 +687,6 @@ internal data class RawMessage(
|
||||
fromOffline = is_from_offline,
|
||||
cost = paid_star_count,
|
||||
senderTag = sender_tag,
|
||||
receiverUser = receiver_user,
|
||||
ephemeralMessageId = ephemeral_message_id,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
@@ -779,9 +762,7 @@ internal data class RawMessage(
|
||||
senderBoostsCount = sender_boost_count,
|
||||
fromOffline = is_from_offline,
|
||||
cost = paid_star_count,
|
||||
senderTag = sender_tag,
|
||||
receiverUser = receiver_user,
|
||||
ephemeralMessageId = ephemeral_message_id,
|
||||
senderTag = sender_tag
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -860,8 +841,6 @@ internal data class RawMessage(
|
||||
fromOffline = is_from_offline,
|
||||
cost = paid_star_count,
|
||||
senderTag = sender_tag,
|
||||
receiverUser = receiver_user,
|
||||
ephemeralMessageId = ephemeral_message_id,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ sealed interface GroupContentMessage<T : MessageContent> : PublicContentMessage<
|
||||
override val chat: PreviewGroupChat
|
||||
}
|
||||
|
||||
sealed interface PotentiallyFromUserGroupContentMessage<T : MessageContent> : GroupContentMessage<T>, PossiblyEphemeralMessage {
|
||||
sealed interface PotentiallyFromUserGroupContentMessage<T : MessageContent> : GroupContentMessage<T> {
|
||||
val senderBoostsCount: Int?
|
||||
val senderTag: UserTag?
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.message.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.EphemeralMessageId
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewUser
|
||||
|
||||
interface PossiblyEphemeralMessage : Message {
|
||||
val receiverUser: PreviewUser?
|
||||
val ephemeralMessageId: EphemeralMessageId?
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
@file:OptIn(ExperimentalSerializationApi::class)
|
||||
|
||||
package dev.inmo.tgbotapi.types.payments
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithUser
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.invoicePayloadField
|
||||
import dev.inmo.tgbotapi.types.stateField
|
||||
import dev.inmo.tgbotapi.types.userField
|
||||
import kotlinx.serialization.EncodeDefault
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.descriptors.PrimitiveKind
|
||||
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
/**
|
||||
* Information about changes to a user payment subscription toward the current bot
|
||||
*
|
||||
* @param user User who subscribed for payments toward the bot
|
||||
* @param invoicePayload Bot-specified invoice payload
|
||||
* @param state New state of the subscription
|
||||
*/
|
||||
@Serializable
|
||||
data class BotSubscriptionUpdated(
|
||||
@SerialName(userField)
|
||||
override val user: User,
|
||||
@SerialName(invoicePayloadField)
|
||||
val invoicePayload: String,
|
||||
@SerialName(stateField)
|
||||
val state: State
|
||||
) : WithUser {
|
||||
@Serializable(StateSerializer::class)
|
||||
sealed interface State {
|
||||
val name: String
|
||||
|
||||
@Serializable
|
||||
data object Canceled : State {
|
||||
@EncodeDefault
|
||||
override val name = "canceled"
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data object Active : State {
|
||||
@EncodeDefault
|
||||
override val name = "active"
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data object Failed : State {
|
||||
@EncodeDefault
|
||||
override val name = "failed"
|
||||
}
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class Unknown(override val name: String) : State
|
||||
}
|
||||
|
||||
private object StateSerializer : KSerializer<State> {
|
||||
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(
|
||||
serialName = "dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated.State",
|
||||
kind = PrimitiveKind.STRING
|
||||
)
|
||||
|
||||
override fun deserialize(decoder: Decoder): State {
|
||||
val value = decoder.decodeString()
|
||||
return when (value) {
|
||||
State.Canceled.name -> State.Canceled
|
||||
State.Active.name -> State.Active
|
||||
State.Failed.name -> State.Failed
|
||||
else -> State.Unknown(value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun serialize(encoder: Encoder, value: State) {
|
||||
encoder.encodeString(value.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||
import dev.inmo.tgbotapi.types.typeField
|
||||
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.JsonContentPolymorphicSerializer
|
||||
import kotlinx.serialization.json.JsonElement
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
|
||||
/**
|
||||
* Represents a block in a rich formatted message to be sent.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblock">InputRichBlock</a>
|
||||
*/
|
||||
@Serializable(InputRichBlockSerializer::class)
|
||||
@ClassCastsIncluded
|
||||
sealed interface InputRichBlock {
|
||||
val type: String
|
||||
}
|
||||
|
||||
@Serializable(InputRichBlockSerializer::class)
|
||||
sealed interface InputRichBlockMedia : InputRichBlock {
|
||||
val media: TelegramMedia
|
||||
val caption: RichBlockCaption?
|
||||
}
|
||||
|
||||
/**
|
||||
* The nested [InputRichBlock]s directly contained by this block, or an empty list for leaf blocks. Container blocks
|
||||
* ([InputRichBlockList] via its [InputRichBlockListItem.blocks], [InputRichBlockBlockQuotation], [InputRichBlockCollage],
|
||||
* [InputRichBlockSlideshow] and [InputRichBlockDetails]) expose their children here.
|
||||
*/
|
||||
val InputRichBlock.subBlocks: List<InputRichBlock>
|
||||
get() = when (this) {
|
||||
is InputRichBlockList -> items.flatMap { it.blocks }
|
||||
is InputRichBlockBlockQuotation -> blocks
|
||||
is InputRichBlockCollage -> blocks
|
||||
is InputRichBlockSlideshow -> blocks
|
||||
is InputRichBlockDetails -> blocks
|
||||
else -> emptyList()
|
||||
}
|
||||
|
||||
object InputRichBlockSerializer : JsonContentPolymorphicSerializer<InputRichBlock>(InputRichBlock::class) {
|
||||
override fun selectDeserializer(element: JsonElement): DeserializationStrategy<InputRichBlock> {
|
||||
return when (val type = element.jsonObject[typeField]?.jsonPrimitive?.content) {
|
||||
InputRichBlockParagraph.TYPE -> InputRichBlockParagraph.serializer()
|
||||
InputRichBlockSectionHeading.TYPE -> InputRichBlockSectionHeading.serializer()
|
||||
InputRichBlockPreformatted.TYPE -> InputRichBlockPreformatted.serializer()
|
||||
InputRichBlockFooter.TYPE -> InputRichBlockFooter.serializer()
|
||||
InputRichBlockDivider.TYPE -> InputRichBlockDivider.serializer()
|
||||
InputRichBlockMathematicalExpression.TYPE -> InputRichBlockMathematicalExpression.serializer()
|
||||
InputRichBlockAnchor.TYPE -> InputRichBlockAnchor.serializer()
|
||||
InputRichBlockList.TYPE -> InputRichBlockList.serializer()
|
||||
InputRichBlockBlockQuotation.TYPE -> InputRichBlockBlockQuotation.serializer()
|
||||
InputRichBlockPullQuotation.TYPE -> InputRichBlockPullQuotation.serializer()
|
||||
InputRichBlockCollage.TYPE -> InputRichBlockCollage.serializer()
|
||||
InputRichBlockSlideshow.TYPE -> InputRichBlockSlideshow.serializer()
|
||||
InputRichBlockTable.TYPE -> InputRichBlockTable.serializer()
|
||||
InputRichBlockDetails.TYPE -> InputRichBlockDetails.serializer()
|
||||
InputRichBlockMap.TYPE -> InputRichBlockMap.serializer()
|
||||
InputRichBlockAnimation.TYPE -> InputRichBlockAnimation.serializer()
|
||||
InputRichBlockAudio.TYPE -> InputRichBlockAudio.serializer()
|
||||
InputRichBlockPhoto.TYPE -> InputRichBlockPhoto.serializer()
|
||||
InputRichBlockVideo.TYPE -> InputRichBlockVideo.serializer()
|
||||
InputRichBlockVoiceNote.TYPE -> InputRichBlockVoiceNote.serializer()
|
||||
InputRichBlockThinking.TYPE -> InputRichBlockThinking.serializer()
|
||||
else -> error("Unknown InputRichBlock type: $type")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.types.blocksField
|
||||
import dev.inmo.tgbotapi.types.hasCheckboxField
|
||||
import dev.inmo.tgbotapi.types.isCheckedField
|
||||
import dev.inmo.tgbotapi.types.typeField
|
||||
import dev.inmo.tgbotapi.types.valueField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* An item of an [InputRichBlockList].
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblocklistitem">InputRichBlockListItem</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockListItem(
|
||||
@SerialName(blocksField)
|
||||
val blocks: List<InputRichBlock>,
|
||||
@SerialName(hasCheckboxField)
|
||||
val hasCheckbox: Boolean? = null,
|
||||
@SerialName(isCheckedField)
|
||||
val isChecked: Boolean? = null,
|
||||
@SerialName(valueField)
|
||||
val value: Int? = null,
|
||||
/**
|
||||
* For ordered lists, the type of the item label; must be one of "a", "A", "i", "I" or "1".
|
||||
*/
|
||||
@SerialName(typeField)
|
||||
val labelType: String? = null
|
||||
)
|
||||
@@ -1,499 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.types.animationField
|
||||
import dev.inmo.tgbotapi.types.audioField
|
||||
import dev.inmo.tgbotapi.types.blocksField
|
||||
import dev.inmo.tgbotapi.types.captionField
|
||||
import dev.inmo.tgbotapi.types.cellsField
|
||||
import dev.inmo.tgbotapi.types.creditField
|
||||
import dev.inmo.tgbotapi.types.expressionField
|
||||
import dev.inmo.tgbotapi.types.heightField
|
||||
import dev.inmo.tgbotapi.types.isBorderedField
|
||||
import dev.inmo.tgbotapi.types.isOpenField
|
||||
import dev.inmo.tgbotapi.types.isStripedField
|
||||
import dev.inmo.tgbotapi.types.itemsField
|
||||
import dev.inmo.tgbotapi.types.languageField
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
import dev.inmo.tgbotapi.types.locationField
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaVoiceNote
|
||||
import dev.inmo.tgbotapi.types.nameField
|
||||
import dev.inmo.tgbotapi.types.photoField
|
||||
import dev.inmo.tgbotapi.types.sizeField
|
||||
import dev.inmo.tgbotapi.types.summaryField
|
||||
import dev.inmo.tgbotapi.types.textField
|
||||
import dev.inmo.tgbotapi.types.typeField
|
||||
import dev.inmo.tgbotapi.types.videoField
|
||||
import dev.inmo.tgbotapi.types.voiceNoteField
|
||||
import dev.inmo.tgbotapi.types.widthField
|
||||
import dev.inmo.tgbotapi.types.zoomField
|
||||
import kotlinx.serialization.EncodeDefault
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* A text paragraph.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockparagraph">InputRichBlockParagraph</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockParagraph(
|
||||
@SerialName(textField)
|
||||
val text: RichText
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "paragraph"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A section heading.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblocksectionheading">InputRichBlockSectionHeading</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockSectionHeading(
|
||||
@SerialName(textField)
|
||||
val text: RichText,
|
||||
/**
|
||||
* Relative size of the text font; 1-6, 1 is the largest, 6 is the smallest.
|
||||
*/
|
||||
@SerialName(sizeField)
|
||||
val level: Int
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "heading"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A preformatted text block.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockpreformatted">InputRichBlockPreformatted</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockPreformatted(
|
||||
@SerialName(textField)
|
||||
val text: RichText,
|
||||
@SerialName(languageField)
|
||||
val language: String? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "pre"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A footer.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockfooter">InputRichBlockFooter</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockFooter(
|
||||
@SerialName(textField)
|
||||
val text: RichText
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "footer"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A divider.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockdivider">InputRichBlockDivider</a>
|
||||
*/
|
||||
@Serializable
|
||||
class InputRichBlockDivider : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
override fun equals(other: Any?): Boolean = other is InputRichBlockDivider
|
||||
|
||||
override fun hashCode(): Int = TYPE.hashCode()
|
||||
|
||||
override fun toString(): String = "InputRichBlockDivider"
|
||||
|
||||
companion object {
|
||||
const val TYPE = "divider"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a mathematical expression in LaTeX format.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockmathematicalexpression">InputRichBlockMathematicalExpression</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockMathematicalExpression(
|
||||
@SerialName(expressionField)
|
||||
val expression: String
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "mathematical_expression"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with an anchor.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockanchor">InputRichBlockAnchor</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockAnchor(
|
||||
@SerialName(nameField)
|
||||
val name: String
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "anchor"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of blocks.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblocklist">InputRichBlockList</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockList(
|
||||
@SerialName(itemsField)
|
||||
val items: List<InputRichBlockListItem>
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "list"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block quotation.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockblockquotation">InputRichBlockBlockQuotation</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockBlockQuotation(
|
||||
@SerialName(blocksField)
|
||||
val blocks: List<InputRichBlock>,
|
||||
@SerialName(creditField)
|
||||
val credit: RichText? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "blockquote"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A quotation with centered text.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockpullquotation">InputRichBlockPullQuotation</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockPullQuotation(
|
||||
@SerialName(textField)
|
||||
val text: RichText,
|
||||
@SerialName(creditField)
|
||||
val credit: RichText? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "pullquote"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A collage.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockcollage">InputRichBlockCollage</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockCollage(
|
||||
@SerialName(blocksField)
|
||||
val blocks: List<InputRichBlock>,
|
||||
@SerialName(captionField)
|
||||
val caption: RichBlockCaption? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "collage"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A slideshow.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockslideshow">InputRichBlockSlideshow</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockSlideshow(
|
||||
@SerialName(blocksField)
|
||||
val blocks: List<InputRichBlock>,
|
||||
@SerialName(captionField)
|
||||
val caption: RichBlockCaption? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "slideshow"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A table.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblocktable">InputRichBlockTable</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockTable(
|
||||
@SerialName(cellsField)
|
||||
val cells: List<List<RichBlockTableCell>>,
|
||||
@SerialName(isBorderedField)
|
||||
val isBordered: Boolean? = null,
|
||||
@SerialName(isStripedField)
|
||||
val isStriped: Boolean? = null,
|
||||
@SerialName(captionField)
|
||||
val caption: RichText? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "table"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An expandable block for details disclosure.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockdetails">InputRichBlockDetails</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockDetails(
|
||||
@SerialName(summaryField)
|
||||
val summary: RichText,
|
||||
@SerialName(blocksField)
|
||||
val blocks: List<InputRichBlock>,
|
||||
@SerialName(isOpenField)
|
||||
val isOpen: Boolean? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "details"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a map.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockmap">InputRichBlockMap</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockMap(
|
||||
@SerialName(locationField)
|
||||
val location: StaticLocation,
|
||||
/**
|
||||
* Map zoom level; 0-24.
|
||||
*/
|
||||
@SerialName(zoomField)
|
||||
val zoom: Int,
|
||||
@SerialName(widthField)
|
||||
val width: Int,
|
||||
@SerialName(heightField)
|
||||
val height: Int,
|
||||
@SerialName(captionField)
|
||||
val caption: RichBlockCaption? = null
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "map"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with an animation.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockanimation">InputRichBlockAnimation</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockAnimation(
|
||||
@SerialName(animationField)
|
||||
val animation: TelegramMediaAnimation,
|
||||
@SerialName(captionField)
|
||||
override val caption: RichBlockCaption? = null
|
||||
) : InputRichBlockMedia {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
override val media: TelegramMedia
|
||||
get() = animation
|
||||
|
||||
companion object {
|
||||
const val TYPE = "animation"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a music file.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockaudio">InputRichBlockAudio</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockAudio(
|
||||
@SerialName(audioField)
|
||||
val audio: TelegramMediaAudio,
|
||||
@SerialName(captionField)
|
||||
override val caption: RichBlockCaption? = null
|
||||
) : InputRichBlockMedia {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
override val media: TelegramMedia
|
||||
get() = audio
|
||||
|
||||
companion object {
|
||||
const val TYPE = "audio"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a photo.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockphoto">InputRichBlockPhoto</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockPhoto(
|
||||
@SerialName(photoField)
|
||||
val photo: TelegramMediaPhoto,
|
||||
@SerialName(captionField)
|
||||
override val caption: RichBlockCaption? = null
|
||||
) : InputRichBlockMedia {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
override val media: TelegramMedia
|
||||
get() = photo
|
||||
|
||||
companion object {
|
||||
const val TYPE = "photo"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a video.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockvideo">InputRichBlockVideo</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockVideo(
|
||||
@SerialName(videoField)
|
||||
val video: TelegramMediaVideo,
|
||||
@SerialName(captionField)
|
||||
override val caption: RichBlockCaption? = null
|
||||
) : InputRichBlockMedia {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
override val media: TelegramMedia
|
||||
get() = video
|
||||
|
||||
companion object {
|
||||
const val TYPE = "video"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a voice note.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockvoicenote">InputRichBlockVoiceNote</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockVoiceNote(
|
||||
@SerialName(voiceNoteField)
|
||||
val voiceNote: TelegramMediaVoiceNote,
|
||||
@SerialName(captionField)
|
||||
override val caption: RichBlockCaption? = null
|
||||
) : InputRichBlockMedia {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
override val media: TelegramMedia
|
||||
get() = voiceNote
|
||||
|
||||
companion object {
|
||||
const val TYPE = "voice_note"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A block with a "Thinking…" placeholder. May be used only in [dev.inmo.tgbotapi.requests.send.SendRichMessageDraft].
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichblockthinking">InputRichBlockThinking</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichBlockThinking(
|
||||
@SerialName(textField)
|
||||
val text: RichText
|
||||
) : InputRichBlock {
|
||||
@EncodeDefault
|
||||
@SerialName(typeField)
|
||||
override val type: String = TYPE
|
||||
|
||||
companion object {
|
||||
const val TYPE = "thinking"
|
||||
}
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaVoiceNote
|
||||
|
||||
/**
|
||||
* Builder of [InputRichBlockListItem]s used inside [InputRichBlocksBuilder.list].
|
||||
*/
|
||||
@RichTextDsl
|
||||
class InputRichBlockListBuilder {
|
||||
private val items = mutableListOf<InputRichBlockListItem>()
|
||||
|
||||
fun item(
|
||||
hasCheckbox: Boolean? = null,
|
||||
isChecked: Boolean? = null,
|
||||
value: Int? = null,
|
||||
labelType: String? = null,
|
||||
block: InputRichBlocksBuilder.() -> Unit
|
||||
) {
|
||||
items.add(InputRichBlockListItem(buildInputRichBlocks(block), hasCheckbox, isChecked, value, labelType))
|
||||
}
|
||||
|
||||
fun item(text: String) {
|
||||
items.add(InputRichBlockListItem(listOf(InputRichBlockParagraph(RichTextPlain(text)))))
|
||||
}
|
||||
|
||||
fun build(): List<InputRichBlockListItem> = items.toList()
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder of a [List] of [InputRichBlock]s - the root of the rich message input DSL. Text-bearing and container blocks
|
||||
* have their own DSL functions; media blocks (photo, video, animation, audio, voice note, collage, slideshow, table,
|
||||
* map) can be appended with the matching convenience function or with [add] / unary plus.
|
||||
*/
|
||||
@RichTextDsl
|
||||
class InputRichBlocksBuilder {
|
||||
private val blocks = mutableListOf<InputRichBlock>()
|
||||
|
||||
/** Appends an already built [InputRichBlock]. */
|
||||
fun add(block: InputRichBlock) {
|
||||
blocks.add(block)
|
||||
}
|
||||
|
||||
/** Appends an already built [InputRichBlock]. */
|
||||
operator fun InputRichBlock.unaryPlus() = add(this)
|
||||
|
||||
fun paragraph(text: String) = add(InputRichBlockParagraph(RichTextPlain(text)))
|
||||
fun paragraph(block: RichTextBuilder.() -> Unit) = add(InputRichBlockParagraph(buildRichText(block)))
|
||||
|
||||
fun heading(text: String, level: Int) = add(InputRichBlockSectionHeading(RichTextPlain(text), level))
|
||||
fun heading(level: Int, block: RichTextBuilder.() -> Unit) = add(InputRichBlockSectionHeading(buildRichText(block), level))
|
||||
|
||||
fun preformatted(text: String, language: String? = null) = add(InputRichBlockPreformatted(RichTextPlain(text), language))
|
||||
|
||||
fun footer(text: String) = add(InputRichBlockFooter(RichTextPlain(text)))
|
||||
fun footer(block: RichTextBuilder.() -> Unit) = add(InputRichBlockFooter(buildRichText(block)))
|
||||
|
||||
fun divider() = add(InputRichBlockDivider())
|
||||
|
||||
fun mathematicalExpression(expression: String) = add(InputRichBlockMathematicalExpression(expression))
|
||||
|
||||
fun anchor(name: String) = add(InputRichBlockAnchor(name))
|
||||
|
||||
fun thinking(text: String) = add(InputRichBlockThinking(RichTextPlain(text)))
|
||||
fun thinking(block: RichTextBuilder.() -> Unit) = add(InputRichBlockThinking(buildRichText(block)))
|
||||
|
||||
fun list(block: InputRichBlockListBuilder.() -> Unit) = add(InputRichBlockList(InputRichBlockListBuilder().apply(block).build()))
|
||||
|
||||
fun blockQuotation(credit: RichText? = null, block: InputRichBlocksBuilder.() -> Unit) =
|
||||
add(InputRichBlockBlockQuotation(buildInputRichBlocks(block), credit))
|
||||
|
||||
fun pullQuotation(credit: RichText? = null, block: RichTextBuilder.() -> Unit) =
|
||||
add(InputRichBlockPullQuotation(buildRichText(block), credit))
|
||||
|
||||
fun details(summary: RichText, isOpen: Boolean? = null, block: InputRichBlocksBuilder.() -> Unit) =
|
||||
add(InputRichBlockDetails(summary, buildInputRichBlocks(block), isOpen))
|
||||
|
||||
fun details(summary: String, isOpen: Boolean? = null, block: InputRichBlocksBuilder.() -> Unit) =
|
||||
details(RichTextPlain(summary), isOpen, block)
|
||||
|
||||
fun photo(photo: TelegramMediaPhoto, caption: RichBlockCaption? = null) = add(InputRichBlockPhoto(photo, caption))
|
||||
|
||||
fun video(video: TelegramMediaVideo, caption: RichBlockCaption? = null) = add(InputRichBlockVideo(video, caption))
|
||||
|
||||
fun animation(animation: TelegramMediaAnimation, caption: RichBlockCaption? = null) =
|
||||
add(InputRichBlockAnimation(animation, caption))
|
||||
|
||||
fun audio(audio: TelegramMediaAudio, caption: RichBlockCaption? = null) = add(InputRichBlockAudio(audio, caption))
|
||||
|
||||
fun voiceNote(voiceNote: TelegramMediaVoiceNote, caption: RichBlockCaption? = null) =
|
||||
add(InputRichBlockVoiceNote(voiceNote, caption))
|
||||
|
||||
fun collage(caption: RichBlockCaption? = null, block: InputRichBlocksBuilder.() -> Unit) =
|
||||
add(InputRichBlockCollage(buildInputRichBlocks(block), caption))
|
||||
|
||||
fun slideshow(caption: RichBlockCaption? = null, block: InputRichBlocksBuilder.() -> Unit) =
|
||||
add(InputRichBlockSlideshow(buildInputRichBlocks(block), caption))
|
||||
|
||||
fun table(
|
||||
cells: List<List<RichBlockTableCell>>,
|
||||
isBordered: Boolean? = null,
|
||||
isStriped: Boolean? = null,
|
||||
caption: RichText? = null
|
||||
) = add(InputRichBlockTable(cells, isBordered, isStriped, caption))
|
||||
|
||||
fun map(
|
||||
location: StaticLocation,
|
||||
zoom: Int,
|
||||
width: Int,
|
||||
height: Int,
|
||||
caption: RichBlockCaption? = null
|
||||
) = add(InputRichBlockMap(location, zoom, width, height, caption))
|
||||
|
||||
fun build(): List<InputRichBlock> = blocks.toList()
|
||||
}
|
||||
|
||||
/** Builds a [List] of [InputRichBlock]s using the [InputRichBlocksBuilder] DSL. */
|
||||
fun buildInputRichBlocks(block: InputRichBlocksBuilder.() -> Unit): List<InputRichBlock> = InputRichBlocksBuilder().apply(block).build()
|
||||
|
||||
/** Builds an [InputRichMessage] with `blocks` built using the [InputRichBlocksBuilder] DSL. */
|
||||
fun InputRichMessageBlocks(
|
||||
isRtl: Boolean? = null,
|
||||
skipEntityDetection: Boolean? = null,
|
||||
block: InputRichBlocksBuilder.() -> Unit
|
||||
): InputRichMessage = InputRichMessageBlocks(buildInputRichBlocks(block), isRtl, skipEntityDetection)
|
||||
@@ -1,21 +1,15 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||
import dev.inmo.tgbotapi.types.blocksField
|
||||
import dev.inmo.tgbotapi.types.htmlField
|
||||
import dev.inmo.tgbotapi.types.isRtlField
|
||||
import dev.inmo.tgbotapi.types.markdownField
|
||||
import dev.inmo.tgbotapi.types.media.CoveredTelegramMedia
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||
import dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia
|
||||
import dev.inmo.tgbotapi.types.mediaField
|
||||
import dev.inmo.tgbotapi.types.skipEntityDetectionField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Describes a rich message to be sent. Exactly one of the fields [html], [markdown] or [blocks] must be used. Use the
|
||||
* [InputRichMessageHTML], [InputRichMessageMarkdown] and [InputRichMessageBlocks] factories to build an instance.
|
||||
* Describes a rich message to be sent. Exactly one of the fields [html] or [markdown] must be used. Use the
|
||||
* [InputRichMessageHTML] and [InputRichMessageMarkdown] factories to build an instance.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichmessage">InputRichMessage</a>
|
||||
*/
|
||||
@@ -26,21 +20,14 @@ data class InputRichMessage internal constructor(
|
||||
val html: String? = null,
|
||||
@SerialName(markdownField)
|
||||
val markdown: String? = null,
|
||||
@SerialName(blocksField)
|
||||
val blocks: List<InputRichBlock>? = null,
|
||||
@SerialName(mediaField)
|
||||
val media: List<InputRichMessageMedia>? = null,
|
||||
@SerialName(isRtlField)
|
||||
val isRtl: Boolean? = null,
|
||||
@SerialName(skipEntityDetectionField)
|
||||
val skipEntityDetection: Boolean? = null
|
||||
) {
|
||||
init {
|
||||
require(listOfNotNull(html, markdown, blocks).size == 1) {
|
||||
"Exactly one of the fields html, markdown or blocks must be used in InputRichMessage"
|
||||
}
|
||||
require(media == null || blocks == null) {
|
||||
"The field media of InputRichMessage can be used only together with html or markdown, not blocks"
|
||||
require((html == null) != (markdown == null)) {
|
||||
"Exactly one of the fields html or markdown must be used in InputRichMessage"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,13 +40,10 @@ data class InputRichMessage internal constructor(
|
||||
fun InputRichMessageHTML(
|
||||
html: String,
|
||||
isRtl: Boolean? = null,
|
||||
skipEntityDetection: Boolean? = null,
|
||||
media: List<InputRichMessageMedia>? = null
|
||||
skipEntityDetection: Boolean? = null
|
||||
): InputRichMessage = InputRichMessage(
|
||||
html = html,
|
||||
markdown = null,
|
||||
blocks = null,
|
||||
media = media,
|
||||
isRtl = isRtl,
|
||||
skipEntityDetection = skipEntityDetection
|
||||
)
|
||||
@@ -72,61 +56,10 @@ fun InputRichMessageHTML(
|
||||
fun InputRichMessageMarkdown(
|
||||
markdown: String,
|
||||
isRtl: Boolean? = null,
|
||||
skipEntityDetection: Boolean? = null,
|
||||
media: List<InputRichMessageMedia>? = null
|
||||
): InputRichMessage = InputRichMessage(
|
||||
html = null,
|
||||
markdown = markdown,
|
||||
blocks = null,
|
||||
media = media,
|
||||
isRtl = isRtl,
|
||||
skipEntityDetection = skipEntityDetection
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates an [InputRichMessage] with the content described using a list of [InputRichBlock]s.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichmessage">InputRichMessage</a>
|
||||
*/
|
||||
fun InputRichMessageBlocks(
|
||||
blocks: List<InputRichBlock>,
|
||||
isRtl: Boolean? = null,
|
||||
skipEntityDetection: Boolean? = null
|
||||
): InputRichMessage = InputRichMessage(
|
||||
html = null,
|
||||
markdown = null,
|
||||
blocks = blocks,
|
||||
media = null,
|
||||
markdown = markdown,
|
||||
isRtl = isRtl,
|
||||
skipEntityDetection = skipEntityDetection
|
||||
)
|
||||
|
||||
/**
|
||||
* Files ([MultipartFile]) referenced by this [InputRichMessage]: the standalone [InputRichMessage.media] entries and any
|
||||
* media block nested (recursively) in [InputRichMessage.blocks], keyed by [MultipartFile.fileId].
|
||||
*/
|
||||
internal val InputRichMessage.multipartFiles: Map<String, MultipartFile>
|
||||
get() {
|
||||
val mediaFiles = media.orEmpty().flatMap { it.media.multipartFiles() }
|
||||
val blockFiles = blocks.orEmpty().flatMap { it.multipartFiles() }
|
||||
return (mediaFiles + blockFiles).associateBy { it.fileId }
|
||||
}
|
||||
|
||||
private fun TelegramMedia.multipartFiles(): List<MultipartFile> = listOfNotNull(
|
||||
file as? MultipartFile,
|
||||
if (this is ThumbedTelegramMedia) {
|
||||
thumb as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
},
|
||||
if (this is CoveredTelegramMedia) {
|
||||
cover as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
}
|
||||
)
|
||||
|
||||
private fun InputRichBlock.multipartFiles(): List<MultipartFile> {
|
||||
val ownFiles = (this as? InputRichBlockMedia) ?.media ?.multipartFiles().orEmpty()
|
||||
return ownFiles + subBlocks.flatMap { it.multipartFiles() }
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.types.idField
|
||||
import dev.inmo.tgbotapi.types.media.RichMessageMemberTelegramMedia
|
||||
import dev.inmo.tgbotapi.types.mediaField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
private val inputRichMessageMediaIdRegex = Regex("[A-Za-z0-9_-]{1,64}")
|
||||
|
||||
/**
|
||||
* Describes a media referenced from [InputRichMessage.html]/[InputRichMessage.markdown] via `tg://photo?id=`,
|
||||
* `tg://video?id=` and `tg://audio?id=` links.
|
||||
*
|
||||
* @see <a href="https://core.telegram.org/bots/api#inputrichmessagemedia">InputRichMessageMedia</a>
|
||||
*/
|
||||
@Serializable
|
||||
data class InputRichMessageMedia(
|
||||
@SerialName(idField)
|
||||
val id: String,
|
||||
@SerialName(mediaField)
|
||||
val media: RichMessageMemberTelegramMedia
|
||||
) {
|
||||
init {
|
||||
require(id.matches(inputRichMessageMediaIdRegex)) {
|
||||
"id of InputRichMessageMedia must be 1-64 characters long and contain only latin letters, digits, underscores and hyphens, but was \"$id\""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.update
|
||||
|
||||
import dev.inmo.tgbotapi.types.UpdateId
|
||||
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BotSubscriptionUpdatedUpdate(
|
||||
override val updateId: UpdateId,
|
||||
override val data: BotSubscriptionUpdated
|
||||
) : Update
|
||||
@@ -15,7 +15,6 @@ import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
||||
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased
|
||||
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
|
||||
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
|
||||
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
||||
import dev.inmo.tgbotapi.types.polls.Poll
|
||||
@@ -70,7 +69,6 @@ internal data class RawUpdate constructor(
|
||||
private val guest_message: RequestGuestContentMessage<*>? = null,
|
||||
private val purchased_paid_media: PaidMediaPurchased? = null,
|
||||
private val managed_bot: ManagedBotUpdated? = null,
|
||||
private val subscription: BotSubscriptionUpdated? = null,
|
||||
) {
|
||||
@Transient
|
||||
private var initedUpdate: Update? = null
|
||||
@@ -109,7 +107,6 @@ internal data class RawUpdate constructor(
|
||||
guest_message != null -> GuestMessageUpdate(updateId, guest_message)
|
||||
purchased_paid_media != null -> PaidMediaPurchasedUpdate(updateId, purchased_paid_media)
|
||||
managed_bot != null -> ManagedBotUpdate(updateId, managed_bot)
|
||||
subscription != null -> BotSubscriptionUpdatedUpdate(updateId, subscription)
|
||||
else -> UnknownUpdate(
|
||||
updateId,
|
||||
raw
|
||||
|
||||
@@ -47,7 +47,6 @@ interface FlowsUpdatesFilter : UpdatesFilter {
|
||||
val guestMessageUpdatesFlow: Flow<GuestMessageUpdate>
|
||||
val paidMediaPurchasedUpdatesFlow: Flow<PaidMediaPurchasedUpdate>
|
||||
val managedBotUpdatesFlow: Flow<ManagedBotUpdate>
|
||||
val botSubscriptionUpdatedUpdatesFlow: Flow<BotSubscriptionUpdatedUpdate>
|
||||
val unknownUpdatesFlow: Flow<UnknownUpdate>
|
||||
}
|
||||
|
||||
@@ -78,7 +77,6 @@ abstract class AbstractFlowsUpdatesFilter : FlowsUpdatesFilter {
|
||||
override val guestMessageUpdatesFlow: Flow<GuestMessageUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||
override val paidMediaPurchasedUpdatesFlow: Flow<PaidMediaPurchasedUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||
override val managedBotUpdatesFlow: Flow<ManagedBotUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||
override val botSubscriptionUpdatedUpdatesFlow: Flow<BotSubscriptionUpdatedUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,31 +69,4 @@ class ChatIdentifierTests {
|
||||
assertEquals(withUsername, deserialized)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EphemeralChatId_is_serialized_as_bare_long_by_ChatIdentifierSerializer`() {
|
||||
val ephemeralChatId = EphemeralChatId(chatIdentifierChatId, ChatId(RawChatId(456L)))
|
||||
val stringified = TestsJsonFormat.encodeToString(ChatIdentifierSerializer, ephemeralChatId as ChatIdentifier)
|
||||
assertEquals("$chatIdentifierChatId", stringified)
|
||||
val deserialized = TestsJsonFormat.decodeFromString(ChatIdentifierSerializer, stringified)
|
||||
assertEquals(ChatId(chatIdentifierChatId), deserialized)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EphemeralChatId_round_trips_through_FullChatIdentifierSerializer_with_ephemeralMessageId`() {
|
||||
val ephemeralChatId = EphemeralChatId(chatIdentifierChatId, ChatId(RawChatId(456L)), EphemeralMessageId(789L))
|
||||
val stringified = TestsJsonFormat.encodeToString(FullChatIdentifierSerializer, ephemeralChatId as ChatIdentifier)
|
||||
assertEquals("\"$chatIdentifierChatId/eph/456/789\"", stringified)
|
||||
val deserialized = TestsJsonFormat.decodeFromString(FullChatIdentifierSerializer, stringified)
|
||||
assertEquals(ephemeralChatId, deserialized)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EphemeralChatId_round_trips_through_FullChatIdentifierSerializer_without_ephemeralMessageId`() {
|
||||
val ephemeralChatId = EphemeralChatId(chatIdentifierChatId, ChatId(RawChatId(456L)))
|
||||
val stringified = TestsJsonFormat.encodeToString(FullChatIdentifierSerializer, ephemeralChatId as ChatIdentifier)
|
||||
assertEquals("\"$chatIdentifierChatId/eph/456/\"", stringified)
|
||||
val deserialized = TestsJsonFormat.decodeFromString(FullChatIdentifierSerializer, stringified)
|
||||
assertEquals(ephemeralChatId, deserialized)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import dev.inmo.tgbotapi.requests.DeleteEphemeralMessage
|
||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||
import dev.inmo.tgbotapi.requests.edit.caption.EditEphemeralMessageCaption
|
||||
import dev.inmo.tgbotapi.requests.edit.media.EditEphemeralMessageMedia
|
||||
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditEphemeralMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.requests.edit.text.EditEphemeralMessageText
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
import kotlin.test.*
|
||||
|
||||
private val ephemeralChatIdRequestsChatId: RawChatId = RawChatId(111L)
|
||||
private val ephemeralChatIdRequestsReceiverUser: UserId = ChatId(RawChatId(222L))
|
||||
private val ephemeralChatIdRequestsMessageId = EphemeralMessageId(333L)
|
||||
private val ephemeralChatIdWithMessageId = EphemeralChatId(
|
||||
ephemeralChatIdRequestsChatId,
|
||||
ephemeralChatIdRequestsReceiverUser,
|
||||
ephemeralChatIdRequestsMessageId
|
||||
)
|
||||
private val ephemeralChatIdWithoutMessageId = EphemeralChatId(
|
||||
ephemeralChatIdRequestsChatId,
|
||||
ephemeralChatIdRequestsReceiverUser
|
||||
)
|
||||
private val ephemeralChatIdRequestsMedia = TelegramMediaPhoto(FileId("photo_file_id"))
|
||||
|
||||
class EphemeralChatIdRequestsTest {
|
||||
@Test
|
||||
fun `DeleteEphemeralMessage_built_from_EphemeralChatId_delegates_correctly`() {
|
||||
val fromEphemeralChatId = DeleteEphemeralMessage(ephemeralChatIdWithMessageId)
|
||||
val fromExplicitArgs = DeleteEphemeralMessage(
|
||||
ephemeralChatIdWithMessageId,
|
||||
ephemeralChatIdRequestsReceiverUser,
|
||||
ephemeralChatIdRequestsMessageId
|
||||
)
|
||||
assertEquals(fromExplicitArgs, fromEphemeralChatId)
|
||||
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
DeleteEphemeralMessage(ephemeralChatIdWithoutMessageId)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EditEphemeralMessageMedia_built_from_EphemeralChatId_delegates_correctly`() {
|
||||
val fromEphemeralChatId = EditEphemeralMessageMedia(
|
||||
ephemeralChatIdWithMessageId,
|
||||
ephemeralChatIdRequestsMedia
|
||||
)
|
||||
val fromExplicitArgs = EditEphemeralMessageMedia(
|
||||
ephemeralChatIdWithMessageId,
|
||||
ephemeralChatIdRequestsReceiverUser,
|
||||
ephemeralChatIdRequestsMessageId,
|
||||
ephemeralChatIdRequestsMedia
|
||||
)
|
||||
assertEquals(fromExplicitArgs, fromEphemeralChatId)
|
||||
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
EditEphemeralMessageMedia(ephemeralChatIdWithoutMessageId, ephemeralChatIdRequestsMedia)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EditEphemeralMessageReplyMarkup_built_from_EphemeralChatId_delegates_correctly`() {
|
||||
val fromEphemeralChatId = EditEphemeralMessageReplyMarkup(ephemeralChatIdWithMessageId)
|
||||
val fromExplicitArgs = EditEphemeralMessageReplyMarkup(
|
||||
ephemeralChatIdWithMessageId,
|
||||
ephemeralChatIdRequestsReceiverUser,
|
||||
ephemeralChatIdRequestsMessageId
|
||||
)
|
||||
assertEquals(fromExplicitArgs, fromEphemeralChatId)
|
||||
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
EditEphemeralMessageReplyMarkup(ephemeralChatIdWithoutMessageId)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EditEphemeralMessageText_built_from_EphemeralChatId_delegates_correctly`() {
|
||||
val fromEphemeralChatId = EditEphemeralMessageText(ephemeralChatIdWithMessageId, "text")
|
||||
val fromExplicitArgs = EditEphemeralMessageText(
|
||||
ephemeralChatIdWithMessageId,
|
||||
ephemeralChatIdRequestsReceiverUser,
|
||||
ephemeralChatIdRequestsMessageId,
|
||||
"text"
|
||||
)
|
||||
assertEquals(fromExplicitArgs, fromEphemeralChatId)
|
||||
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
EditEphemeralMessageText(ephemeralChatIdWithoutMessageId, "text")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `EditEphemeralMessageCaption_built_from_EphemeralChatId_delegates_correctly`() {
|
||||
val fromEphemeralChatId = EditEphemeralMessageCaption(ephemeralChatIdWithMessageId, "caption")
|
||||
val fromExplicitArgs = EditEphemeralMessageCaption(
|
||||
ephemeralChatIdWithMessageId,
|
||||
ephemeralChatIdRequestsReceiverUser,
|
||||
ephemeralChatIdRequestsMessageId,
|
||||
"caption"
|
||||
)
|
||||
assertEquals(fromExplicitArgs, fromEphemeralChatId)
|
||||
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
EditEphemeralMessageCaption(ephemeralChatIdWithoutMessageId, "caption")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
|
||||
import dev.inmo.tgbotapi.types.polls.PollOptionPersistentId
|
||||
import kotlinx.serialization.SerializationException
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.encodeToString
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFailsWith
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class ReplyParametersSerializationTest {
|
||||
private val json = Json { encodeDefaults = false }
|
||||
|
||||
@Test
|
||||
fun chatRoundTripUsesFlatShape() {
|
||||
val value: ReplyParameters = ReplyParameters(
|
||||
ChatId(RawChatId(123L)),
|
||||
MessageId(456L),
|
||||
allowSendingWithoutReply = true
|
||||
)
|
||||
|
||||
val encoded = json.encodeToString(value)
|
||||
val encodedObject = json.parseToJsonElement(encoded).jsonObject
|
||||
|
||||
assertTrue("chat_id" in encodedObject)
|
||||
assertTrue("message_id" in encodedObject)
|
||||
assertFalse("ephemeral_message_id" in encodedObject)
|
||||
assertEquals(value, json.decodeFromString<ReplyParameters>(encoded))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun ephemeralRoundTripUsesFlatShape() {
|
||||
val value: ReplyParameters = ReplyParameters(
|
||||
ephemeralMessageId = EphemeralMessageId(789L),
|
||||
allowSendingWithoutReply = true,
|
||||
checklistTaskId = ChecklistTaskId(12u),
|
||||
pollOptionId = PollOptionPersistentId("option-id")
|
||||
)
|
||||
|
||||
val encoded = json.encodeToString(value)
|
||||
val encodedObject = json.parseToJsonElement(encoded).jsonObject
|
||||
|
||||
assertTrue("ephemeral_message_id" in encodedObject)
|
||||
assertTrue("checklist_task_id" in encodedObject)
|
||||
assertTrue("poll_option_id" in encodedObject)
|
||||
assertFalse("chat_id" in encodedObject)
|
||||
assertFalse("message_id" in encodedObject)
|
||||
assertEquals(value, json.decodeFromString<ReplyParameters>(encoded))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun currentChatPayloadWithoutChatIdDecodes() {
|
||||
val decoded = json.decodeFromString<ReplyParameters>("""{"message_id":456}""")
|
||||
|
||||
assertEquals(
|
||||
ReplyParameters.Chat(chatIdentifier = null, messageId = MessageId(456L)),
|
||||
decoded
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun payloadWithBothTargetKindsIsRejected() {
|
||||
assertFailsWith<SerializationException> {
|
||||
json.decodeFromString<ReplyParameters>("""{"chat_id":123,"message_id":456,"ephemeral_message_id":789}""")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun payloadWithoutTargetIsRejected() {
|
||||
assertFailsWith<SerializationException> {
|
||||
json.decodeFromString<ReplyParameters>("""{"allow_sending_without_reply":true}""")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class InputRichBlocksDslTest {
|
||||
@Test
|
||||
fun buildsTextAndContainerBlocks() {
|
||||
val blocks = buildInputRichBlocks {
|
||||
heading("Title", 1)
|
||||
paragraph {
|
||||
plain("Hello ")
|
||||
bold("world")
|
||||
}
|
||||
divider()
|
||||
list {
|
||||
item("first")
|
||||
item(labelType = "1") { paragraph("second") }
|
||||
}
|
||||
blockQuotation {
|
||||
paragraph("quoted")
|
||||
}
|
||||
}
|
||||
|
||||
assertEquals(5, blocks.size)
|
||||
assertEquals(InputRichBlockSectionHeading(RichTextPlain("Title"), 1), blocks[0])
|
||||
assertEquals(
|
||||
InputRichBlockParagraph(RichTextGroup(listOf(RichTextPlain("Hello "), RichTextBold(RichTextPlain("world"))))),
|
||||
blocks[1]
|
||||
)
|
||||
assertEquals(InputRichBlockDivider(), blocks[2])
|
||||
|
||||
val list = blocks[3] as InputRichBlockList
|
||||
assertEquals(2, list.items.size)
|
||||
assertEquals(InputRichBlockListItem(listOf(InputRichBlockParagraph(RichTextPlain("first")))), list.items[0])
|
||||
assertEquals("1", list.items[1].labelType)
|
||||
|
||||
assertEquals(InputRichBlockBlockQuotation(listOf(InputRichBlockParagraph(RichTextPlain("quoted")))), blocks[4])
|
||||
}
|
||||
|
||||
@Test
|
||||
fun buildsMediaBlocks() {
|
||||
val photo = TelegramMediaPhoto(FileId("photo_file_id"))
|
||||
val blocks = buildInputRichBlocks {
|
||||
photo(photo)
|
||||
}
|
||||
assertEquals(listOf(InputRichBlockPhoto(photo)), blocks)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun buildsInputRichMessageBlocks() {
|
||||
val message = InputRichMessageBlocks(isRtl = true) {
|
||||
paragraph("p")
|
||||
}
|
||||
assertEquals(InputRichMessageBlocks(listOf(InputRichBlockParagraph(RichTextPlain("p"))), true), message)
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.rich
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaVoiceNote
|
||||
import kotlinx.serialization.builtins.ListSerializer
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonArray
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import kotlinx.serialization.json.int
|
||||
import kotlinx.serialization.json.boolean
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFailsWith
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class InputRichMessageSerializationTest {
|
||||
private val json = Json { encodeDefaults = true }
|
||||
|
||||
@Test
|
||||
fun encodesTextAndContainerBlocks() {
|
||||
val message = InputRichMessageBlocks(
|
||||
blocks = listOf(
|
||||
InputRichBlockParagraph(RichTextPlain("Hello")),
|
||||
InputRichBlockSectionHeading(RichTextPlain("Title"), 2),
|
||||
InputRichBlockDivider(),
|
||||
InputRichBlockList(
|
||||
listOf(
|
||||
InputRichBlockListItem(
|
||||
listOf(InputRichBlockParagraph(RichTextPlain("first"))),
|
||||
labelType = "1"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
val blocksJson = json.encodeToJsonElement(InputRichMessage.serializer(), message).jsonObject["blocks"]!!.jsonArray
|
||||
|
||||
val paragraph = blocksJson[0].jsonObject
|
||||
assertEquals("paragraph", paragraph["type"]?.jsonPrimitive?.content)
|
||||
|
||||
val heading = blocksJson[1].jsonObject
|
||||
assertEquals("heading", heading["type"]?.jsonPrimitive?.content)
|
||||
assertEquals(2, heading["size"]?.jsonPrimitive?.int)
|
||||
|
||||
val divider = blocksJson[2].jsonObject
|
||||
assertEquals("divider", divider["type"]?.jsonPrimitive?.content)
|
||||
assertEquals(1, divider.size)
|
||||
|
||||
val list = blocksJson[3].jsonObject
|
||||
assertEquals("list", list["type"]?.jsonPrimitive?.content)
|
||||
val item = list["items"]!!.jsonArray[0].jsonObject
|
||||
assertTrue("label" !in item)
|
||||
assertEquals("1", item["type"]?.jsonPrimitive?.content)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun encodesTableReusingReceivedCellType() {
|
||||
val table = InputRichBlockTable(
|
||||
cells = listOf(
|
||||
listOf(RichBlockTableCell(RichTextPlain("h1"), isHeader = true, align = "left", valign = "top"))
|
||||
)
|
||||
)
|
||||
val message = InputRichMessageBlocks(blocks = listOf(table))
|
||||
|
||||
val tableJson = json.encodeToJsonElement(InputRichMessage.serializer(), message).jsonObject["blocks"]!!.jsonArray[0].jsonObject
|
||||
val cell = tableJson["cells"]!!.jsonArray[0].jsonArray[0].jsonObject
|
||||
assertEquals("left", cell["align"]?.jsonPrimitive?.content)
|
||||
assertEquals(true, cell["is_header"]?.jsonPrimitive?.boolean)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun encodesPhotoBlockMedia() {
|
||||
val photoBlock = InputRichBlockPhoto(TelegramMediaPhoto(FileId("photo_file_id")))
|
||||
val message = InputRichMessageBlocks(blocks = listOf(photoBlock))
|
||||
|
||||
val blockJson = json.encodeToJsonElement(InputRichMessage.serializer(), message).jsonObject["blocks"]!!.jsonArray[0].jsonObject
|
||||
assertEquals("photo", blockJson["type"]?.jsonPrimitive?.content)
|
||||
val photoJson = blockJson["photo"]!!.jsonObject
|
||||
assertEquals("photo", photoJson["type"]?.jsonPrimitive?.content)
|
||||
assertEquals("photo_file_id", photoJson["media"]?.jsonPrimitive?.content)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun encodesVoiceNoteBlock() {
|
||||
val voiceBlock = InputRichBlockVoiceNote(TelegramMediaVoiceNote(FileId("voice_file_id"), duration = 12))
|
||||
val message = InputRichMessageBlocks(blocks = listOf(voiceBlock))
|
||||
|
||||
val blockJson = json.encodeToJsonElement(InputRichMessage.serializer(), message).jsonObject["blocks"]!!.jsonArray[0].jsonObject
|
||||
assertEquals("voice_note", blockJson["type"]?.jsonPrimitive?.content)
|
||||
val voiceJson = blockJson["voice_note"]!!.jsonObject
|
||||
assertEquals("voice_note", voiceJson["type"]?.jsonPrimitive?.content)
|
||||
assertEquals("voice_file_id", voiceJson["media"]?.jsonPrimitive?.content)
|
||||
assertEquals(12, voiceJson["duration"]?.jsonPrimitive?.int)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun encodesMarkdownWithMedia() {
|
||||
val message = InputRichMessageMarkdown(
|
||||
markdown = "See ",
|
||||
media = listOf(InputRichMessageMedia("abc", TelegramMediaPhoto(FileId("photo_file_id"))))
|
||||
)
|
||||
|
||||
val element = json.encodeToJsonElement(InputRichMessage.serializer(), message).jsonObject
|
||||
assertEquals("See ", element["markdown"]?.jsonPrimitive?.content)
|
||||
val mediaJson = element["media"]!!.jsonArray[0].jsonObject
|
||||
assertEquals("abc", mediaJson["id"]?.jsonPrimitive?.content)
|
||||
assertEquals("photo_file_id", mediaJson["media"]!!.jsonObject["media"]?.jsonPrimitive?.content)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun roundTripsListOfInputRichBlocks() {
|
||||
val blocks: List<InputRichBlock> = listOf(
|
||||
InputRichBlockParagraph(RichTextGroup(listOf(RichTextPlain("a "), RichTextBold(RichTextPlain("b"))))),
|
||||
InputRichBlockDivider(),
|
||||
InputRichBlockList(
|
||||
listOf(
|
||||
InputRichBlockListItem(
|
||||
listOf(InputRichBlockParagraph(RichTextPlain("item"))),
|
||||
hasCheckbox = true,
|
||||
isChecked = true
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
val serializer = ListSerializer(InputRichBlockSerializer)
|
||||
val encoded = json.encodeToString(serializer, blocks)
|
||||
val decoded = json.decodeFromString(serializer, encoded)
|
||||
assertEquals(blocks, decoded)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun requiresExactlyOneOfHtmlMarkdownOrBlocks() {
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessage(html = null, markdown = null, blocks = null)
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessage(html = "<b>hi</b>", markdown = "**hi**", blocks = null)
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessage(
|
||||
html = "<b>hi</b>",
|
||||
markdown = null,
|
||||
blocks = listOf(InputRichBlockParagraph(RichTextPlain("hi")))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun requiresMediaOnlyWithoutBlocks() {
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessage(
|
||||
html = null,
|
||||
markdown = null,
|
||||
blocks = listOf(InputRichBlockParagraph(RichTextPlain("hi"))),
|
||||
media = listOf(InputRichMessageMedia("abc", TelegramMediaPhoto(FileId("photo_file_id"))))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun requiresValidMediaId() {
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessageMedia("", TelegramMediaPhoto(FileId("photo_file_id")))
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessageMedia("has space", TelegramMediaPhoto(FileId("photo_file_id")))
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
InputRichMessageMedia("x".repeat(65), TelegramMediaPhoto(FileId("photo_file_id")))
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user