mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-07-31 14:19:19 +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:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user