1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-07-29 21:26:27 +00:00

Require ephemeral receiver/message id and add EphemeralChatId variants

Ephemeral edit/delete/replyToEphemeral requests no longer derive receiverUserId
and ephemeralMessageId from a throwing default: both are plain required
parameters again. Each chatId-taking form instead gained a convenience variant
accepting an EphemeralChatId, which sources both values from the identifier and
delegates to the required-parameter form, so a missing ephemeralMessageId fails
in the thin overload rather than during serialization.

Adds EphemeralChatIdRequestsTest covering the delegation of the core variants.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-20 19:24:56 +06:00
parent a1d2ebb4dc
commit d48e951232
15 changed files with 768 additions and 90 deletions

View File

@@ -25,7 +25,7 @@
* (`Ephemeral Messages`) `ReplyParameters` gained the `ephemeralMessageId` field and a new `(EphemeralMessageId, allowSendingWithoutReply)` constructor for replying to an ephemeral message; added the `Message.ephemeralReplyParametersOrNull()`/`Message.ephemeralReplyReceiverUserIdOrNull` helpers used by the `reply(to = ...)` smart-branch
* (`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. Every `receiverUserId`/`ephemeralMessageId` parameter across the send/edit/delete/reply request family now defaults from the passed `chatId`/`chat.id`/`replyInChatId` when it is an `EphemeralChatId`, instead of requiring it to be passed explicitly on every call
* (`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`
@@ -35,7 +35,7 @@
* (`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`) 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 now default from `chatId`/`chat.id` (`EphemeralChatId`) instead of being required on every call, throwing `IllegalArgumentException` if neither the parameter nor an `EphemeralChatId`-sourced default is available; `Replies.kt`'s `receiverUserId` default now also checks `replyInChatId.receiverUser` before falling back to `to.ephemeralReplyReceiverUserIdOrNull`
* (`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

View File

@@ -45,8 +45,7 @@ public final class dev/inmo/tgbotapi/extensions/api/DeleteEphemeralMessageKt {
public static final fun deleteEphemeralMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyEphemeralMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun deleteEphemeralMessage-5cqYris (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun deleteEphemeralMessage-5cqYris (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun deleteEphemeralMessage-5cqYris$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun deleteEphemeralMessage-5cqYris$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun deleteEphemeralMessage-TO6iXCg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/DeleteMessageKt {
@@ -982,6 +981,8 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/caption/EditChatMessage
}
public final class dev/inmo/tgbotapi/extensions/api/edit/caption/EditEphemeralMessageCaptionKt {
public static final fun editEphemeralMessageCaption-0xerGpE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageCaption-0xerGpE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun editEphemeralMessageCaption-KYb2L3A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun editEphemeralMessageCaption-KYb2L3A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageCaption-KYb2L3A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
@@ -990,6 +991,8 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/caption/EditEphemeralMe
public static final fun editEphemeralMessageCaption-W6OReh0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageCaption-W6OReh0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageCaption-W6OReh0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun editEphemeralMessageCaption-_ZSykVU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageCaption-_ZSykVU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/edit/caption/EditInlineMessageCaptionKt {
@@ -1054,6 +1057,8 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/media/EditChatMessageMe
}
public final class dev/inmo/tgbotapi/extensions/api/edit/media/EditEphemeralMessageMediaKt {
public static final fun editEphemeralMessageMedia-0xerGpE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageMedia-0xerGpE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun editEphemeralMessageMedia-W6OReh0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun editEphemeralMessageMedia-W6OReh0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageMedia-W6OReh0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
@@ -1088,6 +1093,8 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditEpheme
public static final fun editEphemeralMessageReplyMarkup-GtREVLI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageReplyMarkup-GtREVLI$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageReplyMarkup-GtREVLI$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun editEphemeralMessageReplyMarkup-ROka0Fo (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageReplyMarkup-ROka0Fo$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditInlineMessageReplyMarkupKt {
@@ -1145,6 +1152,14 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/text/EditEphemeralMessa
public static final fun editEphemeralMessageText-KYb2L3A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageText-KYb2L3A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageText-KYb2L3A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun editEphemeralMessageText-_ZSykVU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageText-_ZSykVU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun editEphemeralMessageText-uKGXrJE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun editEphemeralMessageText-uKGXrJE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun editEphemeralMessageText-uKGXrJE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageText-uKGXrJE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageText-uKGXrJE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun editEphemeralMessageText-uKGXrJE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/edit/text/EditInlineMessageTextKt {
@@ -1800,30 +1815,56 @@ public final class dev/inmo/tgbotapi/extensions/api/send/RepliesWithGuestQueryId
public final class dev/inmo/tgbotapi/extensions/api/send/ReplyToEphemeralKt {
public static final fun replyToEphemeral-FfEc7h4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeral-FfEc7h4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeral-uKGXrJE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeral-uKGXrJE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithAnimation-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithAnimation-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithAnimation-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithAnimation-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithAudio-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithAudio-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithAudio-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithAudio-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithContact-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithContact-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithContact-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithContact-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithDocument-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithDocument-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithDocument-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithDocument-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithLivePhoto-3RogYO8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithLivePhoto-3RogYO8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithLivePhoto-57IvCag (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithLivePhoto-57IvCag$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithLocation-FfEc7h4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JDDLjava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithLocation-FfEc7h4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JDDLjava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithLocation-uKGXrJE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;DDLjava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithLocation-uKGXrJE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;DDLjava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithPhoto-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithPhoto-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithPhoto-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithPhoto-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithSticker-KYb2L3A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithSticker-KYb2L3A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithSticker-_ZSykVU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithSticker-_ZSykVU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVenue-3RogYO8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JDDLjava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVenue-3RogYO8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JDDLjava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVenue-57IvCag (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;DDLjava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVenue-57IvCag$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;DDLjava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVideo-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVideo-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVideo-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVideo-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVideoNote-KYb2L3A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVideoNote-KYb2L3A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVideoNote-_ZSykVU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVideoNote-_ZSykVU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVoice-CymwWOU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVoice-CymwWOU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun replyToEphemeralWithVoice-bUcEqec (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun replyToEphemeralWithVoice-bUcEqec$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Triple;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/send/ResendMessageKt {

View File

@@ -3,25 +3,34 @@ 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.ephemeralMessageId
import dev.inmo.tgbotapi.types.receiverUser
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage
public suspend fun TelegramBot.deleteEphemeralMessage(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" }
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" }
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId
): Unit = deleteEphemeralMessage(chat.id, receiverUserId, ephemeralMessageId)
/**

View File

@@ -14,8 +14,8 @@ import dev.inmo.tgbotapi.types.chat.Chat
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
@@ -23,14 +23,35 @@ public suspend fun TelegramBot.editEphemeralMessageCaption(
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
@@ -42,22 +63,41 @@ public suspend fun TelegramBot.editEphemeralMessageCaption(
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageCaption(chat.id, receiverUserId, ephemeralMessageId, entities, replyMarkup)

View File

@@ -13,22 +13,37 @@ import dev.inmo.tgbotapi.types.chat.Chat
*/
public suspend fun TelegramBot.editEphemeralMessageMedia(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
media: TelegramFreeMedia,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageMedia(chat.id, receiverUserId, ephemeralMessageId, media, replyMarkup)

View File

@@ -12,20 +12,34 @@ import dev.inmo.tgbotapi.types.chat.Chat
*/
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageReplyMarkup(chat.id, receiverUserId, ephemeralMessageId, replyMarkup)

View File

@@ -17,8 +17,8 @@ import dev.inmo.tgbotapi.utils.buildEntities
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
@@ -27,14 +27,37 @@ public suspend fun TelegramBot.editEphemeralMessageText(
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
@@ -47,8 +70,8 @@ public suspend fun TelegramBot.editEphemeralMessageText(
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
@@ -56,14 +79,35 @@ public suspend fun TelegramBot.editEphemeralMessageText(
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
@@ -75,36 +119,66 @@ public suspend fun TelegramBot.editEphemeralMessageText(
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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 = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
@@ -117,8 +191,8 @@ public suspend fun TelegramBot.editEphemeralMessageText(
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chat: Chat,
receiverUserId: UserId = requireNotNull(chat.id.receiverUser) { "receiverUserId was not provided and chat.id (${chat.id}) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chat.id.ephemeralMessageId) { "ephemeralMessageId was not provided and chat.id (${chat.id}) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
separator: String,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,

View File

@@ -17,9 +17,9 @@ import dev.inmo.tgbotapi.types.message.content.*
* [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.
*
* Both `receiverUserId` and `ephemeralMessageId` default from [chatId] when it is (or carries) an
* [dev.inmo.tgbotapi.types.EphemeralChatId] (see [dev.inmo.tgbotapi.types.receiverUser] and
* [dev.inmo.tgbotapi.types.ephemeralMessageId]); otherwise they must be passed explicitly.
* 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
*/
@@ -30,8 +30,8 @@ import dev.inmo.tgbotapi.types.message.content.*
*/
public suspend fun TelegramBot.replyToEphemeral(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -45,10 +45,33 @@ public suspend fun TelegramBot.replyToEphemeral(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
@@ -64,10 +87,32 @@ public suspend fun TelegramBot.replyToEphemeralWithPhoto(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
livePhoto: InputFile,
photo: InputFile,
text: String? = null,
@@ -85,10 +130,34 @@ public suspend fun TelegramBot.replyToEphemeralWithLivePhoto(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
audio: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
@@ -104,10 +173,32 @@ public suspend fun TelegramBot.replyToEphemeralWithAudio(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
document: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
@@ -123,10 +214,32 @@ public suspend fun TelegramBot.replyToEphemeralWithDocument(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
video: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
@@ -142,10 +255,32 @@ public suspend fun TelegramBot.replyToEphemeralWithVideo(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
animation: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
@@ -161,10 +296,32 @@ public suspend fun TelegramBot.replyToEphemeralWithAnimation(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
voice: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
@@ -180,10 +337,32 @@ public suspend fun TelegramBot.replyToEphemeralWithVoice(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
videoNote: InputFile,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
@@ -195,10 +374,28 @@ public suspend fun TelegramBot.replyToEphemeralWithVideoNote(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
sticker: InputFile,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
@@ -210,13 +407,31 @@ public suspend fun TelegramBot.replyToEphemeralWithSticker(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
latitude: Double,
longitude: Double,
allowSendingWithoutReply: Boolean? = null,
@@ -230,10 +445,31 @@ public suspend fun TelegramBot.replyToEphemeralWithLocation(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
latitude: Double,
longitude: Double,
title: String,
@@ -251,10 +487,34 @@ public suspend fun TelegramBot.replyToEphemeralWithVenue(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
phoneNumber: String,
firstName: String,
lastName: String? = null,
@@ -269,3 +529,25 @@ public suspend fun TelegramBot.replyToEphemeralWithContact(
replyParameters = ReplyParameters(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
)

View File

@@ -747,8 +747,8 @@ public final class dev/inmo/tgbotapi/bot/settings/limiters/RequestLimiter$Defaul
public final class dev/inmo/tgbotapi/requests/DeleteEphemeralMessage : dev/inmo/tgbotapi/abstracts/types/EphemeralMessageAction, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
public static final field Companion Ldev/inmo/tgbotapi/requests/DeleteEphemeralMessage$Companion;
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlin/Triple;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun component2 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier;
public final fun component3-TazDcj0 ()J
@@ -4826,6 +4826,10 @@ public final class dev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageC
public final class dev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaptionKt {
public static final field editEphemeralMessageCaptionMethod Ljava/lang/String;
public static final fun EditEphemeralMessageCaption-5oOaHaE (Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
public static synthetic fun EditEphemeralMessageCaption-5oOaHaE$default (Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
public static final fun EditEphemeralMessageCaption-6OjyHG8 (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
public static synthetic fun EditEphemeralMessageCaption-6OjyHG8$default (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
public static final fun EditEphemeralMessageCaption-KsEWIr0 (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
public static synthetic fun EditEphemeralMessageCaption-KsEWIr0$default (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
public static final fun EditEphemeralMessageCaption-NM4o_PA (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/caption/EditEphemeralMessageCaption;
@@ -5146,6 +5150,8 @@ public final class dev/inmo/tgbotapi/requests/edit/media/EditEphemeralMessageMed
public static final field Companion Ldev/inmo/tgbotapi/requests/edit/media/EditEphemeralMessageMedia$Companion;
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlin/Triple;Ldev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlin/Triple;Ldev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun component2 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier;
public final fun component3-TazDcj0 ()J
@@ -5302,6 +5308,8 @@ public final class dev/inmo/tgbotapi/requests/edit/reply_markup/EditEphemeralMes
public static final field Companion Ldev/inmo/tgbotapi/requests/edit/reply_markup/EditEphemeralMessageReplyMarkup$Companion;
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlin/Triple;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlin/Triple;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun component2 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier;
public final fun component3-TazDcj0 ()J
@@ -5476,6 +5484,10 @@ public final class dev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText
public final class dev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageTextKt {
public static final field editEphemeralMessageTextMethod Ljava/lang/String;
public static final fun EditEphemeralMessageText-6OjyHG8 (Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;
public static synthetic fun EditEphemeralMessageText-6OjyHG8$default (Lkotlin/Triple;Ljava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;
public static final fun EditEphemeralMessageText-7Bto7E0 (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;
public static synthetic fun EditEphemeralMessageText-7Bto7E0$default (Lkotlin/Triple;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;
public static final fun EditEphemeralMessageText-8nKsyN0 (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;
public static synthetic fun EditEphemeralMessageText-8nKsyN0$default (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;
public static final fun EditEphemeralMessageText-KsEWIr0 (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/text/EditEphemeralMessageText;

View File

@@ -14,12 +14,20 @@ data class DeleteEphemeralMessage(
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" }
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>

View File

@@ -16,8 +16,8 @@ const val editEphemeralMessageCaptionMethod = "editEphemeralMessageCaption"
fun EditEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
@@ -31,10 +31,24 @@ fun EditEphemeralMessageCaption(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageCaption(
@@ -47,6 +61,18 @@ fun EditEphemeralMessageCaption(
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(
@@ -55,11 +81,11 @@ data class EditEphemeralMessageCaption internal constructor(
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
override val ephemeralMessageId: EphemeralMessageId,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)

View File

@@ -16,17 +16,28 @@ data class EditEphemeralMessageMedia(
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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) {

View File

@@ -15,14 +15,23 @@ data class EditEphemeralMessageReplyMarkup(
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
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<*>

View File

@@ -17,8 +17,8 @@ const val editEphemeralMessageTextMethod = "editEphemeralMessageText"
fun EditEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
@@ -34,10 +34,26 @@ fun EditEphemeralMessageText(
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 = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
@@ -52,6 +68,20 @@ fun EditEphemeralMessageText(
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(
@@ -60,11 +90,11 @@ data class EditEphemeralMessageText internal constructor(
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId = requireNotNull(chatId.receiverUser) { "receiverUserId was not provided and chatId ($chatId) is not an EphemeralChatId" },
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "ephemeralMessageId was not provided and chatId ($chatId) does not carry an ephemeralMessageId" },
override val ephemeralMessageId: EphemeralMessageId,
@SerialName(textField)
override val text: String,
@SerialName(parseModeField)

View File

@@ -0,0 +1,107 @@
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")
}
}
}