From 71c830fc2e1fee7b3999ccbe64df0755fab0e3d2 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 1 Jun 2024 13:17:40 +0600 Subject: [PATCH] fix passing of effectId in a lot of functions --- .../extensions/api/send/ResendMessage.kt | 2 +- .../tgbotapi/extensions/api/send/SendMessage.kt | 16 ++++++++-------- .../tgbotapi/extensions/api/send/SendVenue.kt | 2 ++ .../inmo/tgbotapi/extensions/api/send/Sends.kt | 1 + .../extensions/api/send/SetMessageReactions.kt | 1 - .../extensions/api/send/media/SendAnimation.kt | 2 ++ .../extensions/api/send/media/SendVideo.kt | 2 ++ .../extensions/api/send/media/SendVoice.kt | 1 + 8 files changed, 17 insertions(+), 10 deletions(-) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/ResendMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/ResendMessage.kt index 98962ecc5a..7d6cf5ace0 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/ResendMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/ResendMessage.kt @@ -32,7 +32,7 @@ suspend inline fun TelegramBot.resend( ) as ContentMessage /** - * This method will send [content] to the [chatId] as is + * This method will send [content] to the [chat] as is */ suspend inline fun TelegramBot.resend( chat: Chat, 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 b65759231d..2c4fa0e946 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 @@ -121,7 +121,7 @@ suspend fun TelegramBot.sendMessage( ) /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendMessage( @@ -140,7 +140,7 @@ suspend fun TelegramBot.sendMessage( /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendMessage( @@ -177,7 +177,7 @@ suspend fun TelegramBot.sendTextMessage( ) /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendTextMessage( @@ -196,7 +196,7 @@ suspend fun TelegramBot.sendTextMessage( /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendTextMessage( @@ -231,7 +231,7 @@ suspend fun TelegramBot.sendMessage( ) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendMessage( @@ -250,7 +250,7 @@ suspend fun TelegramBot.sendMessage( /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendMessage( @@ -286,7 +286,7 @@ suspend fun TelegramBot.sendTextMessage( ) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendTextMessage( @@ -305,7 +305,7 @@ suspend fun TelegramBot.sendTextMessage( /** - * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] + * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ suspend fun TelegramBot.sendTextMessage( 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 0c93d67064..fd7e73e9ea 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 @@ -45,6 +45,7 @@ suspend fun TelegramBot.sendVenue( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = replyMarkup ) @@ -190,6 +191,7 @@ suspend fun TelegramBot.sendVenue( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = replyMarkup ) 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 692ca13d90..07ce2f0508 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 @@ -1514,6 +1514,7 @@ suspend fun TelegramBot.send( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = replyMarkup ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SetMessageReactions.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SetMessageReactions.kt index 9b0931e842..71bbd18aef 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SetMessageReactions.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SetMessageReactions.kt @@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.reactions.Reaction -import kotlin.js.JsName import kotlin.jvm.JvmName suspend fun TelegramBot.setMessageReactions( 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 584b36ffe7..2baef11f16 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 @@ -49,6 +49,7 @@ suspend fun TelegramBot.sendAnimation( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = replyMarkup ) @@ -214,6 +215,7 @@ suspend fun TelegramBot.sendAnimation( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = 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 cf3ade1183..f641816260 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 @@ -50,6 +50,7 @@ suspend fun TelegramBot.sendVideo( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = replyMarkup ) @@ -207,6 +208,7 @@ suspend inline fun TelegramBot.sendVideo( businessConnectionId = businessConnectionId, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = 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 3295ab8733..8f708377c6 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 @@ -129,6 +129,7 @@ suspend inline fun TelegramBot.sendVoice( duration = duration, disableNotification = disableNotification, protectContent = protectContent, + effectId = effectId, replyParameters = replyParameters, replyMarkup = replyMarkup )