From 82f7d5bd4f7b67797c3d1e56940cf4096c0082c8 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 15 Sep 2022 00:02:22 +0600 Subject: [PATCH 1/3] start 3.2.2 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70409113a3..c40e773353 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # TelegramBotAPI changelog +## 3.2.2 + ## 3.2.1 * `Versions`: diff --git a/gradle.properties b/gradle.properties index 0c22d04d3f..844ca6e213 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ kotlin.incremental=true kotlin.incremental.js=true library_group=dev.inmo -library_version=3.2.1 +library_version=3.2.2 From 3575a62f34e8a02bceda63d74eadc5c33b0188c6 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 15 Sep 2022 00:17:18 +0600 Subject: [PATCH 2/3] MessageIdentifier -> MessageId, replies with chatsIds/messageIds --- CHANGELOG.md | 5 + .../tgbotapi/extensions/api/DeleteMessage.kt | 10 +- .../tgbotapi/extensions/api/ForwardMessage.kt | 10 +- .../extensions/api/LiveFlowLocation.kt | 6 +- .../extensions/api/LiveLocationProvider.kt | 8 +- .../inmo/tgbotapi/extensions/api/StopPoll.kt | 4 +- .../api/chat/modify/PinChatMessage.kt | 6 +- .../api/chat/modify/UnpinChatMessage.kt | 6 +- .../tgbotapi/extensions/api/edit/Edits.kt | 16 +- .../edit/caption/EditChatMessageCaption.kt | 10 +- .../live/EditChatMessageLiveLocation.kt | 8 +- .../live/StopChatMessageLiveLocation.kt | 6 +- .../api/edit/media/EditChatMessageMedia.kt | 6 +- .../EditChatMessageReplyMarkup.kt | 6 +- .../api/edit/text/EditChatMessageText.kt | 10 +- .../api/games/GetGameHighScoresByChat.kt | 8 +- .../api/games/SetGameScoreByChatId.kt | 8 +- .../extensions/api/send/CopyMessage.kt | 74 +- .../extensions/api/send/CopyMessages.kt | 18 +- .../tgbotapi/extensions/api/send/Replies.kt | 6 +- .../api/send/RepliesWithChatsAndMessages.kt | 1399 +++++++++++++++++ .../extensions/api/send/SendContact.kt | 8 +- .../tgbotapi/extensions/api/send/SendDice.kt | 6 +- .../extensions/api/send/SendLiveLocation.kt | 18 +- .../extensions/api/send/SendMessage.kt | 18 +- .../extensions/api/send/SendStaticLocation.kt | 19 +- .../tgbotapi/extensions/api/send/SendVenue.kt | 12 +- .../tgbotapi/extensions/api/send/Sends.kt | 168 +- .../extensions/api/send/games/SendGame.kt | 10 +- .../api/send/media/SendAnimation.kt | 18 +- .../extensions/api/send/media/SendAudio.kt | 18 +- .../extensions/api/send/media/SendDocument.kt | 18 +- .../api/send/media/SendMediaGroup.kt | 34 +- .../extensions/api/send/media/SendPhoto.kt | 26 +- .../extensions/api/send/media/SendSticker.kt | 10 +- .../extensions/api/send/media/SendVideo.kt | 18 +- .../api/send/media/SendVideoNote.kt | 10 +- .../extensions/api/send/media/SendVoice.kt | 18 +- .../api/send/payments/SendInvoice.kt | 4 +- .../extensions/api/send/polls/SendPoll.kt | 26 +- .../tgbotapi/abstracts/types/MessageAction.kt | 4 +- .../abstracts/types/ReplyMessageId.kt | 4 +- .../inmo/tgbotapi/requests/DeleteMessage.kt | 2 +- .../inmo/tgbotapi/requests/ForwardMessage.kt | 2 +- .../dev/inmo/tgbotapi/requests/StopPoll.kt | 2 +- .../requests/chat/modify/PinChatMessage.kt | 2 +- .../requests/chat/modify/UnpinChatMessage.kt | 2 +- .../edit/caption/EditChatMessageCaption.kt | 6 +- .../live/EditChatMessageLiveLocation.kt | 2 +- .../live/StopChatMessageLiveLocation.kt | 2 +- .../edit/media/EditChatMessageMedia.kt | 2 +- .../EditChatMessageReplyMarkup.kt | 2 +- .../requests/edit/text/EditChatMessageText.kt | 6 +- .../requests/games/GetGameHighScoresByChat.kt | 2 +- .../requests/games/SetGameScoreByChatId.kt | 2 +- .../tgbotapi/requests/send/CopyMessage.kt | 26 +- .../tgbotapi/requests/send/SendContact.kt | 6 +- .../inmo/tgbotapi/requests/send/SendDice.kt | 2 +- .../tgbotapi/requests/send/SendLocation.kt | 8 +- .../tgbotapi/requests/send/SendMessage.kt | 6 +- .../inmo/tgbotapi/requests/send/SendVenue.kt | 6 +- .../tgbotapi/requests/send/games/SendGame.kt | 2 +- .../requests/send/media/SendAnimation.kt | 6 +- .../tgbotapi/requests/send/media/SendAudio.kt | 6 +- .../requests/send/media/SendDocument.kt | 6 +- .../requests/send/media/SendMediaGroup.kt | 10 +- .../tgbotapi/requests/send/media/SendPhoto.kt | 6 +- .../requests/send/media/SendSticker.kt | 4 +- .../tgbotapi/requests/send/media/SendVideo.kt | 6 +- .../requests/send/media/SendVideoNote.kt | 4 +- .../tgbotapi/requests/send/media/SendVoice.kt | 6 +- .../requests/send/payments/SendInvoice.kt | 2 +- .../tgbotapi/requests/send/polls/SendPoll.kt | 16 +- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 3 +- .../dev/inmo/tgbotapi/types/MessageId.kt | 6 +- .../message/ChannelContentMessageImpl.kt | 2 +- .../types/message/ChannelEventMessage.kt | 4 +- .../types/message/ChannelMediaGroupMessage.kt | 4 +- .../types/message/CommonGroupEventMessage.kt | 4 +- .../types/message/CommonMediaGroupMessage.kt | 2 +- .../message/CommonSupergroupEventMessage.kt | 4 +- .../tgbotapi/types/message/ForwardInfo.kt | 2 +- .../tgbotapi/types/message/GroupMessages.kt | 8 +- .../tgbotapi/types/message/PassportMessage.kt | 4 +- .../message/PrivateContentMessageImpl.kt | 2 +- .../types/message/PrivateEventMessage.kt | 4 +- .../inmo/tgbotapi/types/message/RawMessage.kt | 4 +- .../types/message/abstracts/Message.kt | 6 +- .../types/message/content/Abstracts.kt | 4 +- .../types/message/content/AnimationContent.kt | 4 +- .../types/message/content/AudioContent.kt | 4 +- .../types/message/content/ContactContent.kt | 2 +- .../types/message/content/DiceContent.kt | 4 +- .../types/message/content/DocumentContent.kt | 4 +- .../types/message/content/GameContent.kt | 4 +- .../types/message/content/InvoiceContent.kt | 4 +- .../types/message/content/LocationContent.kt | 6 +- .../types/message/content/PhotoContent.kt | 4 +- .../types/message/content/PollContent.kt | 4 +- .../types/message/content/StickerContent.kt | 4 +- .../types/message/content/TextContent.kt | 4 +- .../types/message/content/VenueContent.kt | 4 +- .../types/message/content/VideoContent.kt | 4 +- .../types/message/content/VideoNoteContent.kt | 4 +- .../types/message/content/VoiceContent.kt | 4 +- .../utils/extensions/raw/Message.kt | 2 +- .../utils/formatting/LinksFormatting.kt | 8 +- .../utils/shortcuts/MediaGroupsShortcuts.kt | 6 +- 108 files changed, 1901 insertions(+), 501 deletions(-) create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index c40e773353..45f58bb518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## 3.2.2 +* `Core`: + * `MessageIdentifier` has been renamed to `MessageId` +* `API`: + * New `reply`'es with chats and message ids + ## 3.2.1 * `Versions`: diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/DeleteMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/DeleteMessage.kt index 011b235fdb..8e9fc661ca 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/DeleteMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/DeleteMessage.kt @@ -3,20 +3,20 @@ package dev.inmo.tgbotapi.extensions.api import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.DeleteMessage import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.Message suspend fun TelegramBot.deleteMessage( chatId: ChatIdentifier, - messageId: MessageIdentifier + messageId: MessageId ) = execute( DeleteMessage(chatId, messageId) ) suspend fun TelegramBot.deleteMessage( chat: Chat, - messageId: MessageIdentifier + messageId: MessageId ) = deleteMessage(chat.id, messageId) suspend fun TelegramBot.deleteMessage( @@ -25,12 +25,12 @@ suspend fun TelegramBot.deleteMessage( suspend fun TelegramBot.delete( chatId: ChatIdentifier, - messageId: MessageIdentifier + messageId: MessageId ) = deleteMessage(chatId, messageId) suspend fun TelegramBot.delete( chat: Chat, - messageId: MessageIdentifier + messageId: MessageId ) = deleteMessage(chat, messageId) suspend fun TelegramBot.delete( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/ForwardMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/ForwardMessage.kt index ddec55cfb2..61c04d9a81 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/ForwardMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/ForwardMessage.kt @@ -3,14 +3,14 @@ package dev.inmo.tgbotapi.extensions.api import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.ForwardMessage import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.Message suspend fun TelegramBot.forwardMessage( fromChatId: ChatIdentifier, toChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, disableNotification: Boolean = false, protectContent: Boolean = false ) = execute( @@ -20,7 +20,7 @@ suspend fun TelegramBot.forwardMessage( suspend fun TelegramBot.forwardMessage( fromChat: Chat, toChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, disableNotification: Boolean = false, protectContent: Boolean = false ) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification, protectContent) @@ -28,7 +28,7 @@ suspend fun TelegramBot.forwardMessage( suspend fun TelegramBot.forwardMessage( fromChatId: ChatIdentifier, toChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, disableNotification: Boolean = false, protectContent: Boolean = false ) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification, protectContent) @@ -36,7 +36,7 @@ suspend fun TelegramBot.forwardMessage( suspend fun TelegramBot.forwardMessage( fromChat: Chat, toChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, disableNotification: Boolean = false, protectContent: Boolean = false ) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification, protectContent) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveFlowLocation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveFlowLocation.kt index 6caa782d64..3862286f90 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveFlowLocation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveFlowLocation.kt @@ -41,7 +41,7 @@ suspend fun TelegramBot.handleLiveLocation( liveTimeMillis: Long = defaultLivePeriodDelayMillis, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) { var currentLiveLocationMessage: ContentMessage? = null @@ -96,7 +96,7 @@ suspend fun TelegramBot.handleLiveLocation( liveTimeMillis: Long = defaultLivePeriodDelayMillis, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) { handleLiveLocation( @@ -131,7 +131,7 @@ suspend fun TelegramBot.handleLiveLocation( liveTimeMillis: Long = defaultLivePeriodDelayMillis, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) { handleLiveLocation( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt index 6615fa14e9..c750b86ec9 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/LiveLocationProvider.kt @@ -92,7 +92,7 @@ suspend fun TelegramBot.startLiveLocation( initProximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): LiveLocationProvider { @@ -137,7 +137,7 @@ suspend fun TelegramBot.startLiveLocation( initProximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): LiveLocationProvider = startLiveLocation( @@ -170,7 +170,7 @@ suspend fun TelegramBot.startLiveLocation( initProximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): LiveLocationProvider = startLiveLocation( @@ -203,7 +203,7 @@ suspend fun TelegramBot.startLiveLocation( initProximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): LiveLocationProvider = startLiveLocation( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/StopPoll.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/StopPoll.kt index c1ae1d5d31..ad05103cd6 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/StopPoll.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/StopPoll.kt @@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message */ suspend fun TelegramBot.stopPoll( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = execute( StopPoll(chatId, messageId, replyMarkup) @@ -25,7 +25,7 @@ suspend fun TelegramBot.stopPoll( */ suspend fun TelegramBot.stopPoll( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = stopPoll(chat.id, messageId, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessage.kt index e7c39b0503..af33a946db 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessage.kt @@ -3,19 +3,19 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.Message suspend fun TelegramBot.pinChatMessage( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, disableNotification: Boolean = false ) = execute(PinChatMessage(chatId, messageId, disableNotification)) suspend fun TelegramBot.pinChatMessage( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, disableNotification: Boolean = false ) = pinChatMessage(chat.id, messageId, disableNotification) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessage.kt index 5b6c582490..b902698c38 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessage.kt @@ -3,18 +3,18 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.Message suspend fun TelegramBot.unpinChatMessage( chatId: ChatIdentifier, - messageId: MessageIdentifier? = null + messageId: MessageId? = null ) = execute(UnpinChatMessage(chatId, messageId)) suspend fun TelegramBot.unpinChatMessage( chat: Chat, - messageId: MessageIdentifier? = null + messageId: MessageId? = null ) = unpinChatMessage(chat.id, messageId) suspend fun TelegramBot.unpinChatMessage( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/Edits.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/Edits.kt index 587ed38408..ee6b755ff2 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/Edits.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/Edits.kt @@ -50,7 +50,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, latitude: Double, longitude: Double, horizontalAccuracy: Meters? = null, @@ -65,7 +65,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, latitude: Double, longitude: Double, horizontalAccuracy: Meters? = null, @@ -94,7 +94,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, location: LiveLocation, replyMarkup: InlineKeyboardMarkup? = null ) = editLiveLocation( @@ -107,7 +107,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, location: LiveLocation, replyMarkup: InlineKeyboardMarkup? = null ) = editLiveLocation(chat, messageId, location, replyMarkup) @@ -128,7 +128,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, media: TelegramMedia, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageMedia(chatId, messageId, media, replyMarkup) @@ -139,7 +139,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, media: TelegramMedia, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageMedia(chat, messageId, media, replyMarkup) @@ -160,7 +160,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageReplyMarkup(chatId, messageId, replyMarkup) @@ -170,7 +170,7 @@ suspend fun TelegramBot.edit( */ suspend fun TelegramBot.edit( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageReplyMarkup(chat, messageId, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/caption/EditChatMessageCaption.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/caption/EditChatMessageCaption.kt index cb77e141fa..e1ded4811e 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/caption/EditChatMessageCaption.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/caption/EditChatMessageCaption.kt @@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.edit.caption.EditChatMessageCaption import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -21,7 +21,7 @@ import dev.inmo.tgbotapi.utils.RiskFeature */ suspend fun TelegramBot.editMessageCaption( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String, parseMode: ParseMode? = null, replyMarkup: InlineKeyboardMarkup? = null @@ -35,7 +35,7 @@ suspend fun TelegramBot.editMessageCaption( */ suspend fun TelegramBot.editMessageCaption( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, text: String, parseMode: ParseMode? = null, replyMarkup: InlineKeyboardMarkup? = null @@ -61,7 +61,7 @@ suspend fun TelegramBot.editMessageCaption( */ suspend fun TelegramBot.editMessageCaption( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, replyMarkup: InlineKeyboardMarkup? = null ) = execute( @@ -74,7 +74,7 @@ suspend fun TelegramBot.editMessageCaption( */ suspend fun TelegramBot.editMessageCaption( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, entities: List, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageCaption(chat.id, messageId, entities, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/EditChatMessageLiveLocation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/EditChatMessageLiveLocation.kt index 597339cff8..71a4776f11 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/EditChatMessageLiveLocation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/EditChatMessageLiveLocation.kt @@ -15,7 +15,7 @@ import dev.inmo.tgbotapi.types.message.content.LocationContent */ suspend fun TelegramBot.editLiveLocation( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, latitude: Double, longitude: Double, horizontalAccuracy: Meters? = null, @@ -34,7 +34,7 @@ suspend fun TelegramBot.editLiveLocation( */ suspend fun TelegramBot.editLiveLocation( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, latitude: Double, longitude: Double, horizontalAccuracy: Meters? = null, @@ -63,7 +63,7 @@ suspend fun TelegramBot.editLiveLocation( */ suspend fun TelegramBot.editLiveLocation( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, location: LiveLocation, replyMarkup: InlineKeyboardMarkup? = null ) = execute( @@ -78,7 +78,7 @@ suspend fun TelegramBot.editLiveLocation( */ suspend fun TelegramBot.editLiveLocation( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, location: LiveLocation, replyMarkup: InlineKeyboardMarkup? = null ) = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/StopChatMessageLiveLocation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/StopChatMessageLiveLocation.kt index da68e5aa3b..d3ae6328fe 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/StopChatMessageLiveLocation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/location/live/StopChatMessageLiveLocation.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.location.live import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.edit.location.live.StopChatMessageLiveLocation import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -15,7 +15,7 @@ import dev.inmo.tgbotapi.types.message.content.LocationContent */ suspend fun TelegramBot.stopLiveLocation( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = execute( StopChatMessageLiveLocation( @@ -29,7 +29,7 @@ suspend fun TelegramBot.stopLiveLocation( */ suspend fun TelegramBot.stopLiveLocation( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = stopLiveLocation(chat.id, messageId, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/media/EditChatMessageMedia.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/media/EditChatMessageMedia.kt index 9620dee3b4..be15339bf8 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/media/EditChatMessageMedia.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/media/EditChatMessageMedia.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.edit.media.EditChatMessageMedia import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMedia -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -16,7 +16,7 @@ import dev.inmo.tgbotapi.types.message.content.MediaContent */ suspend fun TelegramBot.editMessageMedia( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, media: TelegramMedia, replyMarkup: InlineKeyboardMarkup? = null ) = execute( @@ -29,7 +29,7 @@ suspend fun TelegramBot.editMessageMedia( */ suspend fun TelegramBot.editMessageMedia( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, media: TelegramMedia, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageMedia(chat.id, messageId, media, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditChatMessageReplyMarkup.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditChatMessageReplyMarkup.kt index 79f576fe18..dedb5f38b7 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditChatMessageReplyMarkup.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditChatMessageReplyMarkup.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.edit.reply_markup import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.edit.reply_markup.EditChatMessageReplyMarkup import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.Message @@ -14,7 +14,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message */ suspend fun TelegramBot.editMessageReplyMarkup( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = execute( EditChatMessageReplyMarkup(chatId, messageId, replyMarkup) @@ -26,7 +26,7 @@ suspend fun TelegramBot.editMessageReplyMarkup( */ suspend fun TelegramBot.editMessageReplyMarkup( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, replyMarkup: InlineKeyboardMarkup? = null ) = editMessageReplyMarkup(chat.id, messageId, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/text/EditChatMessageText.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/text/EditChatMessageText.kt index 34a6797333..5b2267609d 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/text/EditChatMessageText.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/text/EditChatMessageText.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.edit.text.EditChatMessageText import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -19,7 +19,7 @@ import dev.inmo.tgbotapi.utils.RiskFeature */ suspend fun TelegramBot.editMessageText( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String, parseMode: ParseMode? = null, disableWebPagePreview: Boolean? = null, @@ -34,7 +34,7 @@ suspend fun TelegramBot.editMessageText( */ suspend fun TelegramBot.editMessageText( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, text: String, parseMode: ParseMode? = null, disableWebPagePreview: Boolean? = null, @@ -59,7 +59,7 @@ suspend fun TelegramBot.editMessageText( */ suspend fun TelegramBot.editMessageText( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableWebPagePreview: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null @@ -73,7 +73,7 @@ suspend fun TelegramBot.editMessageText( */ suspend fun TelegramBot.editMessageText( chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableWebPagePreview: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/GetGameHighScoresByChat.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/GetGameHighScoresByChat.kt index 91c4079fbb..0677efd4c7 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/GetGameHighScoresByChat.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/GetGameHighScoresByChat.kt @@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.content.GameContent suspend fun TelegramBot.getGameScore( userId: UserId, chatId: ChatId, - messageId: MessageIdentifier + messageId: MessageId ) = execute( GetGameHighScoresByChat(userId, chatId, messageId) ) @@ -19,7 +19,7 @@ suspend fun TelegramBot.getGameScore( suspend fun TelegramBot.getGameScore( user: CommonUser, chatId: ChatId, - messageId: MessageIdentifier + messageId: MessageId ) = getGameScore( user.id, chatId, messageId ) @@ -27,7 +27,7 @@ suspend fun TelegramBot.getGameScore( suspend fun TelegramBot.getGameScore( userId: UserId, chat: Chat, - messageId: MessageIdentifier + messageId: MessageId ) = getGameScore( userId, chat.id, messageId ) @@ -35,7 +35,7 @@ suspend fun TelegramBot.getGameScore( suspend fun TelegramBot.getGameScore( user: CommonUser, chat: Chat, - messageId: MessageIdentifier + messageId: MessageId ) = getGameScore( user.id, chat.id, messageId ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/SetGameScoreByChatId.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/SetGameScoreByChatId.kt index 46a1289288..fb25c3eeb8 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/SetGameScoreByChatId.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/SetGameScoreByChatId.kt @@ -12,7 +12,7 @@ suspend fun TelegramBot.setGameScore( userId: UserId, score: Long, chatId: ChatId, - messageId: MessageIdentifier, + messageId: MessageId, force: Boolean = false, disableEditMessage: Boolean = false ) = execute( @@ -23,7 +23,7 @@ suspend fun TelegramBot.setGameScore( user: CommonUser, score: Long, chatId: ChatId, - messageId: MessageIdentifier, + messageId: MessageId, force: Boolean = false, disableEditMessage: Boolean = false ) = setGameScore( @@ -34,7 +34,7 @@ suspend fun TelegramBot.setGameScore( userId: UserId, score: Long, chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, force: Boolean = false, disableEditMessage: Boolean = false ) = setGameScore( @@ -45,7 +45,7 @@ suspend fun TelegramBot.setGameScore( user: CommonUser, score: Long, chat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, force: Boolean = false, disableEditMessage: Boolean = false ) = setGameScore( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt index 5cb4239dd1..fd6569993f 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.CopyMessage import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -16,13 +16,13 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message */ suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, toChatId: ChatIdentifier, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -46,13 +46,13 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, toChatId: ChatIdentifier, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -63,13 +63,13 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, toChat: Chat, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -80,13 +80,13 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, toChat: Chat, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -98,12 +98,12 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, toChatId: ChatIdentifier, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -126,12 +126,12 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, toChatId: ChatIdentifier, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(fromChat.id, messageId, toChatId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -142,12 +142,12 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, toChat: Chat, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(fromChatId, messageId, toChat.id, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -158,12 +158,12 @@ suspend inline fun TelegramBot.copyMessage( */ suspend inline fun TelegramBot.copyMessage( fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, toChat: Chat, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(fromChat.id, messageId, toChat.id, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -179,7 +179,7 @@ suspend inline fun TelegramBot.copyMessage( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -195,7 +195,7 @@ suspend inline fun TelegramBot.copyMessage( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(message.chat, message.messageId, toChat, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -210,7 +210,7 @@ suspend inline fun TelegramBot.copyMessage( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(message.chat, message.messageId, toChatId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -225,7 +225,7 @@ suspend inline fun TelegramBot.copyMessage( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage(message.chat, message.messageId, toChat, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -237,12 +237,12 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -267,12 +267,12 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage( @@ -295,12 +295,12 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage( @@ -323,12 +323,12 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage( @@ -352,11 +352,11 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -380,11 +380,11 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage( @@ -406,11 +406,11 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage( @@ -432,11 +432,11 @@ suspend inline fun TelegramBot.copyMessage( suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = copyMessage( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt index 7c207cc2fa..1673fd81ea 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.extensions.api.send.media.sendMediaGroup import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.* import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage @@ -23,7 +23,7 @@ suspend inline fun TelegramBot.copyMessages( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ): List> { val first = messages.first().content.toMediaGroupMemberTelegramMedia().let { @@ -62,7 +62,7 @@ suspend inline fun TelegramBot.copyMessages( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = copyMessages(toChat.id, messages, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -77,7 +77,7 @@ suspend inline fun TelegramBot.copyMessages( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = copyMessages(toChat, update.data, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -92,7 +92,7 @@ suspend inline fun TelegramBot.copyMessages( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = copyMessages(toChat.id, update, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -106,7 +106,7 @@ suspend inline fun TelegramBot.copyMessages( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ): List> { val first = messages.first().content.toMediaGroupMemberTelegramMedia().let { @@ -140,7 +140,7 @@ suspend inline fun TelegramBot.copyMessages( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = copyMessages(toChat.id, messages, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -154,7 +154,7 @@ suspend inline fun TelegramBot.copyMessages( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = copyMessages(toChat, update.data, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -168,6 +168,6 @@ suspend inline fun TelegramBot.copyMessages( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = copyMessages(toChat.id, update, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt index 116c1e5387..dd8ee6ad6a 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt @@ -1,6 +1,5 @@ package dev.inmo.tgbotapi.extensions.api.send -import dev.inmo.tgbotapi.abstracts.types.WithReplyMarkup import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.extensions.api.* import dev.inmo.tgbotapi.extensions.api.send.games.sendGame @@ -32,7 +31,6 @@ import dev.inmo.tgbotapi.types.polls.* import dev.inmo.tgbotapi.types.venue.Venue import dev.inmo.tgbotapi.utils.RiskFeature import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.map import kotlin.js.JsName import kotlin.jvm.JvmName @@ -949,7 +947,7 @@ suspend inline fun TelegramBot.reply( suspend inline fun TelegramBot.reply( to: Message, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, @@ -972,7 +970,7 @@ suspend inline fun TelegramBot.reply( suspend inline fun TelegramBot.reply( to: Message, fromChat: Chat, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt new file mode 100644 index 0000000000..5778afb8c2 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt @@ -0,0 +1,1399 @@ +package dev.inmo.tgbotapi.extensions.api.send + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.extensions.api.* +import dev.inmo.tgbotapi.extensions.api.send.games.sendGame +import dev.inmo.tgbotapi.extensions.api.send.media.* +import dev.inmo.tgbotapi.extensions.api.send.payments.sendInvoice +import dev.inmo.tgbotapi.extensions.api.send.polls.sendQuizPoll +import dev.inmo.tgbotapi.extensions.api.send.polls.sendRegularPoll +import dev.inmo.tgbotapi.requests.abstracts.InputFile +import dev.inmo.tgbotapi.requests.send.media.rawSendingMediaGroupsWarning +import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.media.* +import dev.inmo.tgbotapi.types.message.textsources.TextSource +import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList +import dev.inmo.tgbotapi.types.message.ParseMode +import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup +import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup +import dev.inmo.tgbotapi.types.chat.Chat +import dev.inmo.tgbotapi.types.dice.DiceAnimationType +import dev.inmo.tgbotapi.types.files.* +import dev.inmo.tgbotapi.types.files.TelegramMediaFile +import dev.inmo.tgbotapi.types.files.Sticker +import dev.inmo.tgbotapi.types.games.Game +import dev.inmo.tgbotapi.types.location.* +import dev.inmo.tgbotapi.types.message.abstracts.Message +import dev.inmo.tgbotapi.types.message.content.* +import dev.inmo.tgbotapi.types.payments.LabeledPrice +import dev.inmo.tgbotapi.types.payments.abstracts.Currency +import dev.inmo.tgbotapi.types.polls.* +import dev.inmo.tgbotapi.types.venue.Venue +import dev.inmo.tgbotapi.utils.RiskFeature +import kotlinx.coroutines.flow.Flow +import kotlin.js.JsName +import kotlin.jvm.JvmName + + +// Contact + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + phoneNumber: String, + firstName: String, + lastName: String? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendContact( + toChatId, + phoneNumber, + firstName, + lastName, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + contact: Contact, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendContact( + toChatId, + contact, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + + +// Dice + +/** + * @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 + */ +suspend inline fun TelegramBot.replyWithDice( + toChatId: ChatId, + toMessageId: MessageId, + animationType: DiceAnimationType? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendDice(toChatId, animationType, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + animationType: DiceAnimationType, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = replyWithDice(toChatId, toMessageId, animationType, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) + + +// Location + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + latitude: Double, + longitude: Double, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendLocation( + toChatId, + latitude, + longitude, + disableNotification, + protectContent, + allowSendingWithoutReply, + toMessageId, + replyMarkup +) + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + location: StaticLocation, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendLocation( + toChatId, + location, + disableNotification, + protectContent, + allowSendingWithoutReply, + toMessageId, + replyMarkup +) + + +// Text message + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + text: String, + parseMode: ParseMode? = null, + disableWebPagePreview: Boolean? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendTextMessage( + toChatId, + text, + parseMode, + disableWebPagePreview, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + entities: TextSourcesList, + disableWebPagePreview: Boolean? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendTextMessage( + toChatId, + entities, + disableWebPagePreview, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + + +// Venue + +/** + * @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 + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + latitude: Double, + longitude: Double, + title: String, + address: String, + foursquareId: FoursquareId? = null, + foursquareType: FoursquareType? = null, + googlePlaceId: GooglePlaceId? = null, + googlePlaceType: GooglePlaceType? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVenue( + chatId = toChatId, + latitude = latitude, + longitude = longitude, + title = title, + address = address, + foursquareId = foursquareId, + foursquareType = foursquareType, + googlePlaceId = googlePlaceId, + googlePlaceType = googlePlaceType, + disableNotification = disableNotification, + protectContent = protectContent, + replyToMessageId = toMessageId, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup +) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + location: StaticLocation, + title: String, + address: String, + foursquareId: FoursquareId? = null, + foursquareType: FoursquareType? = null, + googlePlaceId: GooglePlaceId? = null, + googlePlaceType: GooglePlaceType? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVenue( + chatId = toChatId, + latitude = location.latitude, + longitude = location.longitude, + title = title, + address = address, + foursquareId = foursquareId, + foursquareType = foursquareType, + googlePlaceId = googlePlaceId, + googlePlaceType = googlePlaceType, + disableNotification = disableNotification, + protectContent = protectContent, + replyToMessageId = toMessageId, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup +) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + venue: Venue, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVenue( + chatId = toChatId, + venue = venue, + disableNotification = disableNotification, + protectContent = protectContent, + replyToMessageId = toMessageId, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup +) + + +// Game + +suspend inline fun TelegramBot.replyWithGame( + toChatId: ChatId, + toMessageId: MessageId, + gameShortName: String, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendGame( + toChatId, gameShortName, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup +) + +suspend inline fun TelegramBot.replyWithGame( + toChatId: ChatId, + toMessageId: MessageId, + game: Game, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendGame( + toChatId, game.title, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup +) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + game: Game, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = replyWithGame(toChatId, toMessageId, game, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) + + +// Animation + +suspend inline fun TelegramBot.replyWithAnimation( + toChatId: ChatId, + toMessageId: MessageId, + animation: InputFile, + thumb: InputFile? = null, + text: String? = null, + parseMode: ParseMode? = null, + duration: Long? = null, + width: Int? = null, + height: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAnimation( + toChatId, + animation, + thumb, + text, + parseMode, + duration, + width, + height, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + animation: AnimationFile, + text: String? = null, + parseMode: ParseMode? = null, + duration: Long? = null, + width: Int? = null, + height: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAnimation(toChatId, animation, text, parseMode, duration, width, height, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.replyWithAnimation( + toChatId: ChatId, + toMessageId: MessageId, + animation: InputFile, + entities: TextSourcesList, + thumb: InputFile? = null, + duration: Long? = null, + width: Int? = null, + height: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAnimation( + toChatId, + animation, + thumb, + entities, + duration, + width, + height, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + animation: AnimationFile, + entities: TextSourcesList, + duration: Long? = null, + width: Int? = null, + height: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAnimation(toChatId, animation, entities, duration, width, height, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Audio + +suspend inline fun TelegramBot.replyWithAudio( + toChatId: ChatId, + toMessageId: MessageId, + audio: InputFile, + thumb: InputFile? = null, + text: String? = null, + parseMode: ParseMode? = null, + duration: Long? = null, + performer: String? = null, + title: String? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAudio(toChatId, audio, thumb, text, parseMode, duration, performer, title, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + audio: AudioFile, + text: String? = null, + parseMode: ParseMode? = null, + title: String? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAudio(toChatId, audio, text, parseMode, title, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.replyWithAudio( + toChatId: ChatId, + toMessageId: MessageId, + audio: InputFile, + thumb: InputFile? = null, + entities: TextSourcesList, + duration: Long? = null, + performer: String? = null, + title: String? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAudio(toChatId, audio, thumb, entities, duration, performer, title, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + audio: AudioFile, + entities: TextSourcesList, + title: String? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendAudio(toChatId, audio, entities, title, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Documents + +suspend inline fun TelegramBot.replyWithDocument( + toChatId: ChatId, + toMessageId: MessageId, + document: InputFile, + thumb: InputFile? = null, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null, + disableContentTypeDetection: Boolean? = null +) = sendDocument(toChatId, document, thumb, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + document: DocumentFile, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null, + disableContentTypeDetection: Boolean? = null +) = sendDocument(toChatId, document, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection) + +suspend inline fun TelegramBot.replyWithDocument( + toChatId: ChatId, + toMessageId: MessageId, + document: InputFile, + thumb: InputFile? = null, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null, + disableContentTypeDetection: Boolean? = null +) = sendDocument(toChatId, document, thumb, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + document: DocumentFile, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null, + disableContentTypeDetection: Boolean? = null +) = sendDocument(toChatId, document, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection) + + +// Media Group + +@RiskFeature(rawSendingMediaGroupsWarning) +suspend inline fun TelegramBot.replyWithMediaGroup( + toChatId: ChatId, + toMessageId: MessageId, + media: List, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) = sendMediaGroup(toChatId, media, disableNotification, protectContent, toMessageId, allowSendingWithoutReply) + +suspend inline fun TelegramBot.replyWithPlaylist( + toChatId: ChatId, + toMessageId: MessageId, + media: List, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) = sendPlaylist(toChatId, media, disableNotification, protectContent, toMessageId, allowSendingWithoutReply) + +suspend inline fun TelegramBot.replyWithDocuments( + toChatId: ChatId, + toMessageId: MessageId, + media: List, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) = sendDocumentsGroup(toChatId, media, disableNotification, protectContent, toMessageId, allowSendingWithoutReply) + +suspend inline fun TelegramBot.replyWithGallery( + toChatId: ChatId, + toMessageId: MessageId, + media: List, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) = sendVisualMediaGroup(toChatId, media, disableNotification, protectContent, toMessageId, allowSendingWithoutReply) + + +// Photo + +suspend inline fun TelegramBot.replyWithPhoto( + toChatId: ChatId, + toMessageId: MessageId, + fileId: InputFile, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendPhoto(toChatId, fileId, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + photo: Photo, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendPhoto(toChatId, photo, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + photoSize: PhotoSize, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendPhoto(toChatId, photoSize, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +suspend inline fun TelegramBot.replyWithPhoto( + toChatId: ChatId, + toMessageId: MessageId, + fileId: InputFile, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendPhoto(toChatId, fileId, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + photo: Photo, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendPhoto(toChatId, photo, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + photoSize: PhotoSize, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendPhoto(toChatId, photoSize, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Sticker + +suspend inline fun TelegramBot.replyWithSticker( + toChatId: ChatId, + toMessageId: MessageId, + sticker: InputFile, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendSticker(toChatId, sticker, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + sticker: Sticker, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendSticker(toChatId, sticker, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Videos + +suspend inline fun TelegramBot.replyWithVideo( + toChatId: ChatId, + toMessageId: MessageId, + video: InputFile, + thumb: InputFile? = null, + text: String? = null, + parseMode: ParseMode? = null, + duration: Long? = null, + width: Int? = null, + height: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVideo(toChatId, video, thumb, text, parseMode, duration, width, height, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + video: VideoFile, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVideo(toChatId, video, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.replyWithVideo( + toChatId: ChatId, + toMessageId: MessageId, + video: InputFile, + thumb: InputFile? = null, + entities: TextSourcesList, + duration: Long? = null, + width: Int? = null, + height: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVideo(toChatId, video, thumb, entities, duration, width, height, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + video: VideoFile, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVideo(toChatId, video, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// VideoNotes + +suspend inline fun TelegramBot.replyWithVideoNote( + toChatId: ChatId, + toMessageId: MessageId, + videoNote: InputFile, + thumb: InputFile? = null, + duration: Long? = null, + size: Int? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVideoNote(toChatId, videoNote, thumb, duration, size, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + videoNote: VideoNoteFile, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVideoNote(toChatId, videoNote, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Voice + +suspend inline fun TelegramBot.replyWithVoice( + toChatId: ChatId, + toMessageId: MessageId, + voice: InputFile, + text: String? = null, + parseMode: ParseMode? = null, + duration: Long? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVoice(toChatId, voice, text, parseMode, duration, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + voice: VoiceFile, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVoice(toChatId, voice, text, parseMode, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +suspend inline fun TelegramBot.replyWithVoice( + toChatId: ChatId, + toMessageId: MessageId, + voice: InputFile, + entities: TextSourcesList, + duration: Long? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVoice(toChatId, voice, entities, duration, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + voice: VoiceFile, + entities: TextSourcesList, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendVoice(toChatId, voice, entities, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Invoice + +/** + * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * as a builder for that + */ +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + title: String, + description: String, + payload: String, + providerToken: String, + currency: Currency, + prices: List, + maxTipAmount: Int? = null, + suggestedTipAmounts: List? = null, + startParameter: StartParameter? = null, + providerData: String? = null, + requireName: Boolean = false, + requirePhoneNumber: Boolean = false, + requireEmail: Boolean = false, + requireShippingAddress: Boolean = false, + shouldSendPhoneNumberToProvider: Boolean = false, + shouldSendEmailToProvider: Boolean = false, + priceDependOnShipAddress: Boolean = false, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: InlineKeyboardMarkup? = null +) = sendInvoice(toChatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +// Polls + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + question: String, + options: List, + isAnonymous: Boolean = true, + isClosed: Boolean = false, + allowMultipleAnswers: Boolean = false, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendRegularPoll(toChatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + poll: RegularPoll, + isClosed: Boolean = false, + question: String = poll.question, + options: List = poll.options.map { it.text }, + isAnonymous: Boolean = poll.isAnonymous, + allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendRegularPoll(toChatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + question: String, + options: List, + correctOptionId: Int, + isAnonymous: Boolean = true, + isClosed: Boolean = false, + explanation: String? = null, + parseMode: ParseMode? = null, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendQuizPoll(toChatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + quizPoll: QuizPoll, + isClosed: Boolean = false, + question: String = quizPoll.question, + options: List = quizPoll.options.map { it.text }, + correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"), + isAnonymous: Boolean = quizPoll.isAnonymous, + explanation: String? = null, + parseMode: ParseMode? = null, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendQuizPoll(toChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + question: String, + options: List, + correctOptionId: Int, + entities: TextSourcesList, + isAnonymous: Boolean = true, + isClosed: Boolean = false, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendQuizPoll(toChatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + quizPoll: QuizPoll, + entities: TextSourcesList, + isClosed: Boolean = false, + question: String = quizPoll.question, + options: List = quizPoll.options.map { it.text }, + correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"), + isAnonymous: Boolean = quizPoll.isAnonymous, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = sendQuizPoll(toChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup) + + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + poll: Poll, + isClosed: Boolean = false, + question: String = poll.question, + options: List = poll.options.map { it.text }, + isAnonymous: Boolean = poll.isAnonymous, + closeInfo: ScheduledCloseInfo? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = when (poll) { + is RegularPoll -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + poll = poll, + isClosed = isClosed, + question = question, + options = options, + isAnonymous = isAnonymous, + allowMultipleAnswers = isAnonymous, + closeInfo = closeInfo, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is UnknownPollType -> error("Unable to send poll with unknown type ($poll)") + is QuizPoll -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + quizPoll = poll, + entities = poll.textSources, + isClosed = isClosed, + question = question, + options = options, + isAnonymous = isAnonymous, + closeInfo = closeInfo, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) +} + + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + fromChatId: ChatIdentifier, + messageId: MessageId, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = copyMessage( + toChatId, + fromChatId, + messageId, + text, + parseMode, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup +) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + fromChat: Chat, + messageId: MessageId, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) + +suspend inline fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + copy: Message, + text: String? = null, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) + +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + content: MessageContent, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) { + execute( + content.createResend( + toChatId, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply, + replyMarkup + ) + ) +} + +/** + * Will use [handleLiveLocation] with replying to [message] each time new message will be sent by live location update + * + * @see handleLiveLocation + */ +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + locationsFlow: Flow, + liveTimeMillis: Long = defaultLivePeriodDelayMillis, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) = handleLiveLocation( + toChatId, + locationsFlow, + liveTimeMillis, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply +) + +/** + * Will use [handleLiveLocation] with replying to [message] each time new message will be sent by live location update + * + * @see handleLiveLocation + */ +@JvmName("replyLiveLocationWithLocation") +@JsName("replyLiveLocationWithLocation") +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + locationsFlow: Flow, + liveTimeMillis: Long = defaultLivePeriodDelayMillis, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) { + handleLiveLocation( + toChatId, + locationsFlow, + liveTimeMillis, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply + ) +} + +/** + * Will use [handleLiveLocation] with replying to [message] each time new message will be sent by live location update + * + * @see handleLiveLocation + */ +@JvmName("replyLiveLocationWithLatLong") +@JsName("replyLiveLocationWithLatLong") +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + locationsFlow: Flow>, + liveTimeMillis: Long = defaultLivePeriodDelayMillis, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null +) { + handleLiveLocation( + toChatId, + locationsFlow, + liveTimeMillis, + disableNotification, + protectContent, + toMessageId, + allowSendingWithoutReply + ) +} + +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + mediaFile: TelegramMediaFile, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) { + when (mediaFile) { + is AudioFile -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + audio = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is AnimationFile -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + animation = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is VoiceFile -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + voice = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is VideoFile -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + video = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is VideoNoteFile -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + videoNote = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is DocumentFile -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + document = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is Sticker -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + sticker = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is PhotoSize -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + photoSize = mediaFile, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + else -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + document = mediaFile.asDocumentFile(), + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + } +} + +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + content: TextedMediaContent, + text: String?, + parseMode: ParseMode? = null, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) { + when (content) { + is VoiceContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + voice = content.media, + text = text, + parseMode = parseMode, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is AudioMediaGroupContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + audio = content.media, + text = text, + parseMode = parseMode, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is PhotoContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + photoSize = content.media, + text = text, + parseMode = parseMode, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is VideoContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + video = content.media, + text = text, + parseMode = parseMode, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is AnimationContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + animation = content.media, + text = text, + parseMode = parseMode, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + else -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + document = content.media.asDocumentFile(), + text = text, + parseMode = parseMode, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + } +} + +suspend fun TelegramBot.reply( + toChatId: ChatId, + toMessageId: MessageId, + content: TextedMediaContent, + entities: List, + disableNotification: Boolean = false, + protectContent: Boolean = false, + allowSendingWithoutReply: Boolean? = null, + replyMarkup: KeyboardMarkup? = null +) { + when (content) { + is VoiceContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + voice = content.media, + entities = entities, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is AudioMediaGroupContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + audio = content.media, + entities = entities, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is PhotoContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + photoSize = content.media, + entities = entities, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is VideoContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + video = content.media, + entities = entities, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + is AnimationContent -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + animation = content.media, + entities = entities, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + else -> reply( + toChatId = toChatId, + toMessageId = toMessageId, + document = content.media.asDocumentFile(), + entities = entities, + disableNotification = disableNotification, + protectContent = protectContent, + allowSendingWithoutReply = allowSendingWithoutReply, + replyMarkup = replyMarkup + ) + } +} diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendContact.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendContact.kt index 605a6ad41e..edb36004eb 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendContact.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendContact.kt @@ -17,7 +17,7 @@ suspend fun TelegramBot.sendContact( lastName: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -35,7 +35,7 @@ suspend fun TelegramBot.sendContact( contact: Contact, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -55,7 +55,7 @@ suspend fun TelegramBot.sendContact( lastName: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact( @@ -71,7 +71,7 @@ suspend fun TelegramBot.sendContact( contact: Contact, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendDice.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendDice.kt index 1737e2ab80..90a2af25ec 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendDice.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendDice.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendDice import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.dice.DiceAnimationType @@ -17,7 +17,7 @@ suspend fun TelegramBot.sendDice( animationType: DiceAnimationType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -33,7 +33,7 @@ suspend fun TelegramBot.sendDice( animationType: DiceAnimationType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendDice(chat.id, animationType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendLiveLocation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendLiveLocation.kt index c96e676325..480c0577a4 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendLiveLocation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendLiveLocation.kt @@ -2,12 +2,10 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendLiveLocation -import dev.inmo.tgbotapi.requests.send.SendStaticLocation import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.location.Location -import dev.inmo.tgbotapi.types.location.StaticLocation /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -23,7 +21,7 @@ suspend fun TelegramBot.sendLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -56,7 +54,7 @@ suspend fun TelegramBot.sendLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation( @@ -88,7 +86,7 @@ suspend fun TelegramBot.sendLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation( @@ -119,7 +117,7 @@ suspend fun TelegramBot.sendLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation( @@ -151,7 +149,7 @@ suspend fun TelegramBot.sendLiveLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -169,7 +167,7 @@ suspend fun TelegramBot.sendLiveLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -188,7 +186,7 @@ suspend fun TelegramBot.sendLiveLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -206,7 +204,7 @@ suspend fun TelegramBot.sendLiveLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessage.kt index 3a3928c86f..94358003cd 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessage.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendTextMessage import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -20,7 +20,7 @@ suspend fun TelegramBot.sendMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -38,7 +38,7 @@ suspend fun TelegramBot.sendTextMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendMessage( @@ -56,7 +56,7 @@ suspend fun TelegramBot.sendMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -73,7 +73,7 @@ suspend fun TelegramBot.sendTextMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendTextMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -88,7 +88,7 @@ suspend fun TelegramBot.sendMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -105,7 +105,7 @@ suspend fun TelegramBot.sendTextMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendMessage( @@ -122,7 +122,7 @@ suspend fun TelegramBot.sendMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendMessage(chat.id, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -138,7 +138,7 @@ suspend fun TelegramBot.sendTextMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendTextMessage(chat.id, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendStaticLocation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendStaticLocation.kt index af941fbb0a..c493505d76 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendStaticLocation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendStaticLocation.kt @@ -3,11 +3,10 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendStaticLocation import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.location.Location -import dev.inmo.tgbotapi.types.location.StaticLocation /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -20,7 +19,7 @@ suspend fun TelegramBot.sendLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendStaticLocation( @@ -45,7 +44,7 @@ suspend fun TelegramBot.sendLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation( chatId, @@ -69,7 +68,7 @@ suspend fun TelegramBot.sendLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation( chat.id, @@ -92,7 +91,7 @@ suspend fun TelegramBot.sendLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation( chat.id, @@ -116,7 +115,7 @@ suspend fun TelegramBot.sendStaticLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chatId, latitude, longitude, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -130,7 +129,7 @@ suspend fun TelegramBot.sendStaticLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chatId, location.latitude, location.longitude, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -145,7 +144,7 @@ suspend fun TelegramBot.sendStaticLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chat.id, latitude, longitude, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -159,6 +158,6 @@ suspend fun TelegramBot.sendStaticLocation( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendLocation(chat.id, location.latitude, location.longitude, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendVenue.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendVenue.kt index b1cd5ac7ac..7a579887c3 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendVenue.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendVenue.kt @@ -24,7 +24,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -62,7 +62,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue( @@ -97,7 +97,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue( @@ -132,7 +132,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue( @@ -161,7 +161,7 @@ suspend fun TelegramBot.sendVenue( venue: Venue, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -185,7 +185,7 @@ suspend fun TelegramBot.sendVenue( venue: Venue, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt index e86de0ad78..9e6c32c47c 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt @@ -59,7 +59,7 @@ suspend fun TelegramBot.send( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chatId, animation, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -79,7 +79,7 @@ suspend fun TelegramBot.send( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chat, animation, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -98,7 +98,7 @@ suspend fun TelegramBot.send( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chatId, animation, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -117,7 +117,7 @@ suspend fun TelegramBot.send( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chat, animation, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -135,7 +135,7 @@ suspend fun TelegramBot.send( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chatId, audio, text, parseMode, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -153,7 +153,7 @@ suspend fun TelegramBot.send( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chat, audio, text, parseMode, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -170,7 +170,7 @@ suspend inline fun TelegramBot.send( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chatId, audio, entities, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -187,7 +187,7 @@ suspend inline fun TelegramBot.send( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chat, audio, entities, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -204,7 +204,7 @@ suspend fun TelegramBot.send( lastName: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact(chatId, phoneNumber, firstName, lastName, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -219,7 +219,7 @@ suspend fun TelegramBot.send( contact: Contact, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact(chatId, contact, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -236,7 +236,7 @@ suspend fun TelegramBot.send( lastName: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact(chat, phoneNumber, firstName, lastName, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -251,7 +251,7 @@ suspend fun TelegramBot.send( contact: Contact, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact(chat, contact, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -266,7 +266,7 @@ suspend fun TelegramBot.send( animationType: DiceAnimationType, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendDice(chatId, animationType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -281,7 +281,7 @@ suspend fun TelegramBot.send( animationType: DiceAnimationType, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendDice(chat, animationType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -298,7 +298,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -316,7 +316,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -333,7 +333,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -350,7 +350,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -366,7 +366,7 @@ suspend fun TelegramBot.send( game: Game, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame(chatId, game, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -381,7 +381,7 @@ suspend fun TelegramBot.send( game: Game, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame(chat, game, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -412,7 +412,7 @@ suspend fun TelegramBot.send( priceDependOnShipAddress: Boolean = false, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null ) = sendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -443,7 +443,7 @@ suspend fun TelegramBot.send( priceDependOnShipAddress: Boolean = false, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null ) = sendInvoice(user, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -460,7 +460,7 @@ suspend fun TelegramBot.send( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendStaticLocation(chatId, latitude, longitude, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -475,7 +475,7 @@ suspend fun TelegramBot.send( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendStaticLocation(chatId, location, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -491,7 +491,7 @@ suspend fun TelegramBot.send( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendStaticLocation(chat, latitude, longitude, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -506,7 +506,7 @@ suspend fun TelegramBot.send( disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, replyMarkup: KeyboardMarkup? = null ) = sendStaticLocation(chat, location, disableNotification, protectContent, allowSendingWithoutReply, replyToMessageId, replyMarkup) @@ -522,7 +522,7 @@ suspend fun TelegramBot.send( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -539,7 +539,7 @@ suspend fun TelegramBot.send( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendTextMessage(chat, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -555,7 +555,7 @@ suspend fun TelegramBot.send( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendTextMessage(chatId, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -571,7 +571,7 @@ suspend fun TelegramBot.send( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendTextMessage(chat, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -588,7 +588,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photo, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -605,7 +605,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat, photo, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -622,7 +622,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photoSize, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -639,7 +639,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat, photoSize, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -655,7 +655,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photo, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -671,7 +671,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat, photo, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -687,7 +687,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photoSize, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -703,7 +703,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat, photoSize, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -723,7 +723,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -744,7 +744,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll(chatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -764,7 +764,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll(chat, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -785,7 +785,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll(chat, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -807,7 +807,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -829,7 +829,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chat, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -852,7 +852,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( @@ -877,7 +877,7 @@ suspend fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -898,7 +898,7 @@ suspend inline fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -919,7 +919,7 @@ suspend inline fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chat, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -941,7 +941,7 @@ suspend inline fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -963,7 +963,7 @@ suspend inline fun TelegramBot.send( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll(chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -978,7 +978,7 @@ suspend fun TelegramBot.send( sticker: Sticker, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendSticker(chatId, sticker, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -993,7 +993,7 @@ suspend fun TelegramBot.send( sticker: Sticker, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendSticker(chat, sticker, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1015,7 +1015,7 @@ suspend fun TelegramBot.send( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue(chatId, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1037,7 +1037,7 @@ suspend fun TelegramBot.send( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue(chat, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1058,7 +1058,7 @@ suspend fun TelegramBot.send( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue(chatId, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1079,7 +1079,7 @@ suspend fun TelegramBot.send( googlePlaceType: GooglePlaceType? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue(chat, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1094,7 +1094,7 @@ suspend fun TelegramBot.send( venue: Venue, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue(chatId, venue, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1109,7 +1109,7 @@ suspend fun TelegramBot.send( venue: Venue, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVenue(chat, venue, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1126,7 +1126,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chatId, video, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1143,7 +1143,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chat, video, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1159,7 +1159,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chatId, video, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1175,7 +1175,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chat, video, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1190,7 +1190,7 @@ suspend fun TelegramBot.send( videoNote: VideoNoteFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideoNote(chatId, videoNote, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1205,7 +1205,7 @@ suspend fun TelegramBot.send( videoNote: VideoNoteFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideoNote(chat, videoNote, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1222,7 +1222,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chatId, voice, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1239,7 +1239,7 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chat, voice, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1255,7 +1255,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chatId, voice, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1271,7 +1271,7 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chat, voice, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -1286,7 +1286,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1300,7 +1300,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1314,7 +1314,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1328,7 +1328,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1341,7 +1341,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1354,7 +1354,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1367,7 +1367,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1380,7 +1380,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1393,7 +1393,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1406,7 +1406,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1419,7 +1419,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1432,7 +1432,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1445,7 +1445,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1458,7 +1458,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1471,7 +1471,7 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -1484,6 +1484,6 @@ suspend fun TelegramBot.send( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup(chat, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/games/SendGame.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/games/SendGame.kt index fda0df535c..f5067ebc9d 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/games/SendGame.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/games/SendGame.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send.games import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.games.SendGame import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.games.Game @@ -17,7 +17,7 @@ suspend fun TelegramBot.sendGame( gameShortName: String, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -35,7 +35,7 @@ suspend fun TelegramBot.sendGame( gameShortName: String, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( @@ -51,7 +51,7 @@ suspend fun TelegramBot.sendGame( game: Game, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( @@ -67,7 +67,7 @@ suspend fun TelegramBot.sendGame( game: Game, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAnimation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAnimation.kt index 0bc2c3b48a..82db42d558 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAnimation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAnimation.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendAnimation import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -26,7 +26,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -61,7 +61,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation( @@ -83,7 +83,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chat.id, animation, thumb, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -102,7 +102,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chat.id, animation, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -122,7 +122,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -155,7 +155,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation( @@ -176,7 +176,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chat.id, animation, thumb, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -194,7 +194,7 @@ suspend fun TelegramBot.sendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation(chat.id, animation, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAudio.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAudio.kt index 28facbc7ed..bf8cb7da53 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAudio.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendAudio.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendAudio import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -26,7 +26,7 @@ suspend fun TelegramBot.sendAudio( title: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -62,7 +62,7 @@ suspend fun TelegramBot.sendAudio( title: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -79,7 +79,7 @@ suspend fun TelegramBot.sendAudio( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, text, parseMode, audio.duration, audio.performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -96,7 +96,7 @@ suspend fun TelegramBot.sendAudio( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chat.id, audio, text, parseMode, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -116,7 +116,7 @@ suspend inline fun TelegramBot.sendAudio( title: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -150,7 +150,7 @@ suspend inline fun TelegramBot.sendAudio( title: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -166,7 +166,7 @@ suspend inline fun TelegramBot.sendAudio( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, entities, audio.duration, audio.performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -182,7 +182,7 @@ suspend inline fun TelegramBot.sendAudio( title: String? = audio.title, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendAudio(chat.id, audio, entities, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendDocument.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendDocument.kt index e1c78ae56a..c62b3cc3bc 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendDocument.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendDocument.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendDocument import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -23,7 +23,7 @@ suspend fun TelegramBot.sendDocument( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -55,7 +55,7 @@ suspend fun TelegramBot.sendDocument( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -72,7 +72,7 @@ suspend fun TelegramBot.sendDocument( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -91,7 +91,7 @@ suspend fun TelegramBot.sendDocument( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -108,7 +108,7 @@ suspend inline fun TelegramBot.sendDocument( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -138,7 +138,7 @@ suspend inline fun TelegramBot.sendDocument( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -154,7 +154,7 @@ suspend inline fun TelegramBot.sendDocument( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -172,7 +172,7 @@ suspend inline fun TelegramBot.sendDocument( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendMediaGroup.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendMediaGroup.kt index 5209c88cb4..70392452d5 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendMediaGroup.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendMediaGroup.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.media.* import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.* -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.content.MediaGroupContent import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent @@ -22,7 +22,7 @@ suspend fun TelegramBot.sendMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = execute( SendMediaGroup( @@ -39,7 +39,7 @@ suspend fun TelegramBot.sendMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -55,7 +55,7 @@ suspend fun TelegramBot.sendMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -71,7 +71,7 @@ suspend fun TelegramBot.sendMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendMediaGroup( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -85,7 +85,7 @@ suspend fun TelegramBot.sendPlaylist( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = execute( SendPlaylist( @@ -101,7 +101,7 @@ suspend fun TelegramBot.sendPlaylist( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -116,7 +116,7 @@ suspend fun TelegramBot.sendPlaylist( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -131,7 +131,7 @@ suspend fun TelegramBot.sendPlaylist( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendPlaylist( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -145,7 +145,7 @@ suspend fun TelegramBot.sendDocumentsGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = execute( SendDocumentsGroup( @@ -161,7 +161,7 @@ suspend fun TelegramBot.sendDocumentsGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -176,7 +176,7 @@ suspend fun TelegramBot.sendDocumentsGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -191,7 +191,7 @@ suspend fun TelegramBot.sendDocumentsGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendDocumentsGroup( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -205,7 +205,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = execute( SendVisualMediaGroup( @@ -221,7 +221,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -236,7 +236,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply @@ -251,7 +251,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = sendVisualMediaGroup( chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPhoto.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPhoto.kt index 0d54ec144e..69ab1135c7 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPhoto.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPhoto.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendPhoto import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -22,7 +22,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -50,7 +50,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat.id, fileId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -66,7 +66,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -82,7 +82,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat.id, photo, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -98,7 +98,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photoSize.fileId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -114,7 +114,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat.id, photoSize, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -130,7 +130,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -156,7 +156,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat.id, fileId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -171,7 +171,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -186,7 +186,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat.id, photo, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -201,7 +201,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chatId, photoSize.fileId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -216,7 +216,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendPhoto(chat.id, photoSize, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendSticker.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendSticker.kt index 6fb77a60aa..1b0e559d04 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendSticker.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendSticker.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendSticker import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.Sticker @@ -18,7 +18,7 @@ suspend fun TelegramBot.sendSticker( sticker: InputFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -34,7 +34,7 @@ suspend fun TelegramBot.sendSticker( sticker: InputFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendSticker(chat.id, sticker, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -48,7 +48,7 @@ suspend fun TelegramBot.sendSticker( sticker: Sticker, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendSticker(chatId, sticker.fileId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -62,7 +62,7 @@ suspend fun TelegramBot.sendSticker( sticker: Sticker, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendSticker(chat, sticker.fileId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideo.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideo.kt index a3c7df86d3..4b195e6434 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideo.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideo.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendVideo import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -26,7 +26,7 @@ suspend fun TelegramBot.sendVideo( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -59,7 +59,7 @@ suspend fun TelegramBot.sendVideo( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chatId, video.fileId, video.thumb ?.fileId, text, parseMode, video.duration, video.width, video.height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -79,7 +79,7 @@ suspend fun TelegramBot.sendVideo( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chat.id, video, thumb, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -96,7 +96,7 @@ suspend fun TelegramBot.sendVideo( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chat.id, video, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -115,7 +115,7 @@ suspend inline fun TelegramBot.sendVideo( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -146,7 +146,7 @@ suspend inline fun TelegramBot.sendVideo( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chatId, video.fileId, video.thumb ?.fileId, entities, video.duration, video.width, video.height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -165,7 +165,7 @@ suspend inline fun TelegramBot.sendVideo( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chat.id, video, thumb, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -181,7 +181,7 @@ suspend inline fun TelegramBot.sendVideo( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideo(chat.id, video, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideoNote.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideoNote.kt index 771e230af5..e2a46147a4 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideoNote.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVideoNote.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendVideoNote import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.VideoNoteFile @@ -21,7 +21,7 @@ suspend fun TelegramBot.sendVideoNote( size: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -48,7 +48,7 @@ suspend fun TelegramBot.sendVideoNote( videoNote: VideoNoteFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideoNote( @@ -67,7 +67,7 @@ suspend fun TelegramBot.sendVideoNote( size: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideoNote(chat.id, videoNote, thumb, duration, size, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -81,7 +81,7 @@ suspend fun TelegramBot.sendVideoNote( videoNote: VideoNoteFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideoNote(chat.id, videoNote, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVoice.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVoice.kt index b8c1eae219..4244ed33e3 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVoice.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendVoice.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendVoice import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -23,7 +23,7 @@ suspend fun TelegramBot.sendVoice( duration: Long? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -53,7 +53,7 @@ suspend fun TelegramBot.sendVoice( duration: Long? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chat.id, voice, text, parseMode, duration, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -69,7 +69,7 @@ suspend fun TelegramBot.sendVoice( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice( @@ -87,7 +87,7 @@ suspend fun TelegramBot.sendVoice( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chat.id, voice, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -104,7 +104,7 @@ suspend inline fun TelegramBot.sendVoice( duration: Long? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -132,7 +132,7 @@ suspend inline fun TelegramBot.sendVoice( duration: Long? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chat.id, voice, entities, duration, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -147,7 +147,7 @@ suspend inline fun TelegramBot.sendVoice( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice( @@ -163,7 +163,7 @@ suspend inline fun TelegramBot.sendVoice( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice(chat.id, voice, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt index 082cb0b9ec..ebd388e6a2 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt @@ -33,7 +33,7 @@ suspend fun TelegramBot.sendInvoice( priceDependOnShipAddress: Boolean = false, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null ) = execute( @@ -65,7 +65,7 @@ suspend fun TelegramBot.sendInvoice( priceDependOnShipAddress: Boolean = false, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null ) = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendPoll.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendPoll.kt index a0ccbb6df9..c3c6454e70 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendPoll.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendPoll.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.polls.SendQuizPoll import dev.inmo.tgbotapi.requests.send.polls.SendRegularPoll import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -25,7 +25,7 @@ suspend fun TelegramBot.sendRegularPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -48,7 +48,7 @@ suspend fun TelegramBot.sendRegularPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -67,7 +67,7 @@ suspend fun TelegramBot.sendRegularPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll( @@ -89,7 +89,7 @@ suspend fun TelegramBot.sendRegularPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll( @@ -113,7 +113,7 @@ suspend fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -138,7 +138,7 @@ suspend fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( @@ -162,7 +162,7 @@ suspend fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( @@ -186,7 +186,7 @@ suspend fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( @@ -209,7 +209,7 @@ suspend inline fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = execute( @@ -233,7 +233,7 @@ suspend inline fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( @@ -256,7 +256,7 @@ suspend inline fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( @@ -279,7 +279,7 @@ suspend inline fun TelegramBot.sendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/MessageAction.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/MessageAction.kt index 1b1c37bfd4..16ac3bd26e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/MessageAction.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/MessageAction.kt @@ -1,7 +1,7 @@ package dev.inmo.tgbotapi.abstracts.types -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId interface MessageAction: ChatRequest { - val messageId: MessageIdentifier + val messageId: MessageId } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/ReplyMessageId.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/ReplyMessageId.kt index 3db8ae697f..6a076122e1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/ReplyMessageId.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/abstracts/types/ReplyMessageId.kt @@ -1,8 +1,8 @@ package dev.inmo.tgbotapi.abstracts.types -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId interface ReplyMessageId { - val replyToMessageId: MessageIdentifier? + val replyToMessageId: MessageId? val allowSendingWithoutReply: Boolean? } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/DeleteMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/DeleteMessage.kt index 27fdefa014..d83bcb3f2f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/DeleteMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/DeleteMessage.kt @@ -11,7 +11,7 @@ data class DeleteMessage( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier + override val messageId: MessageId ) : SimpleRequest, MessageAction { override fun method(): String = "deleteMessage" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/ForwardMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/ForwardMessage.kt index d37ef48d8d..493f510c08 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/ForwardMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/ForwardMessage.kt @@ -17,7 +17,7 @@ data class ForwardMessage( @SerialName(chatIdField) val toChatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(disableNotificationField) val disableNotification: Boolean = false, @SerialName(protectContentField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/StopPoll.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/StopPoll.kt index 5705ec13e9..392c34c90e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/StopPoll.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/StopPoll.kt @@ -14,7 +14,7 @@ data class StopPoll( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(replyMarkupField) override val replyMarkup: InlineKeyboardMarkup? = null ) : MessageAction, SimpleRequest, WithReplyMarkup { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/PinChatMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/PinChatMessage.kt index dea1b838f8..cc01d6dcc9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/PinChatMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/PinChatMessage.kt @@ -16,7 +16,7 @@ data class PinChatMessage ( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(disableNotificationField) override val disableNotification: Boolean = false ): ChatRequest, SimpleRequest, MessageAction, DisableNotification { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage.kt index 1d6bf294ed..b191a2a3d7 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage.kt @@ -11,7 +11,7 @@ data class UnpinChatMessage( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - val messageId: MessageIdentifier? = null + val messageId: MessageId? = null ): ChatRequest, SimpleRequest { override fun method(): String = "unpinChatMessage" override val resultDeserializer: DeserializationStrategy diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/caption/EditChatMessageCaption.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/caption/EditChatMessageCaption.kt index 4d325e94e1..13fae9e209 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/caption/EditChatMessageCaption.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/caption/EditChatMessageCaption.kt @@ -19,7 +19,7 @@ const val editMessageCaptionMethod = "editMessageCaption" fun EditChatMessageCaption( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String, parseMode: ParseMode? = null, replyMarkup: InlineKeyboardMarkup? = null @@ -34,7 +34,7 @@ fun EditChatMessageCaption( fun EditChatMessageCaption( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, replyMarkup: InlineKeyboardMarkup? = null ) = EditChatMessageCaption( @@ -51,7 +51,7 @@ data class EditChatMessageCaption internal constructor( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(captionField) override val text: String, @SerialName(parseModeField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/EditChatMessageLiveLocation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/EditChatMessageLiveLocation.kt index ab7882ff46..1578dfa51e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/EditChatMessageLiveLocation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/EditChatMessageLiveLocation.kt @@ -17,7 +17,7 @@ data class EditChatMessageLiveLocation( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(latitudeField) override val latitude: Double, @SerialName(longitudeField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/StopChatMessageLiveLocation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/StopChatMessageLiveLocation.kt index 44374667a9..eade646a86 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/StopChatMessageLiveLocation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/location/live/StopChatMessageLiveLocation.kt @@ -17,7 +17,7 @@ data class StopChatMessageLiveLocation( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(replyMarkupField) override val replyMarkup: InlineKeyboardMarkup? = null ) : EditChatMessage, EditReplyMessage { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/media/EditChatMessageMedia.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/media/EditChatMessageMedia.kt index 88d064398e..e1ccf1cf81 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/media/EditChatMessageMedia.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/media/EditChatMessageMedia.kt @@ -19,7 +19,7 @@ data class EditChatMessageMedia( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(mediaField) override val media: TelegramMedia, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/reply_markup/EditChatMessageReplyMarkup.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/reply_markup/EditChatMessageReplyMarkup.kt index dad74a250c..267dcd8488 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/reply_markup/EditChatMessageReplyMarkup.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/reply_markup/EditChatMessageReplyMarkup.kt @@ -18,7 +18,7 @@ data class EditChatMessageReplyMarkup( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(replyMarkupField) override val replyMarkup: InlineKeyboardMarkup? = null ) : EditChatMessage, EditReplyMessage { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/text/EditChatMessageText.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/text/EditChatMessageText.kt index cd071917a4..b7b9200742 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/text/EditChatMessageText.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/edit/text/EditChatMessageText.kt @@ -19,7 +19,7 @@ const val editMessageTextMethod = "editMessageText" fun EditChatMessageText( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String, parseMode: ParseMode? = null, disableWebPagePreview: Boolean? = null, @@ -36,7 +36,7 @@ fun EditChatMessageText( fun EditChatMessageText( chatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: TextSourcesList, disableWebPagePreview: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null @@ -55,7 +55,7 @@ data class EditChatMessageText internal constructor( @SerialName(chatIdField) override val chatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(textField) override val text: String, @SerialName(parseModeField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/GetGameHighScoresByChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/GetGameHighScoresByChat.kt index 3bf9cd2be0..1f751a54f2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/GetGameHighScoresByChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/GetGameHighScoresByChat.kt @@ -12,7 +12,7 @@ data class GetGameHighScoresByChat ( @SerialName(chatIdField) override val chatId: ChatId, @SerialName(messageIdField) - override val messageId: MessageIdentifier + override val messageId: MessageId ) : GetGameHighScores, MessageAction { override val requestSerializer: SerializationStrategy<*> get() = serializer() diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/SetGameScoreByChatId.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/SetGameScoreByChatId.kt index 90a2f3c314..3b1b92155c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/SetGameScoreByChatId.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/games/SetGameScoreByChatId.kt @@ -14,7 +14,7 @@ data class SetGameScoreByChatId ( @SerialName(chatIdField) override val chatId: ChatId, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(forceField) override val force: Boolean = false, @SerialName(disableEditMessageField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt index a2bb4ad842..e6f542eb6e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt @@ -23,12 +23,12 @@ const val OrderChangingDeprecationWarn = "The order of parameters in this factor fun CopyMessage( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = CopyMessage( @@ -48,11 +48,11 @@ fun CopyMessage( fun CopyMessage( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, entities: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = CopyMessage( @@ -71,13 +71,13 @@ fun CopyMessage( fun CopyMessage( fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, toChatId: ChatIdentifier, text: String? = null, parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = CopyMessage( @@ -96,12 +96,12 @@ fun CopyMessage( fun CopyMessage( fromChatId: ChatIdentifier, - messageId: MessageIdentifier, + messageId: MessageId, toChatId: ChatIdentifier, entities: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = CopyMessage( @@ -125,7 +125,7 @@ data class CopyMessage internal constructor( @SerialName(fromChatIdField) val fromChatId: ChatIdentifier, @SerialName(messageIdField) - override val messageId: MessageIdentifier, + override val messageId: MessageId, @SerialName(captionField) override val text: String? = null, @SerialName(parseModeField) @@ -137,13 +137,13 @@ data class CopyMessage internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -): SimpleRequest, - ReplyingMarkupSendMessageRequest, +): SimpleRequest, + ReplyingMarkupSendMessageRequest, MessageAction, TextedOutput, ProtectContent { @@ -155,7 +155,7 @@ data class CopyMessage internal constructor( override fun method(): String = "copyMessage" - override val resultDeserializer: DeserializationStrategy + override val resultDeserializer: DeserializationStrategy get() = MessageIdSerializer override val requestSerializer: SerializationStrategy<*> get() = serializer() diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt index ab14401ef2..2bef286363 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt @@ -27,7 +27,7 @@ data class SendContact( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) @@ -40,7 +40,7 @@ data class SendContact( contact: Contact, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): this( @@ -66,7 +66,7 @@ fun Contact.toRequest( chatId: ChatIdentifier, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): SendContact = SendContact( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendDice.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendDice.kt index 90a83c4b33..685a024be0 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendDice.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendDice.kt @@ -25,7 +25,7 @@ data class SendDice( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt index a4ca5d9b0d..193711c98f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt @@ -20,7 +20,7 @@ fun SendLocation( longitude: Double, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendLocation( @@ -44,7 +44,7 @@ fun SendStaticLocation( longitude: Double, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendLocation(chatId, latitude, longitude, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup) @@ -59,7 +59,7 @@ fun SendLiveLocation( proximityAlertRadius: Meters? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendLocation( @@ -98,7 +98,7 @@ data class SendLocation internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt index 5389a8e315..d702726186 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt @@ -27,7 +27,7 @@ fun SendTextMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendTextMessage( @@ -49,7 +49,7 @@ fun SendTextMessage( disableWebPagePreview: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendTextMessage( @@ -82,7 +82,7 @@ data class SendTextMessage internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt index b1d91c9de8..2df4e80018 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt @@ -37,7 +37,7 @@ data class SendVenue( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) @@ -52,7 +52,7 @@ data class SendVenue( venue: Venue, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): this( @@ -83,7 +83,7 @@ fun Venue.toRequest( chatId: ChatIdentifier, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): SendVenue = SendVenue( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt index 086b69edbf..0bec6ea1e2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt @@ -23,7 +23,7 @@ data class SendGame ( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt index d666e09f54..f9ceb727f5 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt @@ -30,7 +30,7 @@ fun SendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -76,7 +76,7 @@ fun SendAnimation( height: Int? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -140,7 +140,7 @@ data class SendAnimationData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt index 6ece6a5cc1..3b438608af 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt @@ -31,7 +31,7 @@ fun SendAudio( title: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -77,7 +77,7 @@ fun SendAudio( title: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -141,7 +141,7 @@ data class SendAudioData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt index ce28df1da5..8960ac5bb4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt @@ -36,7 +36,7 @@ fun SendDocument( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -87,7 +87,7 @@ fun SendDocument( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null @@ -153,7 +153,7 @@ data class SendDocumentData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt index 9c747c9972..c19ff31c0f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt @@ -26,7 +26,7 @@ fun SendMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ): Request>> { if (media.size !in mediaCountInMediaGroup) { @@ -74,7 +74,7 @@ inline fun SendPlaylist( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = SendMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -89,7 +89,7 @@ inline fun SendDocumentsGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = SendMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -105,7 +105,7 @@ inline fun SendVisualMediaGroup( media: List, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null ) = SendMediaGroup(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply) @@ -122,7 +122,7 @@ data class SendMediaGroupData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null ) : DataRequest>>, SendMessageRequest>> { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt index 95fcbaa175..3c99d91311 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt @@ -25,7 +25,7 @@ fun SendPhoto( parseMode: ParseMode? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -55,7 +55,7 @@ fun SendPhoto( entities: TextSourcesList, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -99,7 +99,7 @@ data class SendPhotoData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt index 440979d10c..44ed930193 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt @@ -17,7 +17,7 @@ fun SendSticker( sticker: InputFile, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> = SendStickerByFileId( @@ -49,7 +49,7 @@ data class SendStickerByFileId internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt index 16b65d7e2f..88c0a12655 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt @@ -31,7 +31,7 @@ fun SendVideo( supportStreaming: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -79,7 +79,7 @@ fun SendVideo( supportStreaming: Boolean? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -146,7 +146,7 @@ data class SendVideoData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt index 30a5bbce40..5e69d17ecf 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt @@ -19,7 +19,7 @@ fun SendVideoNote( size: Int? = null, // in documentation - length (size of video side) disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -71,7 +71,7 @@ data class SendVideoNoteData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt index 9c816ea4f7..216d854594 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt @@ -27,7 +27,7 @@ fun SendVoice( duration: Long? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -65,7 +65,7 @@ fun SendVoice( duration: Long? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request> { @@ -118,7 +118,7 @@ data class SendVoiceData internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt index 0a51fafe4c..aace9e8806 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt @@ -63,7 +63,7 @@ data class SendInvoice( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt index 0471509f89..dd9d3a1e31 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt @@ -50,7 +50,7 @@ fun SendPoll( isClosed: Boolean = false, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendRegularPoll( @@ -73,7 +73,7 @@ fun Poll.createRequest( chatId: ChatIdentifier, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = when (this) { @@ -198,7 +198,7 @@ data class SendRegularPoll( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) @@ -224,7 +224,7 @@ fun SendRegularPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendRegularPoll( @@ -255,7 +255,7 @@ fun SendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendQuizPoll( @@ -287,7 +287,7 @@ fun SendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendQuizPoll( @@ -321,7 +321,7 @@ internal fun SendQuizPoll( closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = SendQuizPoll( @@ -372,7 +372,7 @@ data class SendQuizPoll internal constructor( @SerialName(protectContentField) override val protectContent: Boolean = false, @SerialName(replyToMessageIdField) - override val replyToMessageId: MessageIdentifier? = null, + override val replyToMessageId: MessageId? = null, @SerialName(allowSendingWithoutReplyField) override val allowSendingWithoutReply: Boolean? = null, @SerialName(replyMarkupField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 4d4c2583a1..70f9e1f47b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -10,7 +10,8 @@ import kotlinx.serialization.encoding.Encoder import kotlin.jvm.JvmInline typealias Identifier = Long -typealias MessageIdentifier = Long +typealias MessageId = Long +typealias MessageIdentifier = MessageId typealias InlineQueryIdentifier = String typealias UpdateIdentifier = Long typealias MediaGroupIdentifier = String diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageId.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageId.kt index d8c73228f7..6673ffae87 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageId.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageId.kt @@ -6,12 +6,12 @@ import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.json.* -object MessageIdSerializer : KSerializer { +object MessageIdSerializer : KSerializer { override val descriptor: SerialDescriptor = JsonObject.serializer().descriptor - override fun deserialize(decoder: Decoder): MessageIdentifier = JsonObject.serializer().deserialize(decoder)[messageIdField]!!.jsonPrimitive.long + override fun deserialize(decoder: Decoder): MessageId = JsonObject.serializer().deserialize(decoder)[messageIdField]!!.jsonPrimitive.long - override fun serialize(encoder: Encoder, value: MessageIdentifier) { + override fun serialize(encoder: Encoder, value: MessageId) { JsonObject.serializer().serialize( encoder, JsonObject( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt index 4d4b8ad287..a9ff456ec5 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt @@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.* import dev.inmo.tgbotapi.types.message.content.MessageContent data class ChannelContentMessageImpl( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val chat: ChannelChat, override val content: T, override val date: DateTime, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelEventMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelEventMessage.kt index 38b9c1e0b4..a75fd71b10 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelEventMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelEventMessage.kt @@ -1,13 +1,13 @@ package dev.inmo.tgbotapi.types.message import com.soywiz.klock.DateTime -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.ChannelChat import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage data class ChannelEventMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val chat: ChannelChat, override val chatEvent: T, override val date: DateTime diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMediaGroupMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMediaGroupMessage.kt index e47b55a722..859e4415b3 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMediaGroupMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMediaGroupMessage.kt @@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.message import com.soywiz.klock.DateTime import dev.inmo.tgbotapi.types.MediaGroupIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage @@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.content.MediaGroupContent data class ChannelMediaGroupMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val chat: Chat, override val date: DateTime, override val mediaGroupId: MediaGroupIdentifier, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt index cc88cdbd32..0deaf11f64 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt @@ -1,14 +1,14 @@ package dev.inmo.tgbotapi.types.message import com.soywiz.klock.DateTime -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.GroupChat import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent import dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage data class CommonGroupEventMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val from: User, override val chat: GroupChat, override val chatEvent: T, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonMediaGroupMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonMediaGroupMessage.kt index 06a11f9f67..ea544158d6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonMediaGroupMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonMediaGroupMessage.kt @@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.* import dev.inmo.tgbotapi.types.message.content.MediaGroupContent data class CommonMediaGroupMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val from: User, override val chat: Chat, override val date: DateTime, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt index ec8183c225..135d445cbd 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt @@ -1,14 +1,14 @@ package dev.inmo.tgbotapi.types.message import com.soywiz.klock.DateTime -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.SupergroupChat import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent import dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage data class CommonSupergroupEventMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val from: User, override val chat: SupergroupChat, override val chatEvent: T, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt index e4ebf1a5d7..16eb920f55 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt @@ -40,7 +40,7 @@ sealed interface ForwardInfo { */ data class FromChannel( override val dateOfOriginal: TelegramDate, - val messageId: MessageIdentifier, + val messageId: MessageId, val channelChat: ChannelChat, val signature: String? = null ) : PublicChat { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt index d819f53a2a..18b98428e4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt @@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent data class ConnectedFromChannelGroupContentMessageImpl( override val chat: GroupChat, override val channel: ChannelChat, - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val date: DateTime, override val forwardInfo: ForwardInfo?, override val editDate: DateTime?, @@ -27,7 +27,7 @@ data class ConnectedFromChannelGroupContentMessageImpl( data class UnconnectedFromChannelGroupContentMessageImpl( override val chat: GroupChat, override val channel: ChannelChat, - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val date: DateTime, override val forwardInfo: ForwardInfo?, override val editDate: DateTime?, @@ -41,7 +41,7 @@ data class UnconnectedFromChannelGroupContentMessageImpl( data class AnonymousGroupContentMessageImpl( override val chat: GroupChat, - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val date: DateTime, override val forwardInfo: ForwardInfo?, override val editDate: DateTime?, @@ -55,7 +55,7 @@ data class AnonymousGroupContentMessageImpl( data class CommonGroupContentMessageImpl( override val chat: GroupChat, - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val from: User, override val date: DateTime, override val forwardInfo: ForwardInfo?, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PassportMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PassportMessage.kt index d9413f3e5d..3baf9615a9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PassportMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PassportMessage.kt @@ -1,7 +1,7 @@ package dev.inmo.tgbotapi.types.message import com.soywiz.klock.DateTime -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage @@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.passport.PassportData data class PassportMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val chat: Chat, override val from: User, override val date: DateTime, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt index bedcbb32ab..300b2afc3f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt @@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage import dev.inmo.tgbotapi.types.message.content.MessageContent data class PrivateContentMessageImpl( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val from: User, override val chat: Chat, override val content: T, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateEventMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateEventMessage.kt index 46e30d2b93..0e9cdaebb1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateEventMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateEventMessage.kt @@ -1,13 +1,13 @@ package dev.inmo.tgbotapi.types.message import com.soywiz.klock.DateTime -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.PrivateChat import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateEvent import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage data class PrivateEventMessage( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val chat: PrivateChat, override val chatEvent: T, override val date: DateTime diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt index 2af80360d3..459c45ca2e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt @@ -31,14 +31,14 @@ import kotlin.reflect.KClass @Serializable internal data class RawMessage( @SerialName(messageIdField) - val messageId: MessageIdentifier, + val messageId: MessageId, val date: TelegramDate, private val chat: Chat, private val from: User? = null, private val sender_chat: PublicChat? = null, private val forward_from: User? = null, private val forward_from_chat: Chat? = null, - private val forward_from_message_id: MessageIdentifier? = null, + private val forward_from_message_id: MessageId? = null, private val forward_signature: ForwardSignature? = null, private val forward_sender_name: ForwardSenderName? = null, private val forward_date: TelegramDate? = null, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt index c120355445..e9593c2da4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt @@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.message.abstracts import com.soywiz.klock.DateTime import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.RawMessage import kotlinx.serialization.* @@ -12,13 +12,13 @@ import kotlinx.serialization.encoding.Encoder @ClassCastsIncluded interface Message { - val messageId: MessageIdentifier + val messageId: MessageId val chat: Chat val date: DateTime } data class UnknownMessageType( - override val messageId: MessageIdentifier, + override val messageId: MessageId, override val chat: Chat, override val date: DateTime, val insideException: Exception diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt index d958b200a2..c1cc0c0a44 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Abstracts.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.TelegramMediaFile import dev.inmo.tgbotapi.types.media.TelegramMedia @@ -115,7 +115,7 @@ sealed interface ResendableContent { chatId: ChatIdentifier, disableNotification: Boolean = false, protectContent: Boolean = false, - replyToMessageId: MessageIdentifier? = null, + replyToMessageId: MessageId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ): Request diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AnimationContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AnimationContent.kt index 3ad0a1acfb..1c072ed5c5 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AnimationContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AnimationContent.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.media.SendAnimation import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.AnimationFile import dev.inmo.tgbotapi.types.files.DocumentFile @@ -23,7 +23,7 @@ data class AnimationContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendAnimation( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AudioContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AudioContent.kt index c9563da27b..27498e173f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AudioContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/AudioContent.kt @@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaAudio import dev.inmo.tgbotapi.types.media.toTelegramMediaAudio import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.AudioFile import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -22,7 +22,7 @@ data class AudioContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendAudio( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/ContactContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/ContactContent.kt index a417dc5a5a..78dab7b864 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/ContactContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/ContactContent.kt @@ -15,7 +15,7 @@ data class ContactContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendContact( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DiceContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DiceContent.kt index 9c6eb7401d..11ae6056aa 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DiceContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DiceContent.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.SendDice import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.dice.Dice import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -17,7 +17,7 @@ data class DiceContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendDice( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DocumentContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DocumentContent.kt index bbf262736c..56c82a6028 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DocumentContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/DocumentContent.kt @@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaDocument import dev.inmo.tgbotapi.types.media.toTelegramMediaDocument import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.DocumentFile import dev.inmo.tgbotapi.types.files.asDocumentFile @@ -24,7 +24,7 @@ data class DocumentContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendDocument( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GameContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GameContent.kt index 14a0c3f006..d6eb18d9e4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GameContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GameContent.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.games.SendGame import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.games.Game import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -17,7 +17,7 @@ data class GameContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendGame( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/InvoiceContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/InvoiceContent.kt index fa835c9caf..bd95f7ad2c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/InvoiceContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/InvoiceContent.kt @@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.payments.Invoice @@ -16,7 +16,7 @@ data class InvoiceContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/LocationContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/LocationContent.kt index d468e3f36c..044d1490b1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/LocationContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/LocationContent.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.SendLiveLocation import dev.inmo.tgbotapi.requests.send.SendStaticLocation import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.location.* import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -101,7 +101,7 @@ data class LiveLocationContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendLiveLocation( @@ -132,7 +132,7 @@ data class StaticLocationContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendStaticLocation( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PhotoContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PhotoContent.kt index 6f43c2adaf..2d134a3c61 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PhotoContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PhotoContent.kt @@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto import dev.inmo.tgbotapi.types.media.toTelegramMediaPhoto import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.* import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -24,7 +24,7 @@ data class PhotoContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendPhoto( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PollContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PollContent.kt index b4d15de5cc..baca120c88 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PollContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/PollContent.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.polls.createRequest import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.polls.Poll @@ -17,7 +17,7 @@ data class PollContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = poll.createRequest( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StickerContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StickerContent.kt index 5ad1c94960..2e2d2adac8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StickerContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StickerContent.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.media.SendSticker import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaDocument -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -18,7 +18,7 @@ data class StickerContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendSticker( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt index e7bc5a7170..a4a00d05c8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.SendTextMessage import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import kotlinx.serialization.Serializable @@ -19,7 +19,7 @@ data class TextContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendTextMessage( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VenueContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VenueContent.kt index 109fbe8096..b16687bcdc 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VenueContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VenueContent.kt @@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.SendVenue import dev.inmo.tgbotapi.types.ChatIdentifier -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.venue.Venue @@ -17,7 +17,7 @@ data class VenueContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendVenue( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoContent.kt index d8b842df8b..ef160c455f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoContent.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.media.SendVideo import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaVideo import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.VideoFile import dev.inmo.tgbotapi.types.files.toTelegramMediaVideo @@ -22,7 +22,7 @@ data class VideoContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendVideo( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoNoteContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoNoteContent.kt index 7d7ab64526..e81a39031b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoNoteContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VideoNoteContent.kt @@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.media.SendVideoNote import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaVideo -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.VideoNoteFile import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -18,7 +18,7 @@ data class VideoNoteContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendVideoNote( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VoiceContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VoiceContent.kt index 01a66539b3..1c90b02e14 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VoiceContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/VoiceContent.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.requests.send.media.SendVoice import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.media.TelegramMediaAudio import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.MessageIdentifier +import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.VoiceFile import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -21,7 +21,7 @@ data class VoiceContent( chatId: ChatIdentifier, disableNotification: Boolean, protectContent: Boolean, - replyToMessageId: MessageIdentifier?, + replyToMessageId: MessageId?, allowSendingWithoutReply: Boolean?, replyMarkup: KeyboardMarkup? ): Request> = SendVoice( diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/raw/Message.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/raw/Message.kt index 018eaca4dc..f2885049cf 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/raw/Message.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/raw/Message.kt @@ -34,7 +34,7 @@ inline val Message.forward_from: User? inline val Message.forward_from_chat: Chat? get() = asPossiblyForwardedMessage() ?.forwardInfo ?.asForwardFromPublicChatInfo() ?.chat @RiskFeature(RawFieldsUsageWarning) -inline val Message.forward_from_message_id: MessageIdentifier? +inline val Message.forward_from_message_id: MessageId? get() = asPossiblyForwardedMessage() ?.forwardInfo ?.asForwardFromChannelInfo() ?.messageId @RiskFeature(RawFieldsUsageWarning) inline val Message.forward_signature: ForwardSignature? diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt index 3e16e1f192..7ea69b1134 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt @@ -26,15 +26,15 @@ inline fun makeTelegramStartattach(username: Username, data: String? = null) = m fun makeLinkToMessage( username: String, - messageId: MessageIdentifier + messageId: MessageId ): String = "$internalLinkBeginning/$username/$messageId" fun makeLinkToMessage( username: Username, - messageId: MessageIdentifier + messageId: MessageId ): String = makeLinkToMessage(username.username, messageId) fun makeLinkToMessage( chat: UsernameChat, - messageId: MessageIdentifier + messageId: MessageId ): String? = chat.username ?.let { makeLinkToMessage(it, messageId) } private val linkIdRedundantPartRegex = Regex("^-100") @@ -46,7 +46,7 @@ private val usernameBeginSymbolRegex = Regex("^@") */ fun makeLinkToMessage( chat: Chat, - messageId: MessageIdentifier + messageId: MessageId ): String? { return when { chat is UsernameChat && chat.username != null -> { diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/MediaGroupsShortcuts.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/MediaGroupsShortcuts.kt index 301d38e3e1..f5c106d568 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/MediaGroupsShortcuts.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/MediaGroupsShortcuts.kt @@ -30,7 +30,7 @@ fun List>.createResend( chatId: ChatId, disableNotification: Boolean = false, protectContent: Boolean = false, - replyTo: MessageIdentifier? = null + replyTo: MessageId? = null ) = SendMediaGroup( chatId, map { it.content.toMediaGroupMemberTelegramMedia() }, @@ -43,7 +43,7 @@ fun List>.createResend( chat: Chat, disableNotification: Boolean = false, protectContent: Boolean = false, - replyTo: MessageIdentifier? = null + replyTo: MessageId? = null ) = createResend( chat.id, disableNotification, @@ -54,7 +54,7 @@ fun List>.createResend( fun SentMediaGroupUpdate.createResend( disableNotification: Boolean = false, protectContent: Boolean = false, - replyTo: MessageIdentifier? = null + replyTo: MessageId? = null ) = data.createResend( chat, disableNotification, From 4cd1316e27f4ea04aec97f878a4e1e7ba3e62ce4 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 15 Sep 2022 12:46:17 +0600 Subject: [PATCH 3/3] fix build --- CHANGELOG.md | 2 ++ gradle/libs.versions.toml | 2 +- .../extensions/api/send/RepliesWithChatsAndMessages.kt | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f58bb518..f55325d48f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 3.2.2 +* `Versions`: + * `MicroUtils`: `0.12.10` -> `0.12.13` * `Core`: * `MessageIdentifier` has been renamed to `MessageId` * `API`: diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4a71029b75..bbff748051 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ ktor = "2.1.1" ksp = "1.7.10-1.0.6" kotlin-poet = "1.12.0" -microutils = "0.12.10" +microutils = "0.12.13" github-release-plugin = "2.4.1" diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt index 5778afb8c2..82ff3b1cbc 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt @@ -1100,8 +1100,8 @@ suspend fun TelegramBot.reply( * * @see handleLiveLocation */ -@JvmName("replyLiveLocationWithLocation") -@JsName("replyLiveLocationWithLocation") +@JvmName("replyLiveLocationWithLocationChatIdAndMessageId") +@JsName("replyLiveLocationWithLocationChatIdAndMessageId") suspend fun TelegramBot.reply( toChatId: ChatId, toMessageId: MessageId, @@ -1127,8 +1127,8 @@ suspend fun TelegramBot.reply( * * @see handleLiveLocation */ -@JvmName("replyLiveLocationWithLatLong") -@JsName("replyLiveLocationWithLatLong") +@JvmName("replyLiveLocationWithLatLongChatIdAndMessageId") +@JsName("replyLiveLocationWithLatLongChatIdAndMessageId") suspend fun TelegramBot.reply( toChatId: ChatId, toMessageId: MessageId,