From dbb8be502a285a0df0b80aefa1d265a27b3aff87 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 17 Apr 2024 15:09:45 +0600 Subject: [PATCH] almost completed sends with business connection id --- .../extensions/api/LiveFlowLocation.kt | 7 + .../tgbotapi/extensions/api/send/Replies.kt | 193 ++++++++--- .../extensions/api/send/SendAction.kt | 117 ++++--- .../extensions/api/send/SendActionDSL.kt | 94 +++--- .../extensions/api/send/SendContact.kt | 13 +- .../tgbotapi/extensions/api/send/SendDice.kt | 7 +- .../extensions/api/send/SendLiveLocation.kt | 21 +- .../extensions/api/send/SendMessage.kt | 48 ++- .../extensions/api/send/SendStaticLocation.kt | 21 +- .../tgbotapi/extensions/api/send/SendVenue.kt | 13 + .../tgbotapi/extensions/api/send/Sends.kt | 302 ++++++++++++------ .../extensions/api/send/games/SendGame.kt | 12 +- .../api/send/media/SendAnimation.kt | 23 +- .../extensions/api/send/media/SendAudio.kt | 23 +- .../extensions/api/send/media/SendDocument.kt | 23 +- .../api/send/media/SendMediaGroup.kt | 49 ++- .../extensions/api/send/media/SendPhoto.kt | 35 +- .../extensions/api/send/media/SendSticker.kt | 13 +- .../extensions/api/send/media/SendVideo.kt | 23 +- .../api/send/media/SendVideoNote.kt | 12 +- .../extensions/api/send/media/SendVoice.kt | 23 +- .../extensions/api/send/polls/SendPoll.kt | 37 ++- .../inmo/tgbotapi/requests/send/SendDice.kt | 4 +- .../tgbotapi/requests/send/polls/SendPoll.kt | 2 + .../types/message/content/Abstracts.kt | 4 + .../types/message/content/AnimationContent.kt | 3 + .../types/message/content/AudioContent.kt | 3 + .../types/message/content/ContactContent.kt | 4 +- .../types/message/content/DiceContent.kt | 3 + .../types/message/content/DocumentContent.kt | 3 + .../types/message/content/GameContent.kt | 3 + .../types/message/content/GiveawayContent.kt | 2 + .../content/GiveawayPublicResultsContent.kt | 2 + .../types/message/content/InvoiceContent.kt | 2 + .../types/message/content/LocationContent.kt | 5 + .../message/content/MediaGroupContent.kt | 7 +- .../types/message/content/PhotoContent.kt | 3 + .../types/message/content/PollContent.kt | 3 + .../types/message/content/StickerContent.kt | 3 + .../types/message/content/StoryContent.kt | 2 + .../types/message/content/TextContent.kt | 3 + .../types/message/content/VenueContent.kt | 4 +- .../types/message/content/VideoContent.kt | 3 + .../types/message/content/VideoNoteContent.kt | 3 + .../types/message/content/VoiceContent.kt | 3 + .../MediaGroupContentMessageCreator.kt | 30 +- 46 files changed, 849 insertions(+), 364 deletions(-) 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 46381c4430..464deab10f 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 @@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.extensions.api.edit.edit import dev.inmo.tgbotapi.extensions.api.send.send import dev.inmo.tgbotapi.extensions.api.send.sendLiveLocation import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.location.LiveLocation import dev.inmo.tgbotapi.types.location.Location @@ -42,6 +43,7 @@ suspend fun TelegramBot.handleLiveLocation( locationsFlow: Flow, liveTimeMillis: Long = defaultLivePeriodDelayMillis, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -68,6 +70,7 @@ suspend fun TelegramBot.handleLiveLocation( it.heading, it.proximityAlertRadius, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -102,6 +105,7 @@ suspend fun TelegramBot.handleLiveLocation( locationsFlow: Flow, liveTimeMillis: Long = defaultLivePeriodDelayMillis, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -121,6 +125,7 @@ suspend fun TelegramBot.handleLiveLocation( }, liveTimeMillis, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -139,6 +144,7 @@ suspend fun TelegramBot.handleLiveLocation( locationsFlow: Flow>, liveTimeMillis: Long = defaultLivePeriodDelayMillis, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -154,6 +160,7 @@ suspend fun TelegramBot.handleLiveLocation( }, liveTimeMillis, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 011f690eac..721f40c97d 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 @@ -10,6 +10,7 @@ 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.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.media.* import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode @@ -49,6 +50,7 @@ suspend inline fun TelegramBot.reply( lastName: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -59,6 +61,7 @@ suspend inline fun TelegramBot.reply( firstName, lastName, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -74,6 +77,7 @@ suspend inline fun TelegramBot.reply( contact: Contact, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -82,6 +86,7 @@ suspend inline fun TelegramBot.reply( replyInChatId, contact, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -100,11 +105,12 @@ suspend inline fun TelegramBot.replyWithDice( animationType: DiceAnimationType? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(replyInChatId, animationType, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -115,11 +121,12 @@ suspend inline fun TelegramBot.reply( animationType: DiceAnimationType, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = replyWithDice(to, animationType, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +) = replyWithDice(to, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) // Location @@ -134,6 +141,7 @@ suspend inline fun TelegramBot.reply( longitude: Double, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -143,6 +151,7 @@ suspend inline fun TelegramBot.reply( latitude, longitude, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -158,6 +167,7 @@ suspend inline fun TelegramBot.reply( location: StaticLocation, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -166,6 +176,7 @@ suspend inline fun TelegramBot.reply( replyInChatId, location, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -186,6 +197,7 @@ suspend inline fun TelegramBot.reply( linkPreviewOptions: LinkPreviewOptions? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -196,6 +208,7 @@ suspend inline fun TelegramBot.reply( parseMode, linkPreviewOptions, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -212,6 +225,7 @@ suspend inline fun TelegramBot.reply( linkPreviewOptions: LinkPreviewOptions? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -221,6 +235,7 @@ suspend inline fun TelegramBot.reply( entities, linkPreviewOptions, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -237,12 +252,13 @@ suspend fun TelegramBot.reply( linkPreviewOptions: LinkPreviewOptions? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +) = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] @@ -254,12 +270,13 @@ suspend fun TelegramBot.reply( linkPreviewOptions: LinkPreviewOptions? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +) = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) // Venue @@ -280,6 +297,7 @@ suspend inline fun TelegramBot.reply( googlePlaceType: GooglePlaceType? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -295,6 +313,7 @@ suspend inline fun TelegramBot.reply( googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, threadId = replyInThreadId, + businessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), @@ -312,6 +331,7 @@ suspend inline fun TelegramBot.reply( googlePlaceType: GooglePlaceType? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -327,6 +347,7 @@ suspend inline fun TelegramBot.reply( googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, threadId = replyInThreadId, + businessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), @@ -338,6 +359,7 @@ suspend inline fun TelegramBot.reply( venue: Venue, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -346,6 +368,7 @@ suspend inline fun TelegramBot.reply( chatId = replyInChatId, venue = venue, threadId = replyInThreadId, + businessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), @@ -360,12 +383,13 @@ suspend inline fun TelegramBot.replyWithGame( gameShortName: String, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( - replyInChatId, gameShortName, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup + replyInChatId, gameShortName, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup ) suspend inline fun TelegramBot.replyWithGame( @@ -373,12 +397,13 @@ suspend inline fun TelegramBot.replyWithGame( game: Game, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( - replyInChatId, game.title, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup + replyInChatId, game.title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup ) suspend inline fun TelegramBot.reply( @@ -386,11 +411,12 @@ suspend inline fun TelegramBot.reply( game: Game, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = replyWithGame(to, game, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +) = replyWithGame(to, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) // Animation @@ -407,6 +433,7 @@ suspend inline fun TelegramBot.replyWithAnimation( height: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -422,6 +449,7 @@ suspend inline fun TelegramBot.replyWithAnimation( width, height, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -439,11 +467,12 @@ suspend inline fun TelegramBot.reply( height: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(replyInChatId, animation, text, parseMode, spoilered, duration, width, height, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendAnimation(replyInChatId, animation, text, parseMode, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.replyWithAnimation( to: AccessibleMessage, @@ -456,6 +485,7 @@ suspend inline fun TelegramBot.replyWithAnimation( height: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -470,6 +500,7 @@ suspend inline fun TelegramBot.replyWithAnimation( width, height, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply), @@ -486,11 +517,12 @@ suspend inline fun TelegramBot.reply( height: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(replyInChatId, animation, entities, spoilered, duration, width, height, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendAnimation(replyInChatId, animation, entities, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Audio @@ -506,11 +538,12 @@ suspend inline fun TelegramBot.replyWithAudio( title: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -520,11 +553,12 @@ suspend inline fun TelegramBot.reply( title: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.replyWithAudio( to: AccessibleMessage, @@ -536,11 +570,12 @@ suspend inline fun TelegramBot.replyWithAudio( title: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -549,11 +584,12 @@ suspend inline fun TelegramBot.reply( title: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Documents @@ -566,12 +602,13 @@ suspend inline fun TelegramBot.replyWithDocument( parseMode: ParseMode? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +) = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -580,12 +617,13 @@ suspend inline fun TelegramBot.reply( parseMode: ParseMode? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +) = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) suspend inline fun TelegramBot.replyWithDocument( to: AccessibleMessage, @@ -594,12 +632,13 @@ suspend inline fun TelegramBot.replyWithDocument( entities: TextSourcesList, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +) = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -607,12 +646,13 @@ suspend inline fun TelegramBot.reply( entities: TextSourcesList, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, entities, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +) = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) // Media Group @@ -623,40 +663,44 @@ suspend inline fun TelegramBot.replyWithMediaGroup( media: List, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null -) = sendMediaGroup(replyInChatId, media, replyInThreadId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) +) = sendMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) suspend inline fun TelegramBot.replyWithPlaylist( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null -) = sendPlaylist(replyInChatId, media, replyInThreadId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) +) = sendPlaylist(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) suspend inline fun TelegramBot.replyWithDocuments( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null -) = sendDocumentsGroup(replyInChatId, media, replyInThreadId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) +) = sendDocumentsGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) suspend inline fun TelegramBot.replyWithGallery( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null -) = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) +) = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply)) // Photo @@ -669,11 +713,12 @@ suspend inline fun TelegramBot.replyWithPhoto( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, fileId, text, parseMode, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendPhoto(replyInChatId, fileId, text, parseMode, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -683,11 +728,12 @@ suspend inline fun TelegramBot.reply( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photo, text, parseMode, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendPhoto(replyInChatId, photo, text, parseMode, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -697,11 +743,12 @@ suspend inline fun TelegramBot.reply( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photoSize, text, parseMode, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendPhoto(replyInChatId, photoSize, text, parseMode, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.replyWithPhoto( @@ -711,11 +758,12 @@ suspend inline fun TelegramBot.replyWithPhoto( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, fileId, entities, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendPhoto(replyInChatId, fileId, entities, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -724,11 +772,12 @@ suspend inline fun TelegramBot.reply( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photo, entities, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendPhoto(replyInChatId, photo, entities, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -737,11 +786,12 @@ suspend inline fun TelegramBot.reply( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photoSize, entities, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendPhoto(replyInChatId, photoSize, entities, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Sticker @@ -752,11 +802,12 @@ suspend inline fun TelegramBot.replyWithSticker( emoji: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(replyInChatId, sticker, replyInThreadId, emoji, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -764,11 +815,12 @@ suspend inline fun TelegramBot.reply( emoji: String? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(replyInChatId, sticker, replyInThreadId, emoji, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Videos @@ -785,11 +837,12 @@ suspend inline fun TelegramBot.replyWithVideo( height: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, thumb, text, parseMode, spoilered, duration, width, height, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendVideo(replyInChatId, video, thumb, text, parseMode, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -799,11 +852,12 @@ suspend inline fun TelegramBot.reply( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, text, parseMode, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendVideo(replyInChatId, video, text, parseMode, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.replyWithVideo( to: AccessibleMessage, @@ -816,11 +870,12 @@ suspend inline fun TelegramBot.replyWithVideo( height: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, thumb, entities, spoilered, duration, width, height, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +) = sendVideo(replyInChatId, video, thumb, entities, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -829,11 +884,12 @@ suspend inline fun TelegramBot.reply( spoilered: Boolean = false, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, entities, spoilered, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVideo(replyInChatId, video, entities, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) // VideoNotes @@ -846,22 +902,24 @@ suspend inline fun TelegramBot.replyWithVideoNote( size: Int? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(replyInChatId, videoNote, thumb, duration, size, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVideoNote(replyInChatId, videoNote, thumb, duration, size, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, videoNote: VideoNoteFile, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(replyInChatId, videoNote, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) // Voice @@ -874,11 +932,12 @@ suspend inline fun TelegramBot.replyWithVoice( duration: Long? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -887,11 +946,12 @@ suspend inline fun TelegramBot.reply( parseMode: ParseMode? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.replyWithVoice( @@ -901,11 +961,12 @@ suspend inline fun TelegramBot.replyWithVoice( duration: Long? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -913,11 +974,12 @@ suspend inline fun TelegramBot.reply( entities: TextSourcesList, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, entities, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) // Invoice @@ -966,11 +1028,12 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendRegularPoll(replyInChatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -983,11 +1046,12 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendRegularPoll(replyInChatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -1001,11 +1065,12 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendQuizPoll(replyInChatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -1020,11 +1085,12 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendQuizPoll(replyInChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -1037,11 +1103,12 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendQuizPoll(replyInChatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( to: AccessibleMessage, @@ -1055,11 +1122,12 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, replyInThreadId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +) = sendQuizPoll(replyInChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) suspend inline fun TelegramBot.reply( @@ -1072,6 +1140,7 @@ suspend inline fun TelegramBot.reply( closeInfo: ScheduledCloseInfo? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -1088,6 +1157,7 @@ suspend inline fun TelegramBot.reply( closeInfo = closeInfo, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1105,6 +1175,7 @@ suspend inline fun TelegramBot.reply( closeInfo = closeInfo, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1170,6 +1241,7 @@ suspend fun TelegramBot.reply( content: MessageContent, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -1178,6 +1250,7 @@ suspend fun TelegramBot.reply( content.createResend( replyInChatId, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), @@ -1196,6 +1269,7 @@ suspend fun TelegramBot.reply( liveTimeMillis: Long = defaultLivePeriodDelayMillis, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null @@ -1204,6 +1278,7 @@ suspend fun TelegramBot.reply( locationsFlow, liveTimeMillis, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true) @@ -1222,6 +1297,7 @@ suspend fun TelegramBot.reply( liveTimeMillis: Long = defaultLivePeriodDelayMillis, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null @@ -1231,6 +1307,7 @@ suspend fun TelegramBot.reply( locationsFlow, liveTimeMillis, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true) @@ -1250,6 +1327,7 @@ suspend fun TelegramBot.reply( liveTimeMillis: Long = defaultLivePeriodDelayMillis, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null @@ -1259,6 +1337,7 @@ suspend fun TelegramBot.reply( locationsFlow, liveTimeMillis, replyInThreadId, + replyInBusinessConnectionId, disableNotification, protectContent, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true) @@ -1270,6 +1349,7 @@ suspend fun TelegramBot.reply( mediaFile: TelegramMediaFile, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -1281,6 +1361,7 @@ suspend fun TelegramBot.reply( audio = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1291,6 +1372,7 @@ suspend fun TelegramBot.reply( animation = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1301,6 +1383,7 @@ suspend fun TelegramBot.reply( voice = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1311,6 +1394,7 @@ suspend fun TelegramBot.reply( video = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1321,6 +1405,7 @@ suspend fun TelegramBot.reply( videoNote = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1331,6 +1416,7 @@ suspend fun TelegramBot.reply( document = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1341,6 +1427,7 @@ suspend fun TelegramBot.reply( sticker = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1351,6 +1438,7 @@ suspend fun TelegramBot.reply( photoSize = mediaFile, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1361,6 +1449,7 @@ suspend fun TelegramBot.reply( document = mediaFile.asDocumentFile(), replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1376,6 +1465,7 @@ suspend fun TelegramBot.reply( parseMode: ParseMode? = null, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -1389,6 +1479,7 @@ suspend fun TelegramBot.reply( parseMode = parseMode, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1401,6 +1492,7 @@ suspend fun TelegramBot.reply( parseMode = parseMode, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1413,6 +1505,7 @@ suspend fun TelegramBot.reply( parseMode = parseMode, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1425,6 +1518,7 @@ suspend fun TelegramBot.reply( parseMode = parseMode, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1437,6 +1531,7 @@ suspend fun TelegramBot.reply( parseMode = parseMode, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1449,6 +1544,7 @@ suspend fun TelegramBot.reply( parseMode = parseMode, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1463,6 +1559,7 @@ suspend fun TelegramBot.reply( entities: TextSourcesList, replyInChatId: IdChatIdentifier = to.chat.id, replyInThreadId: MessageThreadId? = replyInChatId.threadId, + replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, @@ -1475,6 +1572,7 @@ suspend fun TelegramBot.reply( entities = entities, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1486,6 +1584,7 @@ suspend fun TelegramBot.reply( entities = entities, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1497,6 +1596,7 @@ suspend fun TelegramBot.reply( entities = entities, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1508,6 +1608,7 @@ suspend fun TelegramBot.reply( entities = entities, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1519,6 +1620,7 @@ suspend fun TelegramBot.reply( entities = entities, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, @@ -1530,6 +1632,7 @@ suspend fun TelegramBot.reply( entities = entities, replyInChatId = replyInChatId, replyInThreadId = replyInThreadId, + replyInBusinessConnectionId = replyInBusinessConnectionId, disableNotification = disableNotification, protectContent = protectContent, allowSendingWithoutReply = allowSendingWithoutReply, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendAction.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendAction.kt index 2f876bdacd..d7bf65dfa8 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendAction.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendAction.kt @@ -5,127 +5,152 @@ import dev.inmo.tgbotapi.requests.send.SendAction import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.actions.* +import dev.inmo.tgbotapi.types.businessConnectionId +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.threadId suspend fun TelegramBot.sendBotAction( chatId: ChatIdentifier, action: BotAction, - threadId: MessageThreadId? = chatId.threadId + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId ) = execute( - SendAction(chatId, action, threadId) + SendAction(chatId, action, threadId, businessConnectionId) ) suspend fun TelegramBot.sendBotAction( chat: Chat, action: BotAction, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat.id, action, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat.id, action, threadId, businessConnectionId) suspend fun TelegramBot.sendActionTyping( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, TypingAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, TypingAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadPhoto( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, UploadPhotoAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, UploadPhotoAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionRecordVideo( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, RecordVideoAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, RecordVideoAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadVideo( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, UploadVideoAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, UploadVideoAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionRecordVoice( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, RecordVoiceAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, RecordVoiceAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadVoice( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, UploadVoiceAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, UploadVoiceAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadDocument( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, UploadDocumentAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, UploadDocumentAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionFindLocation( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, FindLocationAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, FindLocationAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionRecordVideoNote( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, RecordVideoNoteAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadVideoNote( chatId: ChatIdentifier, - threadId: MessageThreadId? = chatId.threadId -) = sendBotAction(chatId, UploadVideoNoteAction, threadId) + threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId +) = sendBotAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionTyping( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, TypingAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, TypingAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadPhoto( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, UploadPhotoAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, UploadPhotoAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionRecordVideo( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, RecordVideoAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, RecordVideoAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadVideo( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, UploadVideoAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, UploadVideoAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionRecordVoice( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, RecordVoiceAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, RecordVoiceAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadVoice( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, UploadVoiceAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, UploadVoiceAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadDocument( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, UploadDocumentAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, UploadDocumentAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionFindLocation( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, FindLocationAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, FindLocationAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionRecordVideoNote( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, RecordVideoNoteAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, RecordVideoNoteAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionUploadVideoNote( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, UploadVideoNoteAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, UploadVideoNoteAction, threadId, businessConnectionId) suspend fun TelegramBot.sendActionChooseStickerAction( chat: Chat, - threadId: MessageThreadId? = chat.id.threadId -) = sendBotAction(chat, ChooseStickerAction, threadId) + threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId +) = sendBotAction(chat, ChooseStickerAction, threadId, businessConnectionId) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendActionDSL.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendActionDSL.kt index c182898837..11ed6b9410 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendActionDSL.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendActionDSL.kt @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendAction import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.actions.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.chat.Chat import kotlinx.coroutines.* import kotlin.contracts.* @@ -39,13 +40,14 @@ suspend fun TelegramBot.withAction( chatId: IdChatIdentifier, action: BotAction, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback ): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } return withAction( - SendAction(chatId, action, threadId), + SendAction(chatId, action, threadId, businessConnectionId), block ) } @@ -55,6 +57,7 @@ suspend fun TelegramBot.withAction( chat: Chat, action: BotAction, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback ): T { contract { @@ -64,163 +67,164 @@ suspend fun TelegramBot.withAction( chat.id, action, threadId, + businessConnectionId, block ) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withTypingAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withTypingAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, TypingAction, threadId, block) + return withAction(chatId, TypingAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadPhotoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadPhotoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, UploadPhotoAction, threadId, block) + return withAction(chatId, UploadPhotoAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withRecordVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, RecordVideoAction, threadId, block) + return withAction(chatId, RecordVideoAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, UploadVideoAction, threadId, block) + return withAction(chatId, UploadVideoAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withRecordVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, RecordVoiceAction, threadId, block) + return withAction(chatId, RecordVoiceAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, UploadVoiceAction, threadId, block) + return withAction(chatId, UploadVoiceAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadDocumentAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadDocumentAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, UploadDocumentAction, threadId, block) + return withAction(chatId, UploadDocumentAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withFindLocationAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withFindLocationAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, FindLocationAction, threadId, block) + return withAction(chatId, FindLocationAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withRecordVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, RecordVideoNoteAction, threadId, block) + return withAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, UploadVideoNoteAction, threadId, block) + return withAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chatId, ChooseStickerAction, threadId, block) + return withAction(chatId, ChooseStickerAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withTypingAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withTypingAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, TypingAction, threadId, block) + return withAction(chat, TypingAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadPhotoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadPhotoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, UploadPhotoAction, threadId, block) + return withAction(chat, UploadPhotoAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withRecordVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, RecordVideoAction, threadId, block) + return withAction(chat, RecordVideoAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, UploadVideoAction, threadId, block) + return withAction(chat, UploadVideoAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withRecordVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, RecordVoiceAction, threadId, block) + return withAction(chat, RecordVoiceAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, UploadVoiceAction, threadId, block) + return withAction(chat, UploadVoiceAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadDocumentAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadDocumentAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, UploadDocumentAction, threadId, block) + return withAction(chat, UploadDocumentAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withFindLocationAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withFindLocationAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, FindLocationAction, threadId, block) + return withAction(chat, FindLocationAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withRecordVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, RecordVideoNoteAction, threadId, block) + return withAction(chat, RecordVideoNoteAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withUploadVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, UploadVideoNoteAction, threadId, block) + return withAction(chat, UploadVideoNoteAction, threadId, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withChooseStickerAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId,block: TelegramBotActionCallback) : T { +suspend fun TelegramBot.withChooseStickerAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return withAction(chat, ChooseStickerAction, threadId, block) + return withAction(chat, ChooseStickerAction, threadId, businessConnectionId, block) } 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 a2c9904118..de74b25b05 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendContact import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -16,13 +17,14 @@ suspend fun TelegramBot.sendContact( firstName: String, lastName: String? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendContact( - chatId, phoneNumber, firstName, lastName, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) ) @@ -34,13 +36,14 @@ suspend fun TelegramBot.sendContact( chatId: ChatIdentifier, contact: Contact, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendContact( - chatId, contact, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) ) @@ -54,12 +57,13 @@ suspend fun TelegramBot.sendContact( firstName: String, lastName: String? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact( - chat.id, phoneNumber, firstName, lastName, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -70,10 +74,11 @@ suspend fun TelegramBot.sendContact( chat: Chat, contact: Contact, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendContact( - chat.id, contact, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, contact, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) 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 776d900f27..6bb475849b 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,6 +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.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.dice.DiceAnimationType @@ -15,12 +16,13 @@ suspend fun TelegramBot.sendDice( chatId: ChatIdentifier, animationType: DiceAnimationType? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( - SendDice(chatId, animationType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) + SendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) ) /** @@ -31,8 +33,9 @@ suspend fun TelegramBot.sendDice( chat: Chat, animationType: DiceAnimationType? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(chat.id, animationType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 e33ccf8f66..ed5a66b26c 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendLiveLocation import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.location.Location @@ -20,6 +21,7 @@ suspend fun TelegramBot.sendLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -34,6 +36,7 @@ suspend fun TelegramBot.sendLocation( heading, proximityAlertRadius, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -53,6 +56,7 @@ suspend fun TelegramBot.sendLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -66,6 +70,7 @@ suspend fun TelegramBot.sendLocation( heading, proximityAlertRadius, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -85,6 +90,7 @@ suspend fun TelegramBot.sendLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -98,6 +104,7 @@ suspend fun TelegramBot.sendLocation( heading, proximityAlertRadius, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -116,6 +123,7 @@ suspend fun TelegramBot.sendLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -129,6 +137,7 @@ suspend fun TelegramBot.sendLocation( heading, proximityAlertRadius, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -148,11 +157,12 @@ suspend fun TelegramBot.sendLiveLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -166,11 +176,12 @@ suspend fun TelegramBot.sendLiveLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -185,11 +196,12 @@ suspend fun TelegramBot.sendLiveLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -203,8 +215,9 @@ suspend fun TelegramBot.sendLiveLocation( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 36e366a727..0bfcfa64c9 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendTextMessage import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -21,6 +22,7 @@ suspend fun TelegramBot.sendMessage( parseMode: ParseMode? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -32,6 +34,7 @@ suspend fun TelegramBot.sendMessage( parseMode, linkPreviewOptions, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -49,12 +52,13 @@ suspend fun TelegramBot.sendTextMessage( parseMode: ParseMode? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendMessage( - chatId, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -67,11 +71,12 @@ suspend fun TelegramBot.sendTextMessage( parseMode: ParseMode? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -84,11 +89,12 @@ suspend fun TelegramBot.sendMessage( parseMode: ParseMode? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -99,12 +105,13 @@ suspend fun TelegramBot.sendMessage( entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( - SendTextMessage(chatId, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) + SendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) ) /** @@ -116,12 +123,13 @@ suspend fun TelegramBot.sendMessage( separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -133,12 +141,13 @@ suspend fun TelegramBot.sendMessage( separator: String, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -149,12 +158,13 @@ suspend fun TelegramBot.sendTextMessage( entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendMessage( - chatId, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -166,12 +176,13 @@ suspend fun TelegramBot.sendTextMessage( separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -183,12 +194,13 @@ suspend fun TelegramBot.sendTextMessage( separator: String, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -199,11 +211,12 @@ suspend fun TelegramBot.sendMessage( entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] @@ -214,12 +227,13 @@ suspend fun TelegramBot.sendMessage( separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -231,12 +245,13 @@ suspend fun TelegramBot.sendMessage( separator: String, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -248,11 +263,12 @@ suspend fun TelegramBot.sendTextMessage( entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] @@ -263,12 +279,13 @@ suspend fun TelegramBot.sendTextMessage( separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -280,9 +297,10 @@ suspend fun TelegramBot.sendTextMessage( separator: String, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 11d7c50503..8a8c1279a0 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,6 +3,7 @@ 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.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.location.Location @@ -16,6 +17,7 @@ suspend fun TelegramBot.sendLocation( latitude: Double, longitude: Double, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -26,6 +28,7 @@ suspend fun TelegramBot.sendLocation( latitude, longitude, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -41,6 +44,7 @@ suspend fun TelegramBot.sendLocation( chatId: ChatIdentifier, location: Location, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -50,6 +54,7 @@ suspend fun TelegramBot.sendLocation( location.latitude, location.longitude, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -65,6 +70,7 @@ suspend fun TelegramBot.sendLocation( latitude: Double, longitude: Double, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -74,6 +80,7 @@ suspend fun TelegramBot.sendLocation( latitude, longitude, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -88,6 +95,7 @@ suspend fun TelegramBot.sendLocation( chat: Chat, location: Location, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -97,6 +105,7 @@ suspend fun TelegramBot.sendLocation( location.latitude, location.longitude, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -112,11 +121,12 @@ suspend fun TelegramBot.sendStaticLocation( latitude: Double, longitude: Double, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, latitude, longitude, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -126,11 +136,12 @@ suspend fun TelegramBot.sendStaticLocation( chatId: ChatIdentifier, location: Location, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, location.latitude, location.longitude, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -141,11 +152,12 @@ suspend fun TelegramBot.sendStaticLocation( latitude: Double, longitude: Double, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, latitude, longitude, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -155,8 +167,9 @@ suspend fun TelegramBot.sendStaticLocation( chat: Chat, location: Location, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, location.latitude, location.longitude, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 a33ce202a9..67f02e87b6 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendVenue import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.location.StaticLocation @@ -23,6 +24,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -39,6 +41,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -61,6 +64,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -76,6 +80,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -96,6 +101,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -111,6 +117,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -131,6 +138,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -146,6 +154,7 @@ suspend fun TelegramBot.sendVenue( googlePlaceId = googlePlaceId, googlePlaceType = googlePlaceType, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -160,6 +169,7 @@ suspend fun TelegramBot.sendVenue( chatId: ChatIdentifier, venue: Venue, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -169,6 +179,7 @@ suspend fun TelegramBot.sendVenue( chatId = chatId, venue = venue, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -184,6 +195,7 @@ suspend fun TelegramBot.sendVenue( chat: Chat, venue: Venue, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -192,6 +204,7 @@ suspend fun TelegramBot.sendVenue( chatId = chat.id, venue = venue, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, 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 f71cf0f761..75e3877744 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 @@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.extensions.api.send.polls.sendRegularPoll import dev.inmo.tgbotapi.requests.send.media.rawSendingMediaGroupsWarning import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.actions.BotAction +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat @@ -61,11 +62,12 @@ suspend fun TelegramBot.send( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chatId, animation, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chatId, animation, text, parseMode, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAnimation] request @@ -82,11 +84,12 @@ suspend fun TelegramBot.send( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat, animation, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chat, animation, text, parseMode, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAnimation] request @@ -102,11 +105,12 @@ suspend fun TelegramBot.send( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chatId, animation, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chatId, animation, entities, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAnimation] request @@ -122,11 +126,12 @@ suspend fun TelegramBot.send( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat, animation, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chat, animation, entities, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAudio] request @@ -140,11 +145,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, title: String? = audio.title, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio, text, parseMode, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chatId, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAudio] request @@ -158,11 +164,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, title: String? = audio.title, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat, audio, text, parseMode, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chat, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAudio] request @@ -175,11 +182,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, title: String? = audio.title, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio, entities, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chatId, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendAudio] request @@ -192,11 +200,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, title: String? = audio.title, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat, audio, entities, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chat, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendContact] request @@ -209,11 +218,12 @@ suspend fun TelegramBot.send( firstName: String, lastName: String? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chatId, phoneNumber, firstName, lastName, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendContact(chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendContact] request @@ -224,11 +234,12 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, contact: Contact, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chatId, contact, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendContact(chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendContact] request @@ -241,11 +252,12 @@ suspend fun TelegramBot.send( firstName: String, lastName: String? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chat, phoneNumber, firstName, lastName, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendContact(chat, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendContact] request @@ -256,11 +268,12 @@ suspend fun TelegramBot.send( chat: Chat, contact: Contact, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chat, contact, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendContact(chat, contact, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendDice] request @@ -271,11 +284,12 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, animationType: DiceAnimationType, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(chatId, animationType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendDice] request @@ -286,11 +300,12 @@ suspend fun TelegramBot.send( chat: Chat, animationType: DiceAnimationType, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(chat, animationType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendDice(chat, animationType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendDocument] request @@ -303,12 +318,13 @@ suspend fun TelegramBot.send( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chatId, document, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chatId, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendDocument] request @@ -321,12 +337,13 @@ suspend fun TelegramBot.send( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat, document, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chat, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendDocument] request @@ -338,12 +355,13 @@ suspend inline fun TelegramBot.send( document: DocumentFile, entities: TextSourcesList, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chatId, document, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chatId, document, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendDocument] request @@ -355,12 +373,13 @@ suspend inline fun TelegramBot.send( document: DocumentFile, entities: TextSourcesList, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat, document, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chat, document, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendGame] request @@ -371,11 +390,12 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, game: Game, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame(chatId, game, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendGame(chatId, game, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendGame] request @@ -386,11 +406,12 @@ suspend fun TelegramBot.send( chat: Chat, game: Game, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame(chat, game, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendGame(chat, game, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendInvoice] request @@ -463,11 +484,12 @@ suspend fun TelegramBot.send( latitude: Double, longitude: Double, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chatId, latitude, longitude, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendStaticLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request @@ -478,11 +500,12 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, location: StaticLocation, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chatId, location, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendStaticLocation(chatId, location, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request @@ -494,11 +517,12 @@ suspend fun TelegramBot.send( latitude: Double, longitude: Double, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chat, latitude, longitude, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendStaticLocation(chat, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request @@ -509,11 +533,12 @@ suspend fun TelegramBot.send( chat: Chat, location: StaticLocation, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chat, location, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendStaticLocation(chat, location, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendTextMessage] request @@ -526,11 +551,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chatId, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendTextMessage] request @@ -543,11 +569,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chat, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendTextMessage] request @@ -559,11 +586,12 @@ suspend fun TelegramBot.send( entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chatId, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] @@ -574,12 +602,13 @@ suspend fun TelegramBot.send( separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -591,12 +620,13 @@ suspend fun TelegramBot.send( separator: String, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -609,11 +639,12 @@ suspend fun TelegramBot.send( entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendTextMessage(chat, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] @@ -624,12 +655,13 @@ suspend fun TelegramBot.send( separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -641,12 +673,13 @@ suspend fun TelegramBot.send( separator: String, linkPreviewOptions: LinkPreviewOptions? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -660,11 +693,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photo, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photo, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -678,11 +712,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photo, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat, photo, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -696,11 +731,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photoSize, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photoSize, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -714,11 +750,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photoSize, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat, photoSize, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -731,11 +768,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photo, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photo, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -748,11 +786,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photo, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat, photo, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -765,11 +804,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photoSize, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photoSize, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request @@ -782,11 +822,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photoSize, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat, photoSize, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request @@ -802,11 +843,12 @@ suspend fun TelegramBot.send( allowMultipleAnswers: Boolean = false, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request @@ -823,11 +865,12 @@ suspend fun TelegramBot.send( allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendRegularPoll(chatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request @@ -843,11 +886,12 @@ suspend fun TelegramBot.send( allowMultipleAnswers: Boolean = false, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chat, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendRegularPoll(chat, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request @@ -864,11 +908,12 @@ suspend fun TelegramBot.send( allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chat, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendRegularPoll(chat, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -886,11 +931,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -908,11 +954,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chat, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -931,12 +978,13 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -956,11 +1004,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -977,11 +1026,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -998,11 +1048,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chat, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -1020,11 +1071,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request @@ -1042,11 +1094,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendQuizPoll(chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendSticker] request @@ -1057,12 +1110,13 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, sticker: Sticker, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, emoji: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chatId, sticker, threadId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendSticker] request @@ -1073,12 +1127,13 @@ suspend fun TelegramBot.send( chat: Chat, sticker: Sticker, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, emoji: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chat, sticker, threadId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendSticker(chat, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -1095,6 +1150,7 @@ suspend fun TelegramBot.send( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -1108,6 +1164,7 @@ suspend fun TelegramBot.send( heading = heading, proximityAlertRadius = proximityAlertRadius, threadId = threadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyParameters, @@ -1127,12 +1184,13 @@ suspend fun TelegramBot.send( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendLiveLocation( - chatId, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -1149,12 +1207,13 @@ suspend fun TelegramBot.send( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendLiveLocation( - chat, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -1170,12 +1229,13 @@ suspend fun TelegramBot.send( heading: Degrees? = null, proximityAlertRadius: Meters? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendLiveLocation( - chat, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -1194,11 +1254,12 @@ suspend fun TelegramBot.send( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chatId, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVenue(chatId, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVenue] request @@ -1216,11 +1277,12 @@ suspend fun TelegramBot.send( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chat, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVenue(chat, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVenue] request @@ -1237,11 +1299,12 @@ suspend fun TelegramBot.send( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chatId, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVenue(chatId, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVenue] request @@ -1258,11 +1321,12 @@ suspend fun TelegramBot.send( googlePlaceId: GooglePlaceId? = null, googlePlaceType: GooglePlaceType? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chat, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVenue(chat, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVenue] request @@ -1273,11 +1337,12 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, venue: Venue, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chatId, venue, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVenue(chatId, venue, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVenue] request @@ -1288,11 +1353,12 @@ suspend fun TelegramBot.send( chat: Chat, venue: Venue, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chat, venue, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVenue(chat, venue, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVideo] request @@ -1306,11 +1372,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chatId, video, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chatId, video, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVideo] request @@ -1324,11 +1391,12 @@ suspend fun TelegramBot.send( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat, video, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chat, video, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVideo] request @@ -1341,11 +1409,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chatId, video, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chatId, video, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVideo] request @@ -1358,11 +1427,12 @@ suspend inline fun TelegramBot.send( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat, video, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chat, video, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVideoNote] request @@ -1373,11 +1443,12 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, videoNote: VideoNoteFile, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chatId, videoNote, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideoNote(chatId, videoNote, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVideoNote] request @@ -1388,11 +1459,12 @@ suspend fun TelegramBot.send( chat: Chat, videoNote: VideoNoteFile, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chat, videoNote, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideoNote(chat, videoNote, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVoice] request @@ -1405,11 +1477,12 @@ suspend fun TelegramBot.send( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chatId, voice, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chatId, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVoice] request @@ -1422,11 +1495,12 @@ suspend fun TelegramBot.send( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat, voice, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chat, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVoice] request @@ -1438,11 +1512,12 @@ suspend inline fun TelegramBot.send( voice: VoiceFile, entities: TextSourcesList, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chatId, voice, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chatId, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendVoice] request @@ -1454,14 +1529,15 @@ suspend inline fun TelegramBot.send( voice: VoiceFile, entities: TextSourcesList, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat, voice, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chat, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** - * @see SendMediaGroup + * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroup") @@ -1469,13 +1545,14 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendMediaGroup + * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroup") @@ -1483,13 +1560,14 @@ suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendMediaGroup + * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroupByContent") @@ -1497,13 +1575,14 @@ suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendMediaGroup + * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroupByContent") @@ -1511,163 +1590,176 @@ suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendPlaylist + * @see sendPlaylist */ @JvmName("sendPlaylist") suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendPlaylist(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendPlaylist(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendPlaylist + * @see sendPlaylist */ @JvmName("sendPlaylist") suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendPlaylist(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendPlaylist(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendPlaylist + * @see sendPlaylist */ @JvmName("sendPlaylistByContent") suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendPlaylist(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendPlaylist(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendPlaylist + * @see sendPlaylist */ @JvmName("sendPlaylistByContent") suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendPlaylist(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendPlaylist(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendDocumentsGroup + * @see sendDocumentsGroup */ @JvmName("sendDocuments") suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendDocumentsGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendDocumentsGroup + * @see sendDocumentsGroup */ @JvmName("sendDocuments") suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendDocumentsGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendDocumentsGroup + * @see sendDocumentsGroup */ @JvmName("sendDocumentsByContent") suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendDocumentsGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendDocumentsGroup + * @see sendDocumentsGroup */ @JvmName("sendDocumentsByContent") suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendDocumentsGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendVisualMediaGroup + * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroup") suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendVisualMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendVisualMediaGroup + * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroup") suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendVisualMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendVisualMediaGroup + * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroupByContent") suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chatId, media, threadId, disableNotification, protectContent, replyParameters) +) = sendVisualMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) /** - * @see SendVisualMediaGroup + * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroupByContent") suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chat, media, threadId, disableNotification, protectContent, replyParameters) +) = sendVisualMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters) 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 71f0f495ba..8b7570eaeb 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 @@ -15,13 +15,14 @@ suspend fun TelegramBot.sendGame( chatId: ChatIdentifier, gameShortName: String, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendGame( - chatId, gameShortName, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) ) @@ -33,12 +34,13 @@ suspend fun TelegramBot.sendGame( chat: Chat, gameShortName: String, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( - chat.id, gameShortName, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -49,12 +51,13 @@ suspend fun TelegramBot.sendGame( chatId: ChatIdentifier, game: Game, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( - chatId, game.title, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, game.title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -65,10 +68,11 @@ suspend fun TelegramBot.sendGame( chat: Chat, game: Game, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendGame( - chat.id, game.title, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, game.title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) 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 fbb0a719fd..31552072e7 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendAnimation import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -25,6 +26,7 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -41,6 +43,7 @@ suspend fun TelegramBot.sendAnimation( width, height, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -62,12 +65,13 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation( - chatId, animation.fileId, animation.thumbnail ?.fileId, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, animation.fileId, animation.thumbnail ?.fileId, text, parseMode, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -85,11 +89,12 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat.id, animation, thumb, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chat.id, animation, thumb, text, parseMode, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -105,11 +110,12 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat.id, animation, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chat.id, animation, text, parseMode, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -126,6 +132,7 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -141,6 +148,7 @@ suspend fun TelegramBot.sendAnimation( width, height, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -161,12 +169,13 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendAnimation( - chatId, animation.fileId, animation.thumbnail ?.fileId, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, animation.fileId, animation.thumbnail ?.fileId, entities, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -183,11 +192,12 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat.id, animation, thumb, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chat.id, animation, thumb, entities, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -202,8 +212,9 @@ suspend fun TelegramBot.sendAnimation( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat.id, animation, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAnimation(chat.id, animation, entities, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 1266c22f98..2fa8699608 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendAudio import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -24,6 +25,7 @@ suspend fun TelegramBot.sendAudio( performer: String? = null, title: String? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -39,6 +41,7 @@ suspend fun TelegramBot.sendAudio( performer, title, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -60,11 +63,12 @@ suspend fun TelegramBot.sendAudio( performer: String? = null, title: String? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -77,11 +81,12 @@ suspend fun TelegramBot.sendAudio( parseMode: ParseMode? = null, title: String? = audio.title, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, text, parseMode, audio.duration, audio.performer, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, text, parseMode, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -94,11 +99,12 @@ suspend fun TelegramBot.sendAudio( parseMode: ParseMode? = null, title: String? = audio.title, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, text, parseMode, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chat.id, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -114,6 +120,7 @@ suspend inline fun TelegramBot.sendAudio( performer: String? = null, title: String? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -128,6 +135,7 @@ suspend inline fun TelegramBot.sendAudio( performer, title, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -148,11 +156,12 @@ suspend inline fun TelegramBot.sendAudio( performer: String? = null, title: String? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -164,11 +173,12 @@ suspend inline fun TelegramBot.sendAudio( entities: TextSourcesList, title: String? = audio.title, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, entities, audio.duration, audio.performer, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, entities, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -180,8 +190,9 @@ suspend inline fun TelegramBot.sendAudio( entities: TextSourcesList, title: String? = audio.title, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, entities, title, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 8fda288589..5bb3b87818 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendDocument import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -21,6 +22,7 @@ suspend fun TelegramBot.sendDocument( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -34,6 +36,7 @@ suspend fun TelegramBot.sendDocument( text, parseMode, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -53,12 +56,13 @@ suspend fun TelegramBot.sendDocument( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, thumb, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chat.id, document, thumb, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -70,13 +74,14 @@ suspend fun TelegramBot.sendDocument( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null ) = sendDocument( - chatId, document.fileId, document.thumbnail ?.fileId, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection + chatId, document.fileId, document.thumbnail ?.fileId, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection ) /** @@ -89,12 +94,13 @@ suspend fun TelegramBot.sendDocument( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chat.id, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -106,6 +112,7 @@ suspend inline fun TelegramBot.sendDocument( thumb: InputFile? = null, entities: TextSourcesList, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -118,6 +125,7 @@ suspend inline fun TelegramBot.sendDocument( thumb, entities, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -136,12 +144,13 @@ suspend inline fun TelegramBot.sendDocument( thumb: InputFile? = null, entities: TextSourcesList, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, thumb, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chat.id, document, thumb, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -152,13 +161,14 @@ suspend inline fun TelegramBot.sendDocument( document: DocumentFile, entities: TextSourcesList, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null ) = sendDocument( - chatId, document.fileId, document.thumbnail ?.fileId, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection + chatId, document.fileId, document.thumbnail ?.fileId, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection ) /** @@ -170,9 +180,10 @@ suspend inline fun TelegramBot.sendDocument( document: DocumentFile, entities: TextSourcesList, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) +) = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup, disableContentTypeDetection) 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 69edd1a91d..893839db94 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.send.media import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.media.* import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.media.* import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent @@ -20,12 +21,13 @@ suspend fun TelegramBot.sendMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = execute( SendMediaGroup( - chatId, media, threadId, disableNotification, protectContent, replyParameters + chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) ) @@ -37,11 +39,12 @@ suspend fun TelegramBot.sendMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendMediaGroup( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -53,11 +56,12 @@ suspend fun TelegramBot.sendMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendMediaGroup( - chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, disableNotification, protectContent, replyParameters + chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -69,11 +73,12 @@ suspend fun TelegramBot.sendMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendMediaGroup( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -83,12 +88,13 @@ suspend fun TelegramBot.sendPlaylist( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = execute( SendPlaylist( - chatId, media, threadId, disableNotification, protectContent, replyParameters + chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) ) @@ -99,11 +105,12 @@ suspend fun TelegramBot.sendPlaylist( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendPlaylist( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -114,11 +121,12 @@ suspend fun TelegramBot.sendPlaylist( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendPlaylist( - chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, disableNotification, protectContent, replyParameters + chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -129,11 +137,12 @@ suspend fun TelegramBot.sendPlaylist( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendPlaylist( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -143,12 +152,13 @@ suspend fun TelegramBot.sendDocumentsGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = execute( SendDocumentsGroup( - chatId, media, threadId, disableNotification, protectContent, replyParameters + chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) ) @@ -159,11 +169,12 @@ suspend fun TelegramBot.sendDocumentsGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendDocumentsGroup( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -174,11 +185,12 @@ suspend fun TelegramBot.sendDocumentsGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendDocumentsGroup( - chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, disableNotification, protectContent, replyParameters + chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -189,11 +201,12 @@ suspend fun TelegramBot.sendDocumentsGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendDocumentsGroup( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -203,12 +216,13 @@ suspend fun TelegramBot.sendVisualMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = execute( SendVisualMediaGroup( - chatId, media, threadId, disableNotification, protectContent, replyParameters + chatId, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) ) @@ -219,11 +233,12 @@ suspend fun TelegramBot.sendVisualMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendVisualMediaGroup( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -234,11 +249,12 @@ suspend fun TelegramBot.sendVisualMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendVisualMediaGroup( - chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, disableNotification, protectContent, replyParameters + chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) /** @@ -249,9 +265,10 @@ suspend fun TelegramBot.sendVisualMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null ) = sendVisualMediaGroup( - chat.id, media, threadId, disableNotification, protectContent, replyParameters + chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, replyParameters ) 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 4141311d02..61fff8881c 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendPhoto import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -21,6 +22,7 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -33,6 +35,7 @@ suspend fun TelegramBot.sendPhoto( parseMode, spoilered, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -51,11 +54,12 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat.id, fileId, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat.id, fileId, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -68,11 +72,12 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -85,11 +90,12 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat.id, photo, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat.id, photo, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -102,11 +108,12 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photoSize.fileId, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photoSize.fileId, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -119,11 +126,12 @@ suspend fun TelegramBot.sendPhoto( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat.id, photoSize, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat.id, photoSize, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -136,6 +144,7 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -147,6 +156,7 @@ suspend inline fun TelegramBot.sendPhoto( entities, spoilered, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -164,11 +174,12 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat.id, fileId, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat.id, fileId, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -180,11 +191,12 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -196,11 +208,12 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat.id, photo, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat.id, photo, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -212,11 +225,12 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photoSize.fileId, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chatId, photoSize.fileId, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -228,8 +242,9 @@ suspend inline fun TelegramBot.sendPhoto( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat.id, photoSize, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendPhoto(chat.id, photoSize, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 493fdd9b36..b804ba6684 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,6 +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.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.Sticker @@ -16,13 +17,14 @@ suspend fun TelegramBot.sendSticker( chatId: ChatIdentifier, sticker: InputFile, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, emoji: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( - SendSticker(chatId, sticker, threadId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) + SendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) ) /** @@ -33,12 +35,13 @@ suspend fun TelegramBot.sendSticker( chat: Chat, sticker: InputFile, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, emoji: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chat.id, sticker, threadId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendSticker(chat.id, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -48,12 +51,13 @@ suspend fun TelegramBot.sendSticker( chatId: ChatIdentifier, sticker: Sticker, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, emoji: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chatId, sticker.fileId, threadId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendSticker(chatId, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -63,9 +67,10 @@ suspend fun TelegramBot.sendSticker( chat: Chat, sticker: Sticker, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, emoji: String? = null, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chat, sticker.fileId, threadId, emoji, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, replyParameters, 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 2f3a55ee08..b4c8cefc0f 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendVideo import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -25,6 +26,7 @@ suspend fun TelegramBot.sendVideo( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -42,6 +44,7 @@ suspend fun TelegramBot.sendVideo( height, null, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -60,11 +63,12 @@ suspend fun TelegramBot.sendVideo( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chatId, video.fileId, video.thumbnail ?.fileId, text, parseMode, spoilered, video.duration, video.width, video.height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chatId, video.fileId, video.thumbnail ?.fileId, text, parseMode, spoilered, video.duration, video.width, video.height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -81,11 +85,12 @@ suspend fun TelegramBot.sendVideo( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat.id, video, thumb, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chat.id, video, thumb, text, parseMode, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -99,11 +104,12 @@ suspend fun TelegramBot.sendVideo( parseMode: ParseMode? = null, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat.id, video, text, parseMode, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chat.id, video, text, parseMode, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -119,6 +125,7 @@ suspend inline fun TelegramBot.sendVideo( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -135,6 +142,7 @@ suspend inline fun TelegramBot.sendVideo( height, null, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -152,11 +160,12 @@ suspend inline fun TelegramBot.sendVideo( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chatId, video.fileId, video.thumbnail ?.fileId, entities, spoilered, video.duration, video.width, video.height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chatId, video.fileId, video.thumbnail ?.fileId, entities, spoilered, video.duration, video.width, video.height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -172,11 +181,12 @@ suspend inline fun TelegramBot.sendVideo( width: Int? = null, height: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat.id, video, thumb, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chat.id, video, thumb, entities, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -189,8 +199,9 @@ suspend inline fun TelegramBot.sendVideo( entities: TextSourcesList, spoilered: Boolean = false, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat.id, video, entities, spoilered, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideo(chat.id, video, entities, spoilered, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 51228a9949..13c9490339 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,6 +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.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.VideoNoteFile @@ -19,6 +20,7 @@ suspend fun TelegramBot.sendVideoNote( duration: Long? = null, size: Int? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -31,6 +33,7 @@ suspend fun TelegramBot.sendVideoNote( duration, size, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -46,12 +49,13 @@ suspend fun TelegramBot.sendVideoNote( chatId: ChatIdentifier, videoNote: VideoNoteFile, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendVideoNote( - chatId, videoNote.fileId, videoNote.thumbnail ?.fileId, videoNote.duration, videoNote.width, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, videoNote.fileId, videoNote.thumbnail ?.fileId, videoNote.duration, videoNote.width, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -65,11 +69,12 @@ suspend fun TelegramBot.sendVideoNote( duration: Long? = null, size: Int? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -79,8 +84,9 @@ suspend fun TelegramBot.sendVideoNote( chat: Chat, videoNote: VideoNoteFile, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chat.id, videoNote, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 a1962bbf78..127c27645f 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.abstracts.InputFile import dev.inmo.tgbotapi.requests.send.media.SendVoice import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -21,6 +22,7 @@ suspend fun TelegramBot.sendVoice( parseMode: ParseMode? = null, duration: Long? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -33,6 +35,7 @@ suspend fun TelegramBot.sendVoice( parseMode, duration, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -51,11 +54,12 @@ suspend fun TelegramBot.sendVoice( parseMode: ParseMode? = null, duration: Long? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, text, parseMode, duration, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chat.id, voice, text, parseMode, duration, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -67,12 +71,13 @@ suspend fun TelegramBot.sendVoice( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice( - chatId, voice.fileId, text, parseMode, voice.duration, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, voice.fileId, text, parseMode, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -85,11 +90,12 @@ suspend fun TelegramBot.sendVoice( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, text, parseMode, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chat.id, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** @@ -102,6 +108,7 @@ suspend inline fun TelegramBot.sendVoice( entities: TextSourcesList, duration: Long? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -112,6 +119,7 @@ suspend inline fun TelegramBot.sendVoice( voice = voice, entities = entities, threadId = threadId, + businessConnectionId = businessConnectionId, duration = duration, disableNotification = disableNotification, protectContent = protectContent, @@ -130,11 +138,12 @@ suspend inline fun TelegramBot.sendVoice( entities: TextSourcesList, duration: Long? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, entities, duration, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chat.id, voice, entities, duration, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -145,12 +154,13 @@ suspend inline fun TelegramBot.sendVoice( voice: VoiceFile, entities: TextSourcesList, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendVoice( - chatId, voice.fileId, entities, voice.duration, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, voice.fileId, entities, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -161,8 +171,9 @@ suspend inline fun TelegramBot.sendVoice( voice: VoiceFile, entities: TextSourcesList, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, entities, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, 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 b008e76d00..5bce01c071 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 @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.polls.SendQuizPoll import dev.inmo.tgbotapi.requests.send.polls.SendRegularPoll import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -23,13 +24,14 @@ suspend fun TelegramBot.sendRegularPoll( allowMultipleAnswers: Boolean = false, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendRegularPoll( - chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) ) /** @@ -46,11 +48,12 @@ suspend fun TelegramBot.sendRegularPoll( allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or @@ -65,12 +68,13 @@ suspend fun TelegramBot.sendRegularPoll( allowMultipleAnswers: Boolean = false, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll( - chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -87,12 +91,13 @@ suspend fun TelegramBot.sendRegularPoll( allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendRegularPoll( - chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) @@ -111,13 +116,14 @@ suspend fun TelegramBot.sendQuizPoll( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendQuizPoll( - chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) ) @@ -136,12 +142,13 @@ suspend fun TelegramBot.sendQuizPoll( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -160,12 +167,13 @@ suspend fun TelegramBot.sendQuizPoll( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -184,12 +192,13 @@ suspend fun TelegramBot.sendQuizPoll( parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) @@ -207,13 +216,14 @@ suspend inline fun TelegramBot.sendQuizPoll( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = execute( SendQuizPoll( - chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) ) @@ -231,12 +241,13 @@ suspend inline fun TelegramBot.sendQuizPoll( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -254,12 +265,13 @@ suspend inline fun TelegramBot.sendQuizPoll( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) /** @@ -277,10 +289,11 @@ suspend inline fun TelegramBot.sendQuizPoll( entities: TextSourcesList, closeInfo: ScheduledCloseInfo? = null, threadId: MessageThreadId? = chat.id.threadId, + businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null ) = sendQuizPoll( - chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, replyParameters, replyMarkup + chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) 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 5a796bc4b5..446224f314 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 @@ -1,6 +1,7 @@ package dev.inmo.tgbotapi.requests.send import dev.inmo.tgbotapi.abstracts.types.DisableNotification +import dev.inmo.tgbotapi.abstracts.types.OptionallyBusinessConnectionRequest import dev.inmo.tgbotapi.abstracts.types.WithReplyParameters import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest import dev.inmo.tgbotapi.types.* @@ -33,7 +34,8 @@ data class SendDice( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : ReplyingMarkupSendMessageRequest>, WithReplyParameters, DisableNotification { +) : ReplyingMarkupSendMessageRequest>, WithReplyParameters, DisableNotification, + OptionallyBusinessConnectionRequest { override val requestSerializer: SerializationStrategy<*> get() = serializer() 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 ee11db681f..eee698d32d 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 @@ -65,6 +65,7 @@ fun SendPoll( isAnonymous, isClosed, threadId = threadId, + businessConnectionId = businessConnectionId, protectContent = protectContent, disableNotification = disableNotification, replyParameters = replyParameters, @@ -110,6 +111,7 @@ fun Poll.createRequest( textSources, scheduledCloseInfo, threadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 536e7b87cd..18fad944fd 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 @@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.abstracts.TextedInput import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.TelegramMediaFile import dev.inmo.tgbotapi.types.media.TelegramMedia @@ -147,6 +148,7 @@ sealed interface ResendableContent { fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -156,6 +158,7 @@ sealed interface ResendableContent { fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId? = chatId.threadId, + businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyToMessageId: MessageId?, @@ -164,6 +167,7 @@ sealed interface ResendableContent { ): Request = createResend( chatId = chatId, messageThreadId = messageThreadId, + businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, replyParameters = replyToMessageId ?.let { 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 6e67ad7b62..5c5c5bd903 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.media.SendAnimation import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -23,6 +24,7 @@ data class AnimationContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -37,6 +39,7 @@ data class AnimationContent( media.width, media.height, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 e6c43e6ec7..c9c99f5c20 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.media.SendAudio import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.media.TelegramMediaAudio import dev.inmo.tgbotapi.types.media.toTelegramMediaAudio import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList @@ -21,6 +22,7 @@ data class AudioContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -34,6 +36,7 @@ data class AudioContent( media.performer, media.title, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 3c91b28946..a2d08beb64 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.SendContact import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import kotlinx.serialization.Serializable @@ -14,11 +15,12 @@ data class ContactContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, replyMarkup: KeyboardMarkup? ): Request> = SendContact( - chatId, contact, messageThreadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, contact, messageThreadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) } 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 8b32a07c24..b27f2b2496 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 @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.dice.Dice import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -18,6 +19,7 @@ data class DiceContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -26,6 +28,7 @@ data class DiceContent( chatId, dice.animationType, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 ad43787c75..9a165e8b6f 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 @@ -8,6 +8,7 @@ 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.abstracts.WithOptionalQuoteInfo +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.DocumentFile import dev.inmo.tgbotapi.types.files.asDocumentFile @@ -24,6 +25,7 @@ data class DocumentContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -34,6 +36,7 @@ data class DocumentContent( media.thumbnail ?.fileId, textSources, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 44a248cc32..71bbd8b5ee 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 @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.games.Game import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -18,6 +19,7 @@ data class GameContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -26,6 +28,7 @@ data class GameContent( chatId, game.title, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayContent.kt index db4cedf9ae..4ab17d2ace 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayContent.kt @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.ForwardMessage import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.giveaway.Giveaway @@ -18,6 +19,7 @@ data class GiveawayContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent.kt index ddaf9ebd9e..45080f4d71 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent.kt @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.ForwardMessage import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage @@ -15,6 +16,7 @@ data class GiveawayPublicResultsContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, 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 dfe7a4e347..9439e77bab 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 @@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.payments.Invoice @@ -17,6 +18,7 @@ data class InvoiceContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, 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 00e5206545..f6a84f70db 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 @@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.location.* import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -100,6 +101,7 @@ data class LiveLocationContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -113,6 +115,7 @@ data class LiveLocationContent( location.heading, location.proximityAlertRadius, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, @@ -131,6 +134,7 @@ data class StaticLocationContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -140,6 +144,7 @@ data class StaticLocationContent( location.latitude, location.longitude, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/MediaGroupContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/MediaGroupContent.kt index 02c5dce070..3fe88866be 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/MediaGroupContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/MediaGroupContent.kt @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.media.SendMediaGroup import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.abstracts.WithOptionalQuoteInfo +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.TelegramMediaFile import dev.inmo.tgbotapi.types.media.TelegramMedia @@ -32,7 +33,8 @@ data class MediaGroupContent( override fun createResend( chatId: ChatIdentifier, - threadId: MessageThreadId?, + messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -40,7 +42,8 @@ data class MediaGroupContent( ): Request>> = SendMediaGroup( chatId, group.map { it.content.toMediaGroupMemberTelegramMedia() }, - threadId, + messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 c63148c80b..76cd68f744 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 @@ -7,6 +7,7 @@ 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.abstracts.WithOptionalQuoteInfo +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.* import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -25,6 +26,7 @@ data class PhotoContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -35,6 +37,7 @@ data class PhotoContent( textSources, spoilered, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 6b17f1a1f7..6606a17158 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 @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.polls.Poll @@ -18,6 +19,7 @@ data class PollContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -25,6 +27,7 @@ data class PollContent( ): Request> = poll.createRequest( chatId, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 bae183a40a..a9ef8924bb 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 @@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.types.media.TelegramMediaDocument import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -19,6 +20,7 @@ data class StickerContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -27,6 +29,7 @@ data class StickerContent( chatId, media.fileId, messageThreadId, + businessConnectionId, media.emoji, disableNotification, protectContent, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StoryContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StoryContent.kt index 13659c8796..27e0bf918c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StoryContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/StoryContent.kt @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage @@ -21,6 +22,7 @@ data class StoryContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, 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 9e1b62aaba..bbd3236826 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 @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.requests.send.SendTextMessage import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.abstracts.WithOptionalQuoteInfo +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import kotlinx.serialization.Serializable @@ -20,6 +21,7 @@ data class TextContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -29,6 +31,7 @@ data class TextContent( textSources, linkPreviewOptions, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 d61f49cc47..cd07df6cd7 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 @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.venue.Venue @@ -18,11 +19,12 @@ data class VenueContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, replyMarkup: KeyboardMarkup? ): Request> = SendVenue( - chatId, venue, messageThreadId, disableNotification, protectContent, replyParameters, replyMarkup + chatId, venue, messageThreadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup ) } 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 bb00fd3ef5..8086404b3b 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 @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.media.SendVideo import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.media.TelegramMediaVideo import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup @@ -22,6 +23,7 @@ data class VideoContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -37,6 +39,7 @@ data class VideoContent( media.height, null, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 3fdbc27282..8a6ddc1f48 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 @@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.types.media.TelegramMediaVideo import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.ReplyParameters +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.VideoNoteFile import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -19,6 +20,7 @@ data class VideoNoteContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -30,6 +32,7 @@ data class VideoNoteContent( media.duration, media.width, messageThreadId, + businessConnectionId, disableNotification, protectContent, replyParameters, 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 84fd8d70e1..6a7f40fe27 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 @@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.media.TelegramMediaAudio import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.abstracts.WithOptionalQuoteInfo +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.files.VoiceFile import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage @@ -21,6 +22,7 @@ data class VoiceContent( override fun createResend( chatId: ChatIdentifier, messageThreadId: MessageThreadId?, + businessConnectionId: BusinessConnectionId?, disableNotification: Boolean, protectContent: Boolean, replyParameters: ReplyParameters?, @@ -30,6 +32,7 @@ data class VoiceContent( voice = media.fileId, entities = textSources, threadId = messageThreadId, + businessConnectionId = businessConnectionId, duration = media.duration, disableNotification = disableNotification, protectContent = protectContent, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt index fb5953a7e2..9b240b470b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt @@ -27,7 +27,8 @@ fun List>.asMedia sourceMessage.replyMarkup, sourceMessage.senderBot, sourceMessage.authorSignature, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) is BusinessContentMessage -> BusinessContentMessageImpl( sourceMessage.messageId, @@ -43,7 +44,8 @@ fun List>.asMedia sourceMessage.replyMarkup, sourceMessage.senderBot, sourceMessage.mediaGroupId, - sourceMessage.senderBusinessBot + sourceMessage.senderBusinessBot, + sourceMessage.fromOffline ) is PrivateContentMessage -> PrivateContentMessageImpl( sourceMessage.messageId, @@ -57,7 +59,8 @@ fun List>.asMedia sourceMessage.replyInfo, sourceMessage.replyMarkup, sourceMessage.senderBot, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) is AnonymousGroupContentMessage -> AnonymousGroupContentMessageImpl( sourceMessage.chat, @@ -71,7 +74,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.authorSignature, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) is CommonGroupContentMessage -> CommonGroupContentMessageImpl( sourceMessage.chat, @@ -86,7 +90,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.mediaGroupId, - sourceMessage.senderBoostsCount + sourceMessage.senderBoostsCount, + sourceMessage.fromOffline ) is ConnectedFromChannelGroupContentMessage -> ConnectedFromChannelGroupContentMessageImpl( sourceMessage.chat, @@ -101,7 +106,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.authorSignature, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) is UnconnectedFromChannelGroupContentMessage -> UnconnectedFromChannelGroupContentMessageImpl( sourceMessage.chat, @@ -116,7 +122,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.authorSignature, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) is AnonymousForumContentMessage -> AnonymousForumContentMessageImpl( sourceMessage.chat, @@ -131,7 +138,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.authorSignature, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) is CommonForumContentMessage -> CommonForumContentMessageImpl( sourceMessage.chat, @@ -147,7 +155,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.mediaGroupId, - sourceMessage.senderBoostsCount + sourceMessage.senderBoostsCount, + sourceMessage.fromOffline ) is FromChannelForumContentMessage -> FromChannelForumContentMessageImpl( sourceMessage.chat, @@ -163,7 +172,8 @@ fun List>.asMedia content, sourceMessage.senderBot, sourceMessage.authorSignature, - sourceMessage.mediaGroupId + sourceMessage.mediaGroupId, + sourceMessage.fromOffline ) } }