diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt index a39e052d2a..bc99fdee39 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessage.kt @@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, messageId: MessageId, toChatId: ChatIdentifier, @@ -25,7 +25,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): MessageId = execute( CopyMessage( fromChatId, messageId, @@ -45,7 +45,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChat: Chat, messageId: MessageId, toChatId: ChatIdentifier, @@ -57,13 +57,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, messageId: MessageId, toChat: Chat, @@ -75,13 +75,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChat: Chat, messageId: MessageId, toChat: Chat, @@ -93,14 +93,14 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, messageId: MessageId, toChatId: ChatIdentifier, @@ -111,7 +111,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): MessageId = execute( CopyMessage( fromChatId, messageId, @@ -130,7 +130,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChat: Chat, messageId: MessageId, toChatId: ChatIdentifier, @@ -141,13 +141,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(fromChat.id, messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(fromChat.id, messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChatId: ChatIdentifier, messageId: MessageId, toChat: Chat, @@ -158,13 +158,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(fromChatId, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(fromChatId, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( fromChat: Chat, messageId: MessageId, toChat: Chat, @@ -175,13 +175,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(fromChat.id, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(fromChat.id, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, message: AccessibleMessage, text: String? = null, @@ -192,13 +192,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChat: Chat, message: AccessibleMessage, text: String? = null, @@ -209,13 +209,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(message.chat, message.messageId, toChat, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(message.chat, message.messageId, toChat, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, message: AccessibleMessage, entities: TextSourcesList, @@ -225,13 +225,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(message.chat, message.messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(message.chat, message.messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChat: Chat, message: AccessibleMessage, entities: TextSourcesList, @@ -241,13 +241,13 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage(message.chat, message.messageId, toChat, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) +): MessageId = copyMessage(message.chat, message.messageId, toChat, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, messageId: MessageId, @@ -259,7 +259,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): MessageId = execute( CopyMessage( fromChatId, messageId, @@ -279,7 +279,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChat: Chat, messageId: MessageId, @@ -291,7 +291,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( toChatId, fromChat.id, messageId, @@ -309,7 +309,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChatId: ChatIdentifier, messageId: MessageId, @@ -321,7 +321,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( toChat.id, fromChatId, messageId, @@ -339,7 +339,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChat: Chat, messageId: MessageId, @@ -351,7 +351,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( toChat.id, fromChat.id, messageId, @@ -370,7 +370,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, messageId: MessageId, @@ -381,7 +381,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): MessageId = execute( CopyMessage( fromChatId, messageId, @@ -400,7 +400,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChatId: ChatIdentifier, fromChat: Chat, messageId: MessageId, @@ -411,7 +411,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( toChatId, fromChat.id, messageId, @@ -428,7 +428,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChatId: ChatIdentifier, messageId: MessageId, @@ -439,7 +439,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( toChat.id, fromChatId, messageId, @@ -456,7 +456,7 @@ suspend inline fun TelegramBot.copyMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.copyMessage( +public suspend inline fun TelegramBot.copyMessage( toChat: Chat, fromChat: Chat, messageId: MessageId, @@ -467,7 +467,7 @@ suspend inline fun TelegramBot.copyMessage( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( toChat.id, fromChat.id, messageId, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt index 03bacb0c65..b85db70bd8 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/CopyMessages.kt @@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.Message import kotlin.jvm.JvmName -suspend fun TelegramBot.copyMessages( +public suspend fun TelegramBot.copyMessages( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, messageIds: List, @@ -15,7 +15,7 @@ suspend fun TelegramBot.copyMessages( disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = messageIds.chunked(copyMessagesLimit.last).flatMap { +): List = messageIds.chunked(copyMessagesLimit.last).flatMap { execute( CopyMessages( toChatId = toChatId, @@ -29,7 +29,7 @@ suspend fun TelegramBot.copyMessages( ) } -suspend fun TelegramBot.copyMessages( +public suspend fun TelegramBot.copyMessages( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, messageIds: Array, @@ -37,7 +37,7 @@ suspend fun TelegramBot.copyMessages( disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = copyMessages( +): List = copyMessages( toChatId = toChatId, fromChatId = fromChatId, messageIds = messageIds.toList(), @@ -47,14 +47,14 @@ suspend fun TelegramBot.copyMessages( removeCaption = removeCaption ) -suspend fun TelegramBot.copyMessages( +public suspend fun TelegramBot.copyMessages( toChatId: ChatIdentifier, messagesMetas: List, threadId: MessageThreadId? = toChatId.threadId, disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = messagesMetas.groupBy { it.chatId }.flatMap { (chatId, messages) -> +): List = messagesMetas.groupBy { it.chatId }.flatMap { (chatId, messages) -> copyMessages( toChatId = toChatId, fromChatId = chatId, @@ -67,14 +67,14 @@ suspend fun TelegramBot.copyMessages( } @JvmName("copyMessagesWithMessages") -suspend fun TelegramBot.copyMessages( +public suspend fun TelegramBot.copyMessages( toChatId: ChatIdentifier, messages: List, threadId: MessageThreadId? = toChatId.threadId, disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = copyMessages( +): List = copyMessages( toChatId = toChatId, messagesMetas = messages.map { it.metaInfo }, threadId = threadId, @@ -83,7 +83,7 @@ suspend fun TelegramBot.copyMessages( removeCaption = removeCaption ) -suspend fun TelegramBot.copy( +public suspend fun TelegramBot.copy( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, messageIds: List, @@ -91,7 +91,7 @@ suspend fun TelegramBot.copy( disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = copyMessages( +): List = copyMessages( toChatId = toChatId, fromChatId = fromChatId, messageIds = messageIds, @@ -101,7 +101,7 @@ suspend fun TelegramBot.copy( removeCaption = removeCaption ) -suspend fun TelegramBot.copy( +public suspend fun TelegramBot.copy( toChatId: ChatIdentifier, fromChatId: ChatIdentifier, messageIds: Array, @@ -109,7 +109,7 @@ suspend fun TelegramBot.copy( disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = copyMessages( +): List = copyMessages( toChatId = toChatId, fromChatId = fromChatId, messageIds = messageIds, @@ -119,14 +119,14 @@ suspend fun TelegramBot.copy( removeCaption = removeCaption ) -suspend fun TelegramBot.copy( +public suspend fun TelegramBot.copy( toChatId: ChatIdentifier, messagesMetas: List, threadId: MessageThreadId? = toChatId.threadId, disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = copyMessages( +): List = copyMessages( toChatId = toChatId, messagesMetas = messagesMetas, threadId = threadId, @@ -136,14 +136,14 @@ suspend fun TelegramBot.copy( ) @JvmName("copyWithMessages") -suspend fun TelegramBot.copy( +public suspend fun TelegramBot.copy( toChatId: ChatIdentifier, messages: List, threadId: MessageThreadId? = toChatId.threadId, disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false -) = copyMessages( +): List = copyMessages( toChatId = toChatId, messages = messages, threadId = threadId, 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 a35f8bbeff..515afb94ad 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 @@ -24,6 +24,7 @@ import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.games.Game import dev.inmo.tgbotapi.types.location.* import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.payments.LabeledPrice @@ -42,7 +43,7 @@ import kotlin.jvm.JvmName * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, phoneNumber: String, firstName: String, @@ -55,7 +56,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact( +): ContentMessage = sendContact( replyInChatId, phoneNumber, firstName, @@ -73,7 +74,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, contact: Contact, replyInChatId: IdChatIdentifier = to.chat.id, @@ -84,7 +85,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact( +): ContentMessage = sendContact( replyInChatId, contact, replyInThreadId, @@ -103,7 +104,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.replyWithDice( +public suspend inline fun TelegramBot.replyWithDice( to: AccessibleMessage, animationType: DiceAnimationType? = null, replyInChatId: IdChatIdentifier = to.chat.id, @@ -114,13 +115,13 @@ suspend inline fun TelegramBot.replyWithDice( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, animationType: DiceAnimationType, replyInChatId: IdChatIdentifier = to.chat.id, @@ -131,7 +132,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = replyWithDice(to, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = replyWithDice(to, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) // Location @@ -140,7 +141,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, latitude: Double, longitude: Double, @@ -152,7 +153,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( replyInChatId, latitude, longitude, @@ -169,7 +170,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, location: StaticLocation, replyInChatId: IdChatIdentifier = to.chat.id, @@ -180,7 +181,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( replyInChatId, location, replyInThreadId, @@ -199,7 +200,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, text: String, parseMode: ParseMode? = null, @@ -212,7 +213,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage( +): ContentMessage = sendTextMessage( replyInChatId, text, parseMode, @@ -230,7 +231,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -242,7 +243,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage( +): ContentMessage = sendTextMessage( replyInChatId, entities, linkPreviewOptions, @@ -259,7 +260,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -272,13 +273,13 @@ suspend fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -291,7 +292,7 @@ suspend fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = reply(to, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) // Venue @@ -300,7 +301,7 @@ suspend fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, latitude: Double, longitude: Double, @@ -318,7 +319,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = replyInChatId, latitude = latitude, longitude = longitude, @@ -337,7 +338,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, location: StaticLocation, title: String, @@ -354,7 +355,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = replyInChatId, latitude = location.latitude, longitude = location.longitude, @@ -373,7 +374,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, venue: Venue, replyInChatId: IdChatIdentifier = to.chat.id, @@ -384,7 +385,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = replyInChatId, venue = venue, threadId = replyInThreadId, @@ -399,7 +400,7 @@ suspend inline fun TelegramBot.reply( // Game -suspend inline fun TelegramBot.replyWithGame( +public suspend inline fun TelegramBot.replyWithGame( to: AccessibleMessage, gameShortName: String, replyInChatId: IdChatIdentifier = to.chat.id, @@ -410,11 +411,11 @@ suspend inline fun TelegramBot.replyWithGame( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( replyInChatId, gameShortName, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup ) -suspend inline fun TelegramBot.replyWithGame( +public suspend inline fun TelegramBot.replyWithGame( to: AccessibleMessage, game: Game, replyInChatId: IdChatIdentifier = to.chat.id, @@ -425,11 +426,11 @@ suspend inline fun TelegramBot.replyWithGame( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( replyInChatId, game.title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, game: Game, replyInChatId: IdChatIdentifier = to.chat.id, @@ -440,12 +441,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = replyWithGame(to, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = replyWithGame(to, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) // Animation -suspend inline fun TelegramBot.replyWithAnimation( +public suspend inline fun TelegramBot.replyWithAnimation( to: AccessibleMessage, animation: InputFile, thumb: InputFile? = null, @@ -464,7 +465,7 @@ suspend inline fun TelegramBot.replyWithAnimation( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = replyInChatId, animation = animation, thumb = thumb, @@ -484,7 +485,7 @@ suspend inline fun TelegramBot.replyWithAnimation( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, animation: AnimationFile, text: String? = null, @@ -502,7 +503,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = replyInChatId, animation = animation, text = text, @@ -521,7 +522,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.replyWithAnimation( +public suspend inline fun TelegramBot.replyWithAnimation( to: AccessibleMessage, animation: InputFile, entities: TextSourcesList, @@ -539,7 +540,7 @@ suspend inline fun TelegramBot.replyWithAnimation( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = replyInChatId, animation = animation, thumb = thumb, @@ -558,7 +559,7 @@ suspend inline fun TelegramBot.replyWithAnimation( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, animation: AnimationFile, entities: TextSourcesList, @@ -575,7 +576,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = replyInChatId, animation = animation, entities = entities, @@ -596,7 +597,7 @@ suspend inline fun TelegramBot.reply( // Audio -suspend inline fun TelegramBot.replyWithAudio( +public suspend inline fun TelegramBot.replyWithAudio( to: AccessibleMessage, audio: InputFile, thumb: InputFile? = null, @@ -613,9 +614,9 @@ suspend inline fun TelegramBot.replyWithAudio( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, audio: AudioFile, text: String? = null, @@ -629,9 +630,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.replyWithAudio( +public suspend inline fun TelegramBot.replyWithAudio( to: AccessibleMessage, audio: InputFile, thumb: InputFile? = null, @@ -647,9 +648,9 @@ suspend inline fun TelegramBot.replyWithAudio( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, audio: AudioFile, entities: TextSourcesList, @@ -662,12 +663,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Documents -suspend inline fun TelegramBot.replyWithDocument( +public suspend inline fun TelegramBot.replyWithDocument( to: AccessibleMessage, document: InputFile, thumb: InputFile? = null, @@ -682,9 +683,9 @@ suspend inline fun TelegramBot.replyWithDocument( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, document: DocumentFile, text: String? = null, @@ -698,9 +699,9 @@ suspend inline fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) -suspend inline fun TelegramBot.replyWithDocument( +public suspend inline fun TelegramBot.replyWithDocument( to: AccessibleMessage, document: InputFile, thumb: InputFile? = null, @@ -714,9 +715,9 @@ suspend inline fun TelegramBot.replyWithDocument( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, document: DocumentFile, entities: TextSourcesList, @@ -729,13 +730,13 @@ suspend inline fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) // Media Group @RiskFeature(rawSendingMediaGroupsWarning) -suspend inline fun TelegramBot.replyWithMediaGroup( +public suspend inline fun TelegramBot.replyWithMediaGroup( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, @@ -745,7 +746,7 @@ suspend inline fun TelegramBot.replyWithMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendMediaGroup( +): ContentMessage> = sendMediaGroup( chatId = replyInChatId, media = media, threadId = replyInThreadId, @@ -756,7 +757,7 @@ suspend inline fun TelegramBot.replyWithMediaGroup( replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply) ) -suspend inline fun TelegramBot.replyWithPlaylist( +public suspend inline fun TelegramBot.replyWithPlaylist( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, @@ -766,7 +767,7 @@ suspend inline fun TelegramBot.replyWithPlaylist( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendPlaylist( +): ContentMessage> = sendPlaylist( chatId = replyInChatId, media = media, threadId = replyInThreadId, @@ -777,7 +778,7 @@ suspend inline fun TelegramBot.replyWithPlaylist( replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply) ) -suspend inline fun TelegramBot.replyWithDocuments( +public suspend inline fun TelegramBot.replyWithDocuments( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, @@ -787,7 +788,7 @@ suspend inline fun TelegramBot.replyWithDocuments( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendDocumentsGroup( +): ContentMessage> = sendDocumentsGroup( chatId = replyInChatId, media = media, threadId = replyInThreadId, @@ -798,7 +799,7 @@ suspend inline fun TelegramBot.replyWithDocuments( replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply) ) -suspend inline fun TelegramBot.replyWithGallery( +public suspend inline fun TelegramBot.replyWithGallery( to: AccessibleMessage, media: List, replyInChatId: IdChatIdentifier = to.chat.id, @@ -808,7 +809,7 @@ suspend inline fun TelegramBot.replyWithGallery( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendVisualMediaGroup( +): ContentMessage> = sendVisualMediaGroup( chatId = replyInChatId, media = media, threadId = replyInThreadId, @@ -822,7 +823,7 @@ suspend inline fun TelegramBot.replyWithGallery( // Photo -suspend inline fun TelegramBot.replyWithPhoto( +public suspend inline fun TelegramBot.replyWithPhoto( to: AccessibleMessage, fileId: InputFile, text: String? = null, @@ -837,7 +838,7 @@ suspend inline fun TelegramBot.replyWithPhoto( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = replyInChatId, fileId = fileId, text = text, @@ -853,7 +854,7 @@ suspend inline fun TelegramBot.replyWithPhoto( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, photo: PhotoFile, text: String? = null, @@ -868,7 +869,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = replyInChatId, photo = photo, text = text, @@ -884,7 +885,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, photoSize: PhotoSize, text: String? = null, @@ -899,7 +900,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = replyInChatId, photoSize = photoSize, text = text, @@ -916,7 +917,7 @@ suspend inline fun TelegramBot.reply( ) -suspend inline fun TelegramBot.replyWithPhoto( +public suspend inline fun TelegramBot.replyWithPhoto( to: AccessibleMessage, fileId: InputFile, entities: TextSourcesList, @@ -930,7 +931,7 @@ suspend inline fun TelegramBot.replyWithPhoto( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = replyInChatId, fileId = fileId, entities = entities, @@ -945,7 +946,7 @@ suspend inline fun TelegramBot.replyWithPhoto( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, photo: PhotoFile, entities: TextSourcesList, @@ -959,7 +960,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = replyInChatId, photo = photo, entities = entities, @@ -974,7 +975,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, photoSize: PhotoSize, entities: TextSourcesList, @@ -988,7 +989,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = replyInChatId, photoSize = photoSize, entities = entities, @@ -1006,7 +1007,7 @@ suspend inline fun TelegramBot.reply( // Sticker -suspend inline fun TelegramBot.replyWithSticker( +public suspend inline fun TelegramBot.replyWithSticker( to: AccessibleMessage, sticker: InputFile, emoji: String? = null, @@ -1018,9 +1019,9 @@ suspend inline fun TelegramBot.replyWithSticker( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, sticker: Sticker, emoji: String? = null, @@ -1032,12 +1033,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Videos -suspend inline fun TelegramBot.replyWithVideo( +public suspend inline fun TelegramBot.replyWithVideo( to: AccessibleMessage, video: InputFile, thumb: InputFile? = null, @@ -1056,7 +1057,7 @@ suspend inline fun TelegramBot.replyWithVideo( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = replyInChatId, video = video, thumb = thumb, @@ -1076,7 +1077,7 @@ suspend inline fun TelegramBot.replyWithVideo( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, video: VideoFile, text: String? = null, @@ -1091,7 +1092,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = replyInChatId, video = video, text = text, @@ -1107,7 +1108,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.replyWithVideo( +public suspend inline fun TelegramBot.replyWithVideo( to: AccessibleMessage, video: InputFile, thumb: InputFile? = null, @@ -1125,7 +1126,7 @@ suspend inline fun TelegramBot.replyWithVideo( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = replyInChatId, video = video, thumb = thumb, @@ -1144,7 +1145,7 @@ suspend inline fun TelegramBot.replyWithVideo( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, video: VideoFile, entities: TextSourcesList, @@ -1158,7 +1159,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = replyInChatId, video = video, entities = entities, @@ -1176,7 +1177,7 @@ suspend inline fun TelegramBot.reply( // VideoNotes -suspend inline fun TelegramBot.replyWithVideoNote( +public suspend inline fun TelegramBot.replyWithVideoNote( to: AccessibleMessage, videoNote: InputFile, thumb: InputFile? = null, @@ -1190,7 +1191,7 @@ suspend inline fun TelegramBot.replyWithVideoNote( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote( +): ContentMessage = sendVideoNote( chatId = replyInChatId, videoNote = videoNote, thumb = thumb, @@ -1205,7 +1206,7 @@ suspend inline fun TelegramBot.replyWithVideoNote( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, videoNote: VideoNoteFile, replyInChatId: IdChatIdentifier = to.chat.id, @@ -1216,7 +1217,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote( +): ContentMessage = sendVideoNote( chatId = replyInChatId, videoNote = videoNote, threadId = replyInThreadId, @@ -1231,7 +1232,7 @@ suspend inline fun TelegramBot.reply( // Voice -suspend inline fun TelegramBot.replyWithVoice( +public suspend inline fun TelegramBot.replyWithVoice( to: AccessibleMessage, voice: InputFile, text: String? = null, @@ -1245,9 +1246,9 @@ suspend inline fun TelegramBot.replyWithVoice( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, voice: VoiceFile, text: String? = null, @@ -1260,10 +1261,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) -suspend inline fun TelegramBot.replyWithVoice( +public suspend inline fun TelegramBot.replyWithVoice( to: AccessibleMessage, voice: InputFile, entities: TextSourcesList, @@ -1276,9 +1277,9 @@ suspend inline fun TelegramBot.replyWithVoice( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, voice: VoiceFile, entities: TextSourcesList, @@ -1290,7 +1291,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) // Invoice @@ -1299,7 +1300,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, title: String, description: String, @@ -1325,14 +1326,14 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice(replyInChatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, replyInThreadId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) +): ContentMessage = sendInvoice(replyInChatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, replyInThreadId, disableNotification, protectContent, effectId, ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply == true), replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, title: String, description: String, @@ -1347,7 +1348,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice( +): ContentMessage = sendInvoice( chatId = replyInChatId, title = title, description = description, @@ -1367,7 +1368,7 @@ suspend inline fun TelegramBot.reply( // Polls -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, question: String, options: List, @@ -1384,9 +1385,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, poll: RegularPoll, question: String, @@ -1404,10 +1405,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, questionTextSources: List, options: List, @@ -1423,9 +1424,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, poll: RegularPoll, questionTextSources: List = poll.questionTextSources, @@ -1442,9 +1443,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, question: String, options: List, @@ -1463,9 +1464,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, quizPoll: QuizPoll, question: String, @@ -1486,9 +1487,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, questionTextSources: List, options: List, @@ -1506,9 +1507,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, quizPoll: QuizPoll, explanation: String?, @@ -1528,9 +1529,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, question: String, options: List, @@ -1548,9 +1549,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, quizPoll: QuizPoll, question: String, @@ -1570,9 +1571,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, questionTextSources: List, options: List, @@ -1589,9 +1590,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, quizPoll: QuizPoll, questionTextSources: List = quizPoll.questionTextSources, @@ -1610,10 +1611,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(to.chat.id, to.messageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, poll: Poll, question: String, @@ -1629,7 +1630,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = when (poll) { +): ContentMessage = when (poll) { is RegularPoll -> reply( toChatId = to.chat.id, toMessageId = to.messageId, @@ -1670,7 +1671,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) } -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, poll: Poll, questionTextSources: List = poll.questionTextSources, @@ -1686,7 +1687,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = when (poll) { +): ContentMessage = when (poll) { is RegularPoll -> reply( toChatId = to.chat.id, toMessageId = to.messageId, @@ -1729,7 +1730,7 @@ suspend inline fun TelegramBot.reply( } -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, fromChatId: ChatIdentifier, messageId: MessageId, @@ -1742,7 +1743,7 @@ suspend inline fun TelegramBot.reply( protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( replyInChatId, fromChatId, messageId, @@ -1756,7 +1757,7 @@ suspend inline fun TelegramBot.reply( replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, fromChat: Chat, messageId: MessageId, @@ -1769,9 +1770,9 @@ suspend inline fun TelegramBot.reply( protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = reply(to, fromChat.id, messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +): MessageId = reply(to, fromChat.id, messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( to: AccessibleMessage, copy: AccessibleMessage, text: String? = null, @@ -1783,7 +1784,7 @@ suspend inline fun TelegramBot.reply( protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = reply( +): MessageId = reply( to = to, fromChat = copy.chat, messageId = copy.messageId, @@ -1798,7 +1799,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, content: MessageContent, replyInChatId: IdChatIdentifier = to.chat.id, @@ -1827,7 +1828,7 @@ suspend fun TelegramBot.reply( * * @see handleLiveLocation */ -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, locationsFlow: Flow, liveTimeMillis: Long = defaultLivePeriodDelayMillis, @@ -1838,7 +1839,7 @@ suspend fun TelegramBot.reply( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = handleLiveLocation( +): Unit = handleLiveLocation( replyInChatId, locationsFlow, liveTimeMillis, @@ -1857,7 +1858,7 @@ suspend fun TelegramBot.reply( */ @JvmName("replyLiveLocationWithLocation") @JsName("replyLiveLocationWithLocation") -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, locationsFlow: Flow, liveTimeMillis: Long = defaultLivePeriodDelayMillis, @@ -1889,7 +1890,7 @@ suspend fun TelegramBot.reply( */ @JvmName("replyLiveLocationWithLatLong") @JsName("replyLiveLocationWithLatLong") -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, locationsFlow: Flow>, liveTimeMillis: Long = defaultLivePeriodDelayMillis, @@ -1914,7 +1915,7 @@ suspend fun TelegramBot.reply( ) } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, mediaFile: TelegramMediaFile, replyInChatId: IdChatIdentifier = to.chat.id, @@ -2038,7 +2039,7 @@ suspend fun TelegramBot.reply( } } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, content: TextedMediaContent, text: String?, @@ -2140,7 +2141,7 @@ suspend fun TelegramBot.reply( } } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, content: TextedMediaContent, entities: TextSourcesList, @@ -2235,7 +2236,7 @@ suspend fun TelegramBot.reply( } } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, starCount: Int, media: List, @@ -2267,7 +2268,7 @@ suspend fun TelegramBot.reply( ) } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( to: AccessibleMessage, starCount: Int, media: List, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt index b2b17673eb..9357b164db 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt @@ -25,6 +25,7 @@ import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.games.Game import dev.inmo.tgbotapi.types.location.* import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.payments.PaidMedia import dev.inmo.tgbotapi.types.message.payments.toTelegramMediaPhoto @@ -45,7 +46,7 @@ import kotlin.jvm.JvmName * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, phoneNumber: String, @@ -59,7 +60,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact( +): ContentMessage = sendContact( replyInChatId, phoneNumber, firstName, @@ -77,7 +78,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, contact: Contact, @@ -89,7 +90,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact( +): ContentMessage = sendContact( replyInChatId, contact, replyInThreadId, @@ -108,7 +109,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.replyWithDice( +public suspend inline fun TelegramBot.replyWithDice( toChatId: IdChatIdentifier, toMessageId: MessageId, animationType: DiceAnimationType? = null, @@ -120,13 +121,13 @@ suspend inline fun TelegramBot.replyWithDice( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, animationType: DiceAnimationType, @@ -138,7 +139,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = replyWithDice(toChatId, toMessageId, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = replyWithDice(toChatId, toMessageId, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) // Location @@ -147,7 +148,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, latitude: Double, @@ -160,7 +161,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( replyInChatId, latitude, longitude, @@ -177,7 +178,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, location: StaticLocation, @@ -189,7 +190,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( replyInChatId, location, replyInThreadId, @@ -208,7 +209,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, text: String, @@ -222,7 +223,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage( +): ContentMessage = sendTextMessage( replyInChatId, text, parseMode, @@ -240,7 +241,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, entities: TextSourcesList, @@ -253,7 +254,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage( +): ContentMessage = sendTextMessage( replyInChatId, entities, linkPreviewOptions, @@ -270,7 +271,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, separator: TextSource? = null, @@ -284,13 +285,13 @@ suspend fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, separator: String, @@ -304,7 +305,7 @@ suspend fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) // Venue @@ -313,7 +314,7 @@ suspend fun TelegramBot.reply( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, latitude: Double, @@ -332,7 +333,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = replyInChatId, latitude = latitude, longitude = longitude, @@ -351,7 +352,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, location: StaticLocation, @@ -369,7 +370,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = replyInChatId, latitude = location.latitude, longitude = location.longitude, @@ -388,7 +389,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, venue: Venue, @@ -400,7 +401,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = replyInChatId, venue = venue, threadId = replyInThreadId, @@ -415,7 +416,7 @@ suspend inline fun TelegramBot.reply( // Game -suspend inline fun TelegramBot.replyWithGame( +public suspend inline fun TelegramBot.replyWithGame( toChatId: IdChatIdentifier, toMessageId: MessageId, gameShortName: String, @@ -427,11 +428,11 @@ suspend inline fun TelegramBot.replyWithGame( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( replyInChatId, gameShortName, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup ) -suspend inline fun TelegramBot.replyWithGame( +public suspend inline fun TelegramBot.replyWithGame( toChatId: IdChatIdentifier, toMessageId: MessageId, game: Game, @@ -443,11 +444,11 @@ suspend inline fun TelegramBot.replyWithGame( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( replyInChatId, game.title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, game: Game, @@ -459,12 +460,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = replyWithGame(toChatId, toMessageId, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) +): ContentMessage = replyWithGame(toChatId, toMessageId, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) // Animation -suspend inline fun TelegramBot.replyWithAnimation( +public suspend inline fun TelegramBot.replyWithAnimation( toChatId: IdChatIdentifier, toMessageId: MessageId, animation: InputFile, @@ -484,7 +485,7 @@ suspend inline fun TelegramBot.replyWithAnimation( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( replyInChatId, animation, thumb, @@ -504,7 +505,7 @@ suspend inline fun TelegramBot.replyWithAnimation( replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, animation: AnimationFile, @@ -523,9 +524,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(replyInChatId, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAnimation(replyInChatId, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.replyWithAnimation( +public suspend inline fun TelegramBot.replyWithAnimation( toChatId: IdChatIdentifier, toMessageId: MessageId, animation: InputFile, @@ -544,7 +545,7 @@ suspend inline fun TelegramBot.replyWithAnimation( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( replyInChatId, animation, thumb, @@ -563,7 +564,7 @@ suspend inline fun TelegramBot.replyWithAnimation( replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, animation: AnimationFile, @@ -581,12 +582,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(replyInChatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAnimation(replyInChatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Audio -suspend inline fun TelegramBot.replyWithAudio( +public suspend inline fun TelegramBot.replyWithAudio( toChatId: IdChatIdentifier, toMessageId: MessageId, audio: InputFile, @@ -604,9 +605,9 @@ suspend inline fun TelegramBot.replyWithAudio( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, audio: AudioFile, @@ -621,9 +622,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.replyWithAudio( +public suspend inline fun TelegramBot.replyWithAudio( toChatId: IdChatIdentifier, toMessageId: MessageId, audio: InputFile, @@ -640,9 +641,9 @@ suspend inline fun TelegramBot.replyWithAudio( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, audio: AudioFile, @@ -656,12 +657,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Documents -suspend inline fun TelegramBot.replyWithDocument( +public suspend inline fun TelegramBot.replyWithDocument( toChatId: IdChatIdentifier, toMessageId: MessageId, document: InputFile, @@ -677,9 +678,9 @@ suspend inline fun TelegramBot.replyWithDocument( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, document: DocumentFile, @@ -694,9 +695,9 @@ suspend inline fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) -suspend inline fun TelegramBot.replyWithDocument( +public suspend inline fun TelegramBot.replyWithDocument( toChatId: IdChatIdentifier, toMessageId: MessageId, document: InputFile, @@ -711,9 +712,9 @@ suspend inline fun TelegramBot.replyWithDocument( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, document: DocumentFile, @@ -727,13 +728,13 @@ suspend inline fun TelegramBot.reply( allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) // Media Group @RiskFeature(rawSendingMediaGroupsWarning) -suspend inline fun TelegramBot.replyWithMediaGroup( +public suspend inline fun TelegramBot.replyWithMediaGroup( toChatId: IdChatIdentifier, toMessageId: MessageId, media: List, @@ -744,9 +745,9 @@ suspend inline fun TelegramBot.replyWithMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) +): ContentMessage> = sendMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) -suspend inline fun TelegramBot.replyWithPlaylist( +public suspend inline fun TelegramBot.replyWithPlaylist( toChatId: IdChatIdentifier, toMessageId: MessageId, media: List, @@ -757,9 +758,9 @@ suspend inline fun TelegramBot.replyWithPlaylist( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendPlaylist(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) +): ContentMessage> = sendPlaylist(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) -suspend inline fun TelegramBot.replyWithDocuments( +public suspend inline fun TelegramBot.replyWithDocuments( toChatId: IdChatIdentifier, toMessageId: MessageId, media: List, @@ -770,9 +771,9 @@ suspend inline fun TelegramBot.replyWithDocuments( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendDocumentsGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) +): ContentMessage> = sendDocumentsGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) -suspend inline fun TelegramBot.replyWithGallery( +public suspend inline fun TelegramBot.replyWithGallery( toChatId: IdChatIdentifier, toMessageId: MessageId, media: List, @@ -783,12 +784,12 @@ suspend inline fun TelegramBot.replyWithGallery( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) +): ContentMessage> = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) // Photo -suspend inline fun TelegramBot.replyWithPhoto( +public suspend inline fun TelegramBot.replyWithPhoto( toChatId: IdChatIdentifier, toMessageId: MessageId, fileId: InputFile, @@ -804,9 +805,9 @@ suspend inline fun TelegramBot.replyWithPhoto( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, fileId, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendPhoto(replyInChatId, fileId, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, photo: PhotoFile, @@ -822,9 +823,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photo, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendPhoto(replyInChatId, photo, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, photoSize: PhotoSize, @@ -840,10 +841,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendPhoto(replyInChatId, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.replyWithPhoto( +public suspend inline fun TelegramBot.replyWithPhoto( toChatId: IdChatIdentifier, toMessageId: MessageId, fileId: InputFile, @@ -858,9 +859,9 @@ suspend inline fun TelegramBot.replyWithPhoto( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, fileId, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendPhoto(replyInChatId, fileId, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, photo: PhotoFile, @@ -875,9 +876,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photo, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendPhoto(replyInChatId, photo, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, photoSize: PhotoSize, @@ -892,12 +893,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(replyInChatId, photoSize, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendPhoto(replyInChatId, photoSize, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Sticker -suspend inline fun TelegramBot.replyWithSticker( +public suspend inline fun TelegramBot.replyWithSticker( toChatId: IdChatIdentifier, toMessageId: MessageId, sticker: InputFile, @@ -910,9 +911,9 @@ suspend inline fun TelegramBot.replyWithSticker( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, sticker: Sticker, @@ -925,12 +926,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Videos -suspend inline fun TelegramBot.replyWithVideo( +public suspend inline fun TelegramBot.replyWithVideo( toChatId: IdChatIdentifier, toMessageId: MessageId, video: InputFile, @@ -950,9 +951,9 @@ suspend inline fun TelegramBot.replyWithVideo( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, thumb, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVideo(replyInChatId, video, thumb, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, video: VideoFile, @@ -968,9 +969,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVideo(replyInChatId, video, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.replyWithVideo( +public suspend inline fun TelegramBot.replyWithVideo( toChatId: IdChatIdentifier, toMessageId: MessageId, video: InputFile, @@ -989,9 +990,9 @@ suspend inline fun TelegramBot.replyWithVideo( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, thumb, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVideo(replyInChatId, video, thumb, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, video: VideoFile, @@ -1006,12 +1007,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(replyInChatId, video, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVideo(replyInChatId, video, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // VideoNotes -suspend inline fun TelegramBot.replyWithVideoNote( +public suspend inline fun TelegramBot.replyWithVideoNote( toChatId: IdChatIdentifier, toMessageId: MessageId, videoNote: InputFile, @@ -1026,9 +1027,9 @@ suspend inline fun TelegramBot.replyWithVideoNote( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(replyInChatId, videoNote, thumb, duration, size, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVideoNote(replyInChatId, videoNote, thumb, duration, size, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, videoNote: VideoNoteFile, @@ -1040,12 +1041,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Voice -suspend inline fun TelegramBot.replyWithVoice( +public suspend inline fun TelegramBot.replyWithVoice( toChatId: IdChatIdentifier, toMessageId: MessageId, voice: InputFile, @@ -1060,9 +1061,9 @@ suspend inline fun TelegramBot.replyWithVoice( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, voice: VoiceFile, @@ -1076,10 +1077,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.replyWithVoice( +public suspend inline fun TelegramBot.replyWithVoice( toChatId: IdChatIdentifier, toMessageId: MessageId, voice: InputFile, @@ -1093,9 +1094,9 @@ suspend inline fun TelegramBot.replyWithVoice( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, voice: VoiceFile, @@ -1108,7 +1109,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Invoice @@ -1117,7 +1118,7 @@ suspend inline fun TelegramBot.reply( * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, title: String, @@ -1144,12 +1145,12 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice(replyInChatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, replyInThreadId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendInvoice(replyInChatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, replyInThreadId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) // Polls -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, question: String, @@ -1167,9 +1168,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, poll: RegularPoll, @@ -1188,10 +1189,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, questionTextSources: List, @@ -1208,9 +1209,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, poll: RegularPoll, @@ -1228,9 +1229,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, question: String, @@ -1250,9 +1251,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, quizPoll: QuizPoll, @@ -1274,9 +1275,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, questionTextSources: List, @@ -1295,9 +1296,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, quizPoll: QuizPoll, @@ -1318,9 +1319,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, question: String, @@ -1339,9 +1340,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, quizPoll: QuizPoll, @@ -1362,9 +1363,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, questionTextSources: List, @@ -1382,9 +1383,9 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, quizPoll: QuizPoll, @@ -1404,10 +1405,10 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) +): ContentMessage = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, poll: Poll, @@ -1424,7 +1425,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = when (poll) { +): ContentMessage = when (poll) { is RegularPoll -> reply( toChatId = toChatId, toMessageId = toMessageId, @@ -1464,7 +1465,7 @@ suspend inline fun TelegramBot.reply( replyMarkup = replyMarkup ) } -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, poll: Poll, @@ -1481,7 +1482,7 @@ suspend inline fun TelegramBot.reply( effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = when (poll) { +): ContentMessage = when (poll) { is RegularPoll -> reply( toChatId = toChatId, toMessageId = toMessageId, @@ -1524,7 +1525,7 @@ suspend inline fun TelegramBot.reply( } -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, fromChatId: ChatIdentifier, @@ -1538,7 +1539,7 @@ suspend inline fun TelegramBot.reply( protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = copyMessage( +): MessageId = copyMessage( replyInChatId, fromChatId, messageId, @@ -1552,7 +1553,7 @@ suspend inline fun TelegramBot.reply( replyMarkup ) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, fromChat: Chat, @@ -1566,9 +1567,9 @@ suspend inline fun TelegramBot.reply( protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +): MessageId = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) -suspend inline fun TelegramBot.reply( +public suspend inline fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, copy: AccessibleMessage, @@ -1581,9 +1582,9 @@ suspend inline fun TelegramBot.reply( protectContent: Boolean = false, allowSendingWithoutReply: Boolean? = null, replyMarkup: KeyboardMarkup? = null -) = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) +): MessageId = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup) -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, content: MessageContent, @@ -1615,7 +1616,7 @@ suspend fun TelegramBot.reply( * * @see handleLiveLocation */ -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, locationsFlow: Flow, @@ -1627,7 +1628,7 @@ suspend fun TelegramBot.reply( protectContent: Boolean = false, effectId: EffectId? = null, allowSendingWithoutReply: Boolean? = null -) = handleLiveLocation( +): Unit = handleLiveLocation( replyInChatId, locationsFlow, liveTimeMillis, @@ -1646,7 +1647,7 @@ suspend fun TelegramBot.reply( */ @JvmName("replyLiveLocationWithLocationChatIdAndMessageId") @JsName("replyLiveLocationWithLocationChatIdAndMessageId") -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, locationsFlow: Flow, @@ -1679,7 +1680,7 @@ suspend fun TelegramBot.reply( */ @JvmName("replyLiveLocationWithLatLongChatIdAndMessageId") @JsName("replyLiveLocationWithLatLongChatIdAndMessageId") -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, locationsFlow: Flow>, @@ -1705,7 +1706,7 @@ suspend fun TelegramBot.reply( ) } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, mediaFile: TelegramMediaFile, @@ -1839,7 +1840,7 @@ suspend fun TelegramBot.reply( } } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, content: TextedMediaContent, @@ -1948,7 +1949,7 @@ suspend fun TelegramBot.reply( } } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, content: TextedMediaContent, @@ -2049,7 +2050,7 @@ suspend fun TelegramBot.reply( } } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, starCount: Int, @@ -2082,7 +2083,7 @@ suspend fun TelegramBot.reply( ) } -suspend fun TelegramBot.reply( +public suspend fun TelegramBot.reply( toChatId: IdChatIdentifier, toMessageId: MessageId, starCount: Int, 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 7d6cf5ace0..fe534ff56b 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 @@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent /** * This method will send [content] to the [chatId] as is */ -suspend inline fun TelegramBot.resend( +public suspend inline fun TelegramBot.resend( chatId: ChatIdentifier, content: T, messageThreadId: MessageThreadId? = chatId.threadId, @@ -19,7 +19,7 @@ suspend inline fun TelegramBot.resend( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( content.createResend( chatId = chatId, messageThreadId = messageThreadId, @@ -34,7 +34,7 @@ suspend inline fun TelegramBot.resend( /** * This method will send [content] to the [chat] as is */ -suspend inline fun TelegramBot.resend( +public suspend inline fun TelegramBot.resend( chat: Chat, content: T, messageThreadId: MessageThreadId? = chat.id.threadId, @@ -43,7 +43,7 @@ suspend inline fun TelegramBot.resend( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = resend( +): ContentMessage = resend( chatId = chat.id, content = content, messageThreadId = messageThreadId, @@ -59,7 +59,7 @@ suspend inline fun TelegramBot.resend( * native methods for data sending (like [dev.inmo.tgbotapi.extensions.api.send.media.sendPhoto] if inoming content is * [dev.inmo.tgbotapi.types.message.content.PhotoContent]) */ -suspend inline fun TelegramBot.resend( +public suspend inline fun TelegramBot.resend( chatId: ChatIdentifier, message: ContentMessage, messageThreadId: MessageThreadId? = chatId.threadId, @@ -68,7 +68,7 @@ suspend inline fun TelegramBot.resend( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = resend( +): ContentMessage = resend( chatId = chatId, content = message.content, messageThreadId = messageThreadId, @@ -84,7 +84,7 @@ suspend inline fun TelegramBot.resend( * native methods for data sending (like [dev.inmo.tgbotapi.extensions.api.send.media.sendPhoto] if inoming content is * [dev.inmo.tgbotapi.types.message.content.PhotoContent]) */ -suspend inline fun TelegramBot.resend( +public suspend inline fun TelegramBot.resend( chat: Chat, message: ContentMessage, messageThreadId: MessageThreadId? = chat.id.threadId, @@ -93,7 +93,7 @@ suspend inline fun TelegramBot.resend( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = resend( +): ContentMessage = resend( chatId = chat.id, message = message, messageThreadId = messageThreadId, 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 d7bf65dfa8..487d62d498 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 @@ -10,147 +10,147 @@ 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( +public suspend fun TelegramBot.sendBotAction( chatId: ChatIdentifier, action: BotAction, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = execute( +): Boolean = execute( SendAction(chatId, action, threadId, businessConnectionId) ) -suspend fun TelegramBot.sendBotAction( +public suspend fun TelegramBot.sendBotAction( chat: Chat, action: BotAction, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat.id, action, threadId, businessConnectionId) +): Boolean = sendBotAction(chat.id, action, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionTyping( +public suspend fun TelegramBot.sendActionTyping( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, TypingAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, TypingAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadPhoto( +public suspend fun TelegramBot.sendActionUploadPhoto( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, UploadPhotoAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, UploadPhotoAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionRecordVideo( +public suspend fun TelegramBot.sendActionRecordVideo( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, RecordVideoAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, RecordVideoAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadVideo( +public suspend fun TelegramBot.sendActionUploadVideo( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, UploadVideoAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, UploadVideoAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionRecordVoice( +public suspend fun TelegramBot.sendActionRecordVoice( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, RecordVoiceAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, RecordVoiceAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadVoice( +public suspend fun TelegramBot.sendActionUploadVoice( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, UploadVoiceAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, UploadVoiceAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadDocument( +public suspend fun TelegramBot.sendActionUploadDocument( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, UploadDocumentAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, UploadDocumentAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionFindLocation( +public suspend fun TelegramBot.sendActionFindLocation( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, FindLocationAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, FindLocationAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionRecordVideoNote( +public suspend fun TelegramBot.sendActionRecordVideoNote( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadVideoNote( +public suspend fun TelegramBot.sendActionUploadVideoNote( chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId -) = sendBotAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionTyping( +public suspend fun TelegramBot.sendActionTyping( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, TypingAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, TypingAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadPhoto( +public suspend fun TelegramBot.sendActionUploadPhoto( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, UploadPhotoAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, UploadPhotoAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionRecordVideo( +public suspend fun TelegramBot.sendActionRecordVideo( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, RecordVideoAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, RecordVideoAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadVideo( +public suspend fun TelegramBot.sendActionUploadVideo( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, UploadVideoAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, UploadVideoAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionRecordVoice( +public suspend fun TelegramBot.sendActionRecordVoice( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, RecordVoiceAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, RecordVoiceAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadVoice( +public suspend fun TelegramBot.sendActionUploadVoice( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, UploadVoiceAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, UploadVoiceAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadDocument( +public suspend fun TelegramBot.sendActionUploadDocument( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, UploadDocumentAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, UploadDocumentAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionFindLocation( +public suspend fun TelegramBot.sendActionFindLocation( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, FindLocationAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, FindLocationAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionRecordVideoNote( +public suspend fun TelegramBot.sendActionRecordVideoNote( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, RecordVideoNoteAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, RecordVideoNoteAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionUploadVideoNote( +public suspend fun TelegramBot.sendActionUploadVideoNote( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, UploadVideoNoteAction, threadId, businessConnectionId) +): Boolean = sendBotAction(chat, UploadVideoNoteAction, threadId, businessConnectionId) -suspend fun TelegramBot.sendActionChooseStickerAction( +public suspend fun TelegramBot.sendActionChooseStickerAction( chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId -) = sendBotAction(chat, ChooseStickerAction, threadId, businessConnectionId) +): Boolean = 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 11ed6b9410..17d5e175e8 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 @@ -12,10 +12,10 @@ import kotlinx.coroutines.* import kotlin.contracts.* private const val refreshTime: MilliSeconds = (botActionActualityTime - 1) * 1000L -typealias TelegramBotActionCallback = suspend TelegramBot.() -> T +public typealias TelegramBotActionCallback = suspend TelegramBot.() -> T @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withAction( +public suspend fun TelegramBot.withAction( actionRequest: SendAction, block: TelegramBotActionCallback ): T { @@ -36,7 +36,7 @@ suspend fun TelegramBot.withAction( } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withAction( +public suspend fun TelegramBot.withAction( chatId: IdChatIdentifier, action: BotAction, threadId: MessageThreadId? = chatId.threadId, @@ -53,7 +53,7 @@ suspend fun TelegramBot.withAction( } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withAction( +public suspend fun TelegramBot.withAction( chat: Chat, action: BotAction, threadId: MessageThreadId? = chat.id.threadId, @@ -73,77 +73,77 @@ suspend fun TelegramBot.withAction( } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withTypingAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadPhotoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadDocumentAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withFindLocationAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { +public suspend fun TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback) : T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } @@ -152,77 +152,77 @@ suspend fun TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, th @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withTypingAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadPhotoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadDocumentAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withFindLocationAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withRecordVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withUploadVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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, businessConnectionId, block) } @OptIn(ExperimentalContracts::class) -suspend fun TelegramBot.withChooseStickerAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback) : T { +public 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) } 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 037b50876c..187ba724b8 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 @@ -6,12 +6,14 @@ 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.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.ContactContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendContact( +public suspend fun TelegramBot.sendContact( chatId: ChatIdentifier, phoneNumber: String, firstName: String, @@ -23,7 +25,7 @@ suspend fun TelegramBot.sendContact( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendContact( chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -33,7 +35,7 @@ suspend fun TelegramBot.sendContact( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendContact( +public suspend fun TelegramBot.sendContact( chatId: ChatIdentifier, contact: Contact, threadId: MessageThreadId? = chatId.threadId, @@ -43,7 +45,7 @@ suspend fun TelegramBot.sendContact( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendContact( chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -53,7 +55,7 @@ suspend fun TelegramBot.sendContact( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendContact( +public suspend fun TelegramBot.sendContact( chat: Chat, phoneNumber: String, firstName: String, @@ -65,7 +67,7 @@ suspend fun TelegramBot.sendContact( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact( +): ContentMessage = sendContact( chat.id, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -73,7 +75,7 @@ suspend fun TelegramBot.sendContact( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendContact( +public suspend fun TelegramBot.sendContact( chat: Chat, contact: Contact, threadId: MessageThreadId? = chat.id.threadId, @@ -83,6 +85,6 @@ suspend fun TelegramBot.sendContact( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact( +): ContentMessage = sendContact( chat.id, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 355dcedae2..1e6549bedf 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 @@ -7,12 +7,14 @@ 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 +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.DiceContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendDice( +public suspend fun TelegramBot.sendDice( chatId: ChatIdentifier, animationType: DiceAnimationType? = null, threadId: MessageThreadId? = chatId.threadId, @@ -22,7 +24,7 @@ suspend fun TelegramBot.sendDice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ) @@ -30,7 +32,7 @@ suspend fun TelegramBot.sendDice( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendDice( +public suspend fun TelegramBot.sendDice( chat: Chat, animationType: DiceAnimationType? = null, threadId: MessageThreadId? = chat.id.threadId, @@ -40,4 +42,4 @@ suspend fun TelegramBot.sendDice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 bdb19dfcb3..525256ff67 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 @@ -7,12 +7,14 @@ 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 +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.LocationContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -27,7 +29,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendLiveLocation( chatId, latitude, @@ -50,7 +52,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chatId: ChatIdentifier, location: Location, livePeriod: Seconds, @@ -64,7 +66,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( chatId, location.latitude, location.longitude, @@ -85,7 +87,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chat: Chat, latitude: Double, longitude: Double, @@ -100,7 +102,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( chat.id, latitude, longitude, @@ -121,7 +123,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chat: Chat, location: Location, livePeriod: Seconds, @@ -135,7 +137,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( chatId = chat.id, latitude = location.latitude, longitude = location.longitude, @@ -156,7 +158,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLiveLocation( +public suspend fun TelegramBot.sendLiveLocation( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -171,13 +173,13 @@ suspend fun TelegramBot.sendLiveLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLiveLocation( +public suspend fun TelegramBot.sendLiveLocation( chatId: ChatIdentifier, location: Location, livePeriod: Seconds, @@ -191,13 +193,13 @@ suspend fun TelegramBot.sendLiveLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLiveLocation( +public suspend fun TelegramBot.sendLiveLocation( chat: Chat, latitude: Double, longitude: Double, @@ -212,13 +214,13 @@ suspend fun TelegramBot.sendLiveLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLiveLocation( +public suspend fun TelegramBot.sendLiveLocation( chat: Chat, location: Location, livePeriod: Seconds, @@ -232,4 +234,4 @@ suspend fun TelegramBot.sendLiveLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 2c4fa0e946..f16a4651a5 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 @@ -8,6 +8,8 @@ import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.utils.EntitiesBuilderBody import dev.inmo.tgbotapi.utils.buildEntities @@ -16,7 +18,7 @@ import dev.inmo.tgbotapi.utils.buildEntities * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendMessage( +public suspend fun TelegramBot.sendMessage( chatId: ChatIdentifier, text: String, parseMode: ParseMode? = null, @@ -28,7 +30,7 @@ suspend fun TelegramBot.sendMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendTextMessage( chatId, text, @@ -48,7 +50,7 @@ suspend fun TelegramBot.sendMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendTextMessage( +public suspend fun TelegramBot.sendTextMessage( chatId: ChatIdentifier, text: String, parseMode: ParseMode? = null, @@ -60,7 +62,7 @@ suspend fun TelegramBot.sendTextMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendMessage( +): ContentMessage = sendMessage( chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -68,7 +70,7 @@ suspend fun TelegramBot.sendTextMessage( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendTextMessage( +public suspend fun TelegramBot.sendTextMessage( chat: Chat, text: String, parseMode: ParseMode? = null, @@ -80,14 +82,14 @@ suspend fun TelegramBot.sendTextMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendMessage( +public suspend fun TelegramBot.sendMessage( chat: Chat, text: String, parseMode: ParseMode? = null, @@ -99,13 +101,13 @@ suspend fun TelegramBot.sendMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendMessage( +public suspend fun TelegramBot.sendMessage( chatId: ChatIdentifier, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -116,7 +118,7 @@ suspend fun TelegramBot.sendMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ) @@ -124,7 +126,7 @@ suspend fun TelegramBot.sendMessage( * @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( +public suspend fun TelegramBot.sendMessage( chatId: ChatIdentifier, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -136,14 +138,14 @@ suspend fun TelegramBot.sendMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @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( +public suspend fun TelegramBot.sendMessage( chatId: ChatIdentifier, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -155,13 +157,13 @@ suspend fun TelegramBot.sendMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendTextMessage( +public suspend fun TelegramBot.sendTextMessage( chatId: ChatIdentifier, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -172,7 +174,7 @@ suspend fun TelegramBot.sendTextMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendMessage( +): ContentMessage = sendMessage( chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -180,7 +182,7 @@ suspend fun TelegramBot.sendTextMessage( * @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( +public suspend fun TelegramBot.sendTextMessage( chatId: ChatIdentifier, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -192,14 +194,14 @@ suspend fun TelegramBot.sendTextMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @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( +public suspend fun TelegramBot.sendTextMessage( chatId: ChatIdentifier, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -211,13 +213,13 @@ suspend fun TelegramBot.sendTextMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendMessage( +public suspend fun TelegramBot.sendMessage( chat: Chat, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -228,13 +230,13 @@ suspend fun TelegramBot.sendMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @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( +public suspend fun TelegramBot.sendMessage( chat: Chat, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -246,14 +248,14 @@ suspend fun TelegramBot.sendMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @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( +public suspend fun TelegramBot.sendMessage( chat: Chat, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -265,14 +267,14 @@ suspend fun TelegramBot.sendMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendTextMessage( +public suspend fun TelegramBot.sendTextMessage( chat: Chat, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -283,13 +285,13 @@ suspend fun TelegramBot.sendTextMessage( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @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( +public suspend fun TelegramBot.sendTextMessage( chat: Chat, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -301,14 +303,14 @@ suspend fun TelegramBot.sendTextMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @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( +public suspend fun TelegramBot.sendTextMessage( chat: Chat, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -320,4 +322,4 @@ suspend fun TelegramBot.sendTextMessage( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 4bc8049c55..52817c8cfe 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 @@ -7,12 +7,14 @@ 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 +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.LocationContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -23,7 +25,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendStaticLocation( chatId, latitude, @@ -42,7 +44,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chatId: ChatIdentifier, location: Location, threadId: MessageThreadId? = chatId.threadId, @@ -52,7 +54,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( chatId, location.latitude, location.longitude, @@ -69,7 +71,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chat: Chat, latitude: Double, longitude: Double, @@ -80,7 +82,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( chat.id, latitude, longitude, @@ -97,7 +99,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendLocation( +public suspend fun TelegramBot.sendLocation( chat: Chat, location: Location, threadId: MessageThreadId? = chat.id.threadId, @@ -107,7 +109,7 @@ suspend fun TelegramBot.sendLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation( +): ContentMessage = sendLocation( chat.id, location.latitude, location.longitude, @@ -124,7 +126,7 @@ suspend fun TelegramBot.sendLocation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendStaticLocation( +public suspend fun TelegramBot.sendStaticLocation( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -135,13 +137,13 @@ suspend fun TelegramBot.sendStaticLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendStaticLocation( +public suspend fun TelegramBot.sendStaticLocation( chatId: ChatIdentifier, location: Location, threadId: MessageThreadId? = chatId.threadId, @@ -151,13 +153,13 @@ suspend fun TelegramBot.sendStaticLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendStaticLocation( +public suspend fun TelegramBot.sendStaticLocation( chat: Chat, latitude: Double, longitude: Double, @@ -168,13 +170,13 @@ suspend fun TelegramBot.sendStaticLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendStaticLocation( +public suspend fun TelegramBot.sendStaticLocation( chat: Chat, location: Location, threadId: MessageThreadId? = chat.id.threadId, @@ -184,4 +186,4 @@ suspend fun TelegramBot.sendStaticLocation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 fd7e73e9ea..1223e811f1 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 @@ -7,13 +7,15 @@ 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 +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.VenueContent import dev.inmo.tgbotapi.types.venue.Venue /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVenue( +public suspend fun TelegramBot.sendVenue( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -30,7 +32,7 @@ suspend fun TelegramBot.sendVenue( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVenue( chatId = chatId, latitude = latitude, @@ -55,7 +57,7 @@ suspend fun TelegramBot.sendVenue( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVenue( +public suspend fun TelegramBot.sendVenue( chat: Chat, latitude: Double, longitude: Double, @@ -72,7 +74,7 @@ suspend fun TelegramBot.sendVenue( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = chat.id, latitude = latitude, longitude = longitude, @@ -95,7 +97,7 @@ suspend fun TelegramBot.sendVenue( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVenue( +public suspend fun TelegramBot.sendVenue( chatId: ChatIdentifier, location: StaticLocation, title: String, @@ -111,7 +113,7 @@ suspend fun TelegramBot.sendVenue( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = chatId, latitude = location.latitude, longitude = location.longitude, @@ -134,7 +136,7 @@ suspend fun TelegramBot.sendVenue( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVenue( +public suspend fun TelegramBot.sendVenue( chat: Chat, location: StaticLocation, title: String, @@ -150,7 +152,7 @@ suspend fun TelegramBot.sendVenue( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = chat.id, latitude = location.latitude, longitude = location.longitude, @@ -173,7 +175,7 @@ suspend fun TelegramBot.sendVenue( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVenue( +public suspend fun TelegramBot.sendVenue( chatId: ChatIdentifier, venue: Venue, threadId: MessageThreadId? = chatId.threadId, @@ -183,7 +185,7 @@ suspend fun TelegramBot.sendVenue( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVenue( chatId = chatId, venue = venue, @@ -201,7 +203,7 @@ suspend fun TelegramBot.sendVenue( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVenue( +public suspend fun TelegramBot.sendVenue( chat: Chat, venue: Venue, threadId: MessageThreadId? = chat.id.threadId, @@ -211,7 +213,7 @@ suspend fun TelegramBot.sendVenue( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue( +): ContentMessage = sendVenue( chatId = chat.id, venue = venue, threadId = threadId, 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 eac023fe7a..22bad29ebb 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 @@ -21,6 +21,7 @@ import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.StaticLocation import dev.inmo.tgbotapi.types.media.* import dev.inmo.tgbotapi.types.message.ParseMode +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList @@ -34,25 +35,25 @@ import kotlin.jvm.JvmName /** * Will execute [sendBotAction] request */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, action: BotAction -) = sendBotAction(chatId, action) +): Boolean = sendBotAction(chatId, action) /** * Will execute [sendBotAction] request */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, action: BotAction -) = sendBotAction(chat, action) +): Boolean = sendBotAction(chat, action) /** * Will execute [sendAnimation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, animation: AnimationFile, text: String? = null, @@ -69,14 +70,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chatId, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAnimation(chatId, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAnimation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, animation: AnimationFile, text: String? = null, @@ -93,14 +94,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAnimation(chat, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAnimation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, animation: AnimationFile, entities: TextSourcesList, @@ -116,14 +117,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAnimation(chatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAnimation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, animation: AnimationFile, entities: TextSourcesList, @@ -139,14 +140,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation(chat, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAnimation(chat, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAudio] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, audio: AudioFile, text: String? = null, @@ -159,14 +160,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chatId, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAudio] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, audio: AudioFile, text: String? = null, @@ -179,14 +180,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chat, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAudio] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chatId: ChatIdentifier, audio: AudioFile, entities: TextSourcesList, @@ -198,14 +199,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chatId, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendAudio] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chat: Chat, audio: AudioFile, entities: TextSourcesList, @@ -217,14 +218,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chat, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendContact] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, phoneNumber: String, firstName: String, @@ -236,14 +237,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendContact(chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendContact] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, contact: Contact, threadId: MessageThreadId? = chatId.threadId, @@ -253,14 +254,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendContact(chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendContact] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, phoneNumber: String, firstName: String, @@ -272,14 +273,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chat, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendContact(chat, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendContact] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, contact: Contact, threadId: MessageThreadId? = chat.id.threadId, @@ -289,14 +290,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendContact(chat, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendContact(chat, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendDice] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, animationType: DiceAnimationType, threadId: MessageThreadId? = chatId.threadId, @@ -306,14 +307,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendDice] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, animationType: DiceAnimationType, threadId: MessageThreadId? = chat.id.threadId, @@ -323,14 +324,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendDice(chat, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendDice(chat, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendDocument] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, document: DocumentFile, text: String? = null, @@ -343,14 +344,14 @@ suspend fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chatId, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chatId, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendDocument] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, document: DocumentFile, text: String? = null, @@ -363,14 +364,14 @@ suspend fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chat, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendDocument] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chatId: ChatIdentifier, document: DocumentFile, entities: TextSourcesList, @@ -382,14 +383,14 @@ suspend inline fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chatId, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chatId, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendDocument] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chat: Chat, document: DocumentFile, entities: TextSourcesList, @@ -401,14 +402,14 @@ suspend inline fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chat, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * Will execute [sendGame] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, game: Game, threadId: MessageThreadId? = chatId.threadId, @@ -418,14 +419,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame(chatId, game, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendGame(chatId, game, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendGame] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, game: Game, threadId: MessageThreadId? = chat.id.threadId, @@ -435,14 +436,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame(chat, game, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendGame(chat, game, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendInvoice] request * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: IdChatIdentifier, title: String, description: String, @@ -467,14 +468,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendInvoice] request * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( user: CommonUser, title: String, description: String, @@ -498,14 +499,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice(user, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendInvoice(user, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -516,14 +517,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendStaticLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, location: StaticLocation, threadId: MessageThreadId? = chatId.threadId, @@ -533,14 +534,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chatId, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendStaticLocation(chatId, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, latitude: Double, longitude: Double, @@ -551,14 +552,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chat, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendStaticLocation(chat, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendStaticLocation] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, location: StaticLocation, threadId: MessageThreadId? = chat.id.threadId, @@ -568,14 +569,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendStaticLocation(chat, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendStaticLocation(chat, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendTextMessage] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, text: String, parseMode: ParseMode? = null, @@ -587,14 +588,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendTextMessage] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, text: String, parseMode: ParseMode? = null, @@ -606,14 +607,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chat, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendTextMessage] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -624,13 +625,13 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -642,14 +643,14 @@ suspend fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -661,7 +662,7 @@ suspend fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = send(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** @@ -669,7 +670,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, entities: TextSourcesList, linkPreviewOptions: LinkPreviewOptions? = null, @@ -680,13 +681,13 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendTextMessage(chat, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendTextMessage(chat, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, separator: TextSource? = null, linkPreviewOptions: LinkPreviewOptions? = null, @@ -698,14 +699,14 @@ suspend fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, separator: String, linkPreviewOptions: LinkPreviewOptions? = null, @@ -717,14 +718,14 @@ suspend fun TelegramBot.send( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, builderBody: EntitiesBuilderBody -) = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = send(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, photo: PhotoFile, text: String? = null, @@ -738,14 +739,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photo, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chatId, photo, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPaidMedia] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, starCount: Int, media: List, @@ -758,14 +759,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPaidMedia(chat, starCount, media, text, parseMode, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) +): ContentMessage = sendPaidMedia(chat, starCount, media, text, parseMode, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPaidMedia] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, starCount: Int, media: List, @@ -778,14 +779,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPaidMedia(chatId, starCount, media, text, parseMode, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) +): ContentMessage = sendPaidMedia(chatId, starCount, media, text, parseMode, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPaidMedia] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, starCount: Int, media: List, @@ -797,14 +798,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPaidMedia(chat, starCount, media, entities, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) +): ContentMessage = sendPaidMedia(chat, starCount, media, entities, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPaidMedia] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, starCount: Int, media: List, @@ -816,14 +817,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPaidMedia(chatId, starCount, media, entities, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) +): ContentMessage = sendPaidMedia(chatId, starCount, media, entities, showCaptionAboveMedia, threadId, businessConnectionId, disableNotification, protectContent, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, photo: PhotoFile, text: String? = null, @@ -837,14 +838,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photo, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chat, photo, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, photoSize: PhotoSize, text: String? = null, @@ -858,14 +859,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chatId, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, photoSize: PhotoSize, text: String? = null, @@ -879,14 +880,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chat, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chatId: ChatIdentifier, photo: PhotoFile, entities: TextSourcesList, @@ -899,14 +900,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photo, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chatId, photo, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chat: Chat, photo: PhotoFile, entities: TextSourcesList, @@ -919,14 +920,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photo, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chat, photo, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chatId: ChatIdentifier, photoSize: PhotoSize, entities: TextSourcesList, @@ -939,14 +940,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chatId, photoSize, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chatId, photoSize, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendPhoto] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chat: Chat, photoSize: PhotoSize, entities: TextSourcesList, @@ -959,14 +960,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto(chat, photoSize, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendPhoto(chat, photoSize, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, question: String, options: List, @@ -982,14 +983,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, questionTextSources: List, options: List, @@ -1004,14 +1005,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, poll: RegularPoll, question: String, @@ -1028,14 +1029,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, poll: RegularPoll, questionTextSources: List = poll.questionTextSources, @@ -1051,14 +1052,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, question: String, options: List, @@ -1074,14 +1075,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chat.id, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chat.id, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, poll: RegularPoll, question: String, @@ -1098,14 +1099,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chat.id, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chat.id, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendRegularPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, poll: RegularPoll, questionTextSources: List = poll.questionTextSources, @@ -1121,14 +1122,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendRegularPoll(chat.id, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendRegularPoll(chat.id, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, question: String, options: List, @@ -1146,14 +1147,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, question: String, options: List, @@ -1171,14 +1172,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1197,7 +1198,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll( +): ContentMessage = sendQuizPoll( chatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1206,7 +1207,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1225,14 +1226,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, questionTextSources: List, options: List, @@ -1249,14 +1250,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, questionTextSources: List, options: List, @@ -1273,14 +1274,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1298,7 +1299,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll( +): ContentMessage = sendQuizPoll( chatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1307,7 +1308,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1325,14 +1326,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, question: String, options: List, @@ -1349,14 +1350,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, question: String, options: List, @@ -1373,14 +1374,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1398,7 +1399,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll( +): ContentMessage = sendQuizPoll( chatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1407,7 +1408,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1425,14 +1426,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, questionTextSources: List, options: List, @@ -1448,14 +1449,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, questionTextSources: List, options: List, @@ -1471,14 +1472,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendQuizPoll] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1495,7 +1496,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll( +): ContentMessage = sendQuizPoll( chatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1504,7 +1505,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, isClosed: Boolean = false, quizPoll: QuizPoll, @@ -1521,14 +1522,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendQuizPoll(chat.id, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendSticker] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, sticker: Sticker, threadId: MessageThreadId? = chatId.threadId, @@ -1539,14 +1540,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendSticker] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, sticker: Sticker, threadId: MessageThreadId? = chat.id.threadId, @@ -1557,7 +1558,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chat, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendSticker(chat, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** @@ -1565,7 +1566,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -1580,7 +1581,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLiveLocation( +): ContentMessage = sendLiveLocation( chatId = chatId, latitude = latitude, longitude = longitude, @@ -1602,7 +1603,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, location: Location, livePeriod: Seconds, @@ -1616,7 +1617,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLiveLocation( +): ContentMessage = sendLiveLocation( chatId, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1625,7 +1626,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, latitude: Double, longitude: Double, @@ -1640,7 +1641,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLiveLocation( +): ContentMessage = sendLiveLocation( chat, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1649,7 +1650,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, location: Location, livePeriod: Seconds, @@ -1663,7 +1664,7 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendLiveLocation( +): ContentMessage = sendLiveLocation( chat, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -1672,7 +1673,7 @@ suspend fun TelegramBot.send( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, latitude: Double, longitude: Double, @@ -1689,14 +1690,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chatId, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVenue(chatId, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVenue] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, latitude: Double, longitude: Double, @@ -1713,14 +1714,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chat, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVenue(chat, latitude, longitude, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVenue] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, location: StaticLocation, title: String, @@ -1736,14 +1737,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chatId, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVenue(chatId, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVenue] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, location: StaticLocation, title: String, @@ -1759,14 +1760,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chat, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVenue(chat, location, title, address, foursquareId, foursquareType, googlePlaceId, googlePlaceType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVenue] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, venue: Venue, threadId: MessageThreadId? = chatId.threadId, @@ -1776,14 +1777,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chatId, venue, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVenue(chatId, venue, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVenue] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, venue: Venue, threadId: MessageThreadId? = chat.id.threadId, @@ -1793,14 +1794,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVenue(chat, venue, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVenue(chat, venue, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVideo] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, video: VideoFile, text: String? = null, @@ -1814,14 +1815,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chatId, video, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideo(chatId, video, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVideo] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, video: VideoFile, text: String? = null, @@ -1835,14 +1836,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat, video, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideo(chat, video, text, parseMode, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVideo] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chatId: ChatIdentifier, video: VideoFile, entities: TextSourcesList, @@ -1855,14 +1856,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chatId, video, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideo(chatId, video, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVideo] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chat: Chat, video: VideoFile, entities: TextSourcesList, @@ -1875,14 +1876,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo(chat, video, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideo(chat, video, entities, showCaptionAboveMedia, spoilered, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVideoNote] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, videoNote: VideoNoteFile, threadId: MessageThreadId? = chatId.threadId, @@ -1892,14 +1893,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chatId, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideoNote(chatId, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVideoNote] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, videoNote: VideoNoteFile, threadId: MessageThreadId? = chat.id.threadId, @@ -1909,14 +1910,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chat, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideoNote(chat, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVoice] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, voice: VoiceFile, text: String? = null, @@ -1928,14 +1929,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chatId, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chatId, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVoice] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, voice: VoiceFile, text: String? = null, @@ -1947,14 +1948,14 @@ suspend fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chat, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVoice] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chatId: ChatIdentifier, voice: VoiceFile, entities: TextSourcesList, @@ -1965,14 +1966,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chatId, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chatId, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * Will execute [sendVoice] request * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.send( +public suspend inline fun TelegramBot.send( chat: Chat, voice: VoiceFile, entities: TextSourcesList, @@ -1983,14 +1984,14 @@ suspend inline fun TelegramBot.send( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chat, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroup") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -1999,14 +2000,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroup") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2015,14 +2016,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroupByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2031,14 +2032,14 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroupByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2047,13 +2048,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendPlaylist */ @JvmName("sendPlaylist") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2062,13 +2063,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendPlaylist(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendPlaylist */ @JvmName("sendPlaylist") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2077,13 +2078,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendPlaylist(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendPlaylist */ @JvmName("sendPlaylistByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2092,13 +2093,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendPlaylist(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendPlaylist */ @JvmName("sendPlaylistByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2107,13 +2108,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendPlaylist(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendDocumentsGroup */ @JvmName("sendDocuments") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2122,13 +2123,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendDocumentsGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendDocumentsGroup */ @JvmName("sendDocuments") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2137,13 +2138,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendDocumentsGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendDocumentsGroup */ @JvmName("sendDocumentsByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2152,13 +2153,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendDocumentsGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendDocumentsGroup */ @JvmName("sendDocumentsByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2167,13 +2168,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendDocumentsGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroup") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2182,13 +2183,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendVisualMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroup") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2197,13 +2198,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendVisualMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroupByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -2212,13 +2213,13 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendVisualMediaGroup(chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) /** * @see sendVisualMediaGroup */ @JvmName("sendVisualMediaGroupByContent") -suspend fun TelegramBot.send( +public suspend fun TelegramBot.send( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -2227,4 +2228,4 @@ suspend fun TelegramBot.send( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) +): ContentMessage> = sendVisualMediaGroup(chat, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters) 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 71bbd18aef..43119949fa 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 @@ -10,112 +10,112 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.reactions.Reaction import kotlin.jvm.JvmName -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( chatId: ChatIdentifier, messageId: MessageId, reactions: List = emptyList(), big: Boolean = false -) = execute( +): Boolean = execute( SetMessageReactions(chatId, messageId, reactions, big) ) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( chatId: ChatIdentifier, messageId: MessageId, reaction: Reaction? = null, big: Boolean = false -) = setMessageReactions(chatId, messageId, listOfNotNull(reaction), big) +): Boolean = setMessageReactions(chatId, messageId, listOfNotNull(reaction), big) -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( chat: Chat, messageId: MessageId, reactions: List = emptyList(), big: Boolean = false -) = setMessageReactions(chat.id, messageId, reactions, big) +): Boolean = setMessageReactions(chat.id, messageId, reactions, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( chat: Chat, messageId: MessageId, reaction: Reaction? = null, big: Boolean = false -) = setMessageReaction(chat.id, messageId, reaction, big) +): Boolean = setMessageReaction(chat.id, messageId, reaction, big) -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( meta: Message.MetaInfo, reactions: List = emptyList(), big: Boolean = false -) = setMessageReactions(meta.chatId, meta.messageId, reactions, big) +): Boolean = setMessageReactions(meta.chatId, meta.messageId, reactions, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( meta: Message.MetaInfo, reaction: Reaction? = null, big: Boolean = false -) = setMessageReaction(meta.chatId, meta.messageId, reaction, big) +): Boolean = setMessageReaction(meta.chatId, meta.messageId, reaction, big) -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( message: AccessibleMessage, reactions: List = emptyList(), big: Boolean = false -) = setMessageReactions(message.metaInfo, reactions, big) +): Boolean = setMessageReactions(message.metaInfo, reactions, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( message: AccessibleMessage, reaction: Reaction? = null, big: Boolean = false -) = setMessageReaction(message.metaInfo, reaction, big) +): Boolean = setMessageReaction(message.metaInfo, reaction, big) @JvmName("setMessageReactionsStrings") -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( chatId: ChatIdentifier, messageId: MessageId, emojis: List, big: Boolean = false -) = setMessageReactions(chatId, messageId, emojis.map { Reaction.Emoji(it) }, big) +): Boolean = setMessageReactions(chatId, messageId, emojis.map { Reaction.Emoji(it) }, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( chatId: ChatIdentifier, messageId: MessageId, emoji: String?, big: Boolean = false -) = setMessageReaction(chatId, messageId, emoji ?.let { Reaction.Emoji(it) }, big) +): Boolean = setMessageReaction(chatId, messageId, emoji ?.let { Reaction.Emoji(it) }, big) @JvmName("setMessageReactionsStrings") -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( chat: Chat, messageId: MessageId, emojis: List, big: Boolean = false -) = setMessageReactions(chat, messageId, emojis.map { Reaction.Emoji(it) }, big) +): Boolean = setMessageReactions(chat, messageId, emojis.map { Reaction.Emoji(it) }, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( chat: Chat, messageId: MessageId, emoji: String?, big: Boolean = false -) = setMessageReaction(chat, messageId, emoji ?.let { Reaction.Emoji(it) }, big) +): Boolean = setMessageReaction(chat, messageId, emoji ?.let { Reaction.Emoji(it) }, big) @JvmName("setMessageReactionsStrings") -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( meta: Message.MetaInfo, emojis: List, big: Boolean = false -) = setMessageReactions(meta, emojis.map { Reaction.Emoji(it) }, big) +): Boolean = setMessageReactions(meta, emojis.map { Reaction.Emoji(it) }, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( meta: Message.MetaInfo, emoji: String?, big: Boolean = false -) = setMessageReaction(meta, emoji ?.let { Reaction.Emoji(it) }, big) +): Boolean = setMessageReaction(meta, emoji ?.let { Reaction.Emoji(it) }, big) @JvmName("setMessageReactionsStrings") -suspend fun TelegramBot.setMessageReactions( +public suspend fun TelegramBot.setMessageReactions( message: AccessibleMessage, emojis: List, big: Boolean = false -) = setMessageReactions(message, emojis.map { Reaction.Emoji(it) }, big) +): Boolean = setMessageReactions(message, emojis.map { Reaction.Emoji(it) }, big) -suspend fun TelegramBot.setMessageReaction( +public suspend fun TelegramBot.setMessageReaction( message: AccessibleMessage, emoji: String?, big: Boolean = false -) = setMessageReaction(message, emoji ?.let { Reaction.Emoji(it) }, big) +): Boolean = setMessageReaction(message, emoji ?.let { Reaction.Emoji(it) }, big) 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 f6e1962e45..0038708783 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 @@ -7,12 +7,14 @@ 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.games.Game +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.GameContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendGame( +public suspend fun TelegramBot.sendGame( chatId: ChatIdentifier, gameShortName: String, threadId: MessageThreadId? = chatId.threadId, @@ -22,7 +24,7 @@ suspend fun TelegramBot.sendGame( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendGame( chatId, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -32,7 +34,7 @@ suspend fun TelegramBot.sendGame( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendGame( +public suspend fun TelegramBot.sendGame( chat: Chat, gameShortName: String, threadId: MessageThreadId? = chat.id.threadId, @@ -42,7 +44,7 @@ suspend fun TelegramBot.sendGame( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( chat.id, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -50,7 +52,7 @@ suspend fun TelegramBot.sendGame( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendGame( +public suspend fun TelegramBot.sendGame( chatId: ChatIdentifier, game: Game, threadId: MessageThreadId? = chatId.threadId, @@ -60,7 +62,7 @@ suspend fun TelegramBot.sendGame( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( chatId, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -68,7 +70,7 @@ suspend fun TelegramBot.sendGame( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendGame( +public suspend fun TelegramBot.sendGame( chat: Chat, game: Game, threadId: MessageThreadId? = chat.id.threadId, @@ -78,6 +80,6 @@ suspend fun TelegramBot.sendGame( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendGame( +): ContentMessage = sendGame( chat.id, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 2baef11f16..db2aae6e16 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 @@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.AnimationFile +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.AnimationContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chatId: ChatIdentifier, animation: InputFile, thumb: InputFile? = null, @@ -33,7 +35,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendAnimation( chatId = chatId, animation = animation, @@ -59,7 +61,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chatId: ChatIdentifier, animation: AnimationFile, text: String? = null, @@ -76,7 +78,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = chatId, animation = animation.fileId, thumb = animation.thumbnail ?.fileId, @@ -100,7 +102,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chat: Chat, animation: InputFile, thumb: InputFile? = null, @@ -118,7 +120,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = chat.id, animation = animation, thumb = thumb, @@ -142,7 +144,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chat: Chat, animation: AnimationFile, text: String? = null, @@ -159,7 +161,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = chat.id, animation = animation, text = text, @@ -183,7 +185,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chatId: ChatIdentifier, animation: InputFile, thumb: InputFile? = null, @@ -200,7 +202,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendAnimation( chatId = chatId, animation = animation, @@ -225,7 +227,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chatId: ChatIdentifier, animation: AnimationFile, entities: TextSourcesList, @@ -241,7 +243,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = chatId, animation = animation.fileId, thumb = animation.thumbnail ?.fileId, @@ -264,7 +266,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chat: Chat, animation: InputFile, thumb: InputFile? = null, @@ -281,7 +283,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = chat.id, animation = animation, thumb = thumb, @@ -304,7 +306,7 @@ suspend fun TelegramBot.sendAnimation( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAnimation( +public suspend fun TelegramBot.sendAnimation( chat: Chat, animation: AnimationFile, entities: TextSourcesList, @@ -320,7 +322,7 @@ suspend fun TelegramBot.sendAnimation( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAnimation( +): ContentMessage = sendAnimation( chatId = chat.id, animation = animation, entities = entities, 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 13f6c011de..2da47193ac 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 @@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.AudioFile +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.AudioContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAudio( +public suspend fun TelegramBot.sendAudio( chatId: ChatIdentifier, audio: InputFile, thumb: InputFile? = null, @@ -31,7 +33,7 @@ suspend fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendAudio( chatId, audio, @@ -55,7 +57,7 @@ suspend fun TelegramBot.sendAudio( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAudio( +public suspend fun TelegramBot.sendAudio( chat: Chat, audio: InputFile, thumb: InputFile? = null, @@ -71,13 +73,13 @@ suspend fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAudio( +public suspend fun TelegramBot.sendAudio( chatId: ChatIdentifier, audio: AudioFile, text: String? = null, @@ -90,13 +92,13 @@ suspend fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, text, parseMode, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, text, parseMode, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendAudio( +public suspend fun TelegramBot.sendAudio( chat: Chat, audio: AudioFile, text: String? = null, @@ -109,14 +111,14 @@ suspend fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chat.id, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendAudio( +public suspend inline fun TelegramBot.sendAudio( chatId: ChatIdentifier, audio: InputFile, thumb: InputFile? = null, @@ -131,7 +133,7 @@ suspend inline fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendAudio( chatId, audio, @@ -154,7 +156,7 @@ suspend inline fun TelegramBot.sendAudio( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendAudio( +public suspend inline fun TelegramBot.sendAudio( chat: Chat, audio: InputFile, thumb: InputFile? = null, @@ -169,13 +171,13 @@ suspend inline fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendAudio( +public suspend inline fun TelegramBot.sendAudio( chatId: ChatIdentifier, audio: AudioFile, entities: TextSourcesList, @@ -187,13 +189,13 @@ suspend inline fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, entities, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, entities, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendAudio( +public suspend inline fun TelegramBot.sendAudio( chat: Chat, audio: AudioFile, entities: TextSourcesList, @@ -205,4 +207,4 @@ suspend inline fun TelegramBot.sendAudio( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 f28352b56d..53b8fb0d81 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 @@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.DocumentFile +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.DocumentContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendDocument( +public suspend fun TelegramBot.sendDocument( chatId: ChatIdentifier, document: InputFile, thumb: InputFile? = null, @@ -29,7 +31,7 @@ suspend fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = execute( +): ContentMessage = execute( SendDocument( chatId, document, @@ -51,7 +53,7 @@ suspend fun TelegramBot.sendDocument( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendDocument( +public suspend fun TelegramBot.sendDocument( chat: Chat, document: InputFile, thumb: InputFile? = null, @@ -65,13 +67,13 @@ suspend fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, thumb, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chat.id, document, thumb, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendDocument( +public suspend fun TelegramBot.sendDocument( chatId: ChatIdentifier, document: DocumentFile, text: String? = null, @@ -84,7 +86,7 @@ suspend fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument( +): ContentMessage = sendDocument( chatId, document.fileId, document.thumbnail ?.fileId, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection ) @@ -92,7 +94,7 @@ suspend fun TelegramBot.sendDocument( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendDocument( +public suspend fun TelegramBot.sendDocument( chat: Chat, document: DocumentFile, text: String? = null, @@ -105,13 +107,13 @@ suspend fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chat.id, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendDocument( +public suspend inline fun TelegramBot.sendDocument( chatId: ChatIdentifier, document: InputFile, thumb: InputFile? = null, @@ -124,7 +126,7 @@ suspend inline fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = execute( +): ContentMessage = execute( SendDocument( chatId, document, @@ -145,7 +147,7 @@ suspend inline fun TelegramBot.sendDocument( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendDocument( +public suspend inline fun TelegramBot.sendDocument( chat: Chat, document: InputFile, thumb: InputFile? = null, @@ -158,13 +160,13 @@ suspend inline fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, thumb, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chat.id, document, thumb, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendDocument( +public suspend inline fun TelegramBot.sendDocument( chatId: ChatIdentifier, document: DocumentFile, entities: TextSourcesList, @@ -176,7 +178,7 @@ suspend inline fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument( +): ContentMessage = sendDocument( chatId, document.fileId, document.thumbnail ?.fileId, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection ) @@ -184,7 +186,7 @@ suspend inline fun TelegramBot.sendDocument( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendDocument( +public suspend inline fun TelegramBot.sendDocument( chat: Chat, document: DocumentFile, entities: TextSourcesList, @@ -196,4 +198,4 @@ suspend inline fun TelegramBot.sendDocument( replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null, disableContentTypeDetection: Boolean? = null -) = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) +): ContentMessage = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 cedb2df7d0..891477f16d 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 @@ -6,10 +6,8 @@ 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 -import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent -import dev.inmo.tgbotapi.types.message.content.AudioContent -import dev.inmo.tgbotapi.types.message.content.DocumentContent +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.utils.RiskFeature import kotlin.jvm.JvmName @@ -17,7 +15,7 @@ import kotlin.jvm.JvmName * @see SendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) -suspend fun TelegramBot.sendMediaGroup( +public suspend fun TelegramBot.sendMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -26,7 +24,7 @@ suspend fun TelegramBot.sendMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = execute( +): ContentMessage> = execute( SendMediaGroup( chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -36,7 +34,7 @@ suspend fun TelegramBot.sendMediaGroup( * @see SendMediaGroup */ @RiskFeature(rawSendingMediaGroupsWarning) -suspend fun TelegramBot.sendMediaGroup( +public suspend fun TelegramBot.sendMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -45,7 +43,7 @@ suspend fun TelegramBot.sendMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup( +): ContentMessage> = sendMediaGroup( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -54,7 +52,7 @@ suspend fun TelegramBot.sendMediaGroup( */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroupByContent") -suspend fun TelegramBot.sendMediaGroup( +public suspend fun TelegramBot.sendMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -63,7 +61,7 @@ suspend fun TelegramBot.sendMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup( +): ContentMessage> = sendMediaGroup( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -72,7 +70,7 @@ suspend fun TelegramBot.sendMediaGroup( */ @RiskFeature(rawSendingMediaGroupsWarning) @JvmName("sendMedaGroupByContent") -suspend fun TelegramBot.sendMediaGroup( +public suspend fun TelegramBot.sendMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -81,14 +79,14 @@ suspend fun TelegramBot.sendMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendMediaGroup( +): ContentMessage> = sendMediaGroup( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) /** * @see SendPlaylist */ -suspend fun TelegramBot.sendPlaylist( +public suspend fun TelegramBot.sendPlaylist( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -97,7 +95,7 @@ suspend fun TelegramBot.sendPlaylist( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = execute( +): ContentMessage> = execute( SendPlaylist( chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -106,7 +104,7 @@ suspend fun TelegramBot.sendPlaylist( /** * @see SendPlaylist */ -suspend fun TelegramBot.sendPlaylist( +public suspend fun TelegramBot.sendPlaylist( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -115,7 +113,7 @@ suspend fun TelegramBot.sendPlaylist( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist( +): ContentMessage> = sendPlaylist( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -123,7 +121,7 @@ suspend fun TelegramBot.sendPlaylist( * @see SendPlaylist */ @JvmName("sendPlaylistByContent") -suspend fun TelegramBot.sendPlaylist( +public suspend fun TelegramBot.sendPlaylist( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -132,7 +130,7 @@ suspend fun TelegramBot.sendPlaylist( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist( +): ContentMessage> = sendPlaylist( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -140,7 +138,7 @@ suspend fun TelegramBot.sendPlaylist( * @see SendPlaylist */ @JvmName("sendPlaylistByContent") -suspend fun TelegramBot.sendPlaylist( +public suspend fun TelegramBot.sendPlaylist( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -149,14 +147,14 @@ suspend fun TelegramBot.sendPlaylist( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendPlaylist( +): ContentMessage> = sendPlaylist( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) /** * @see SendDocumentsGroup */ -suspend fun TelegramBot.sendDocumentsGroup( +public suspend fun TelegramBot.sendDocumentsGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -165,7 +163,7 @@ suspend fun TelegramBot.sendDocumentsGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = execute( +): ContentMessage> = execute( SendDocumentsGroup( chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -174,7 +172,7 @@ suspend fun TelegramBot.sendDocumentsGroup( /** * @see SendDocumentsGroup */ -suspend fun TelegramBot.sendDocumentsGroup( +public suspend fun TelegramBot.sendDocumentsGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -183,7 +181,7 @@ suspend fun TelegramBot.sendDocumentsGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup( +): ContentMessage> = sendDocumentsGroup( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -191,7 +189,7 @@ suspend fun TelegramBot.sendDocumentsGroup( * @see SendDocumentsGroup */ @JvmName("sendDocumentsByContent") -suspend fun TelegramBot.sendDocumentsGroup( +public suspend fun TelegramBot.sendDocumentsGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -200,7 +198,7 @@ suspend fun TelegramBot.sendDocumentsGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup( +): ContentMessage> = sendDocumentsGroup( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -208,7 +206,7 @@ suspend fun TelegramBot.sendDocumentsGroup( * @see SendDocumentsGroup */ @JvmName("sendDocumentsByContent") -suspend fun TelegramBot.sendDocumentsGroup( +public suspend fun TelegramBot.sendDocumentsGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -217,14 +215,14 @@ suspend fun TelegramBot.sendDocumentsGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendDocumentsGroup( +): ContentMessage> = sendDocumentsGroup( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) /** * @see SendVisualMediaGroup */ -suspend fun TelegramBot.sendVisualMediaGroup( +public suspend fun TelegramBot.sendVisualMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -233,7 +231,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = execute( +): ContentMessage> = execute( SendVisualMediaGroup( chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -242,7 +240,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( /** * @see SendVisualMediaGroup */ -suspend fun TelegramBot.sendVisualMediaGroup( +public suspend fun TelegramBot.sendVisualMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -251,7 +249,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup( +): ContentMessage> = sendVisualMediaGroup( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -259,7 +257,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( * @see SendVisualMediaGroup */ @JvmName("sendVisualMediaGroupByContent") -suspend fun TelegramBot.sendVisualMediaGroup( +public suspend fun TelegramBot.sendVisualMediaGroup( chatId: ChatIdentifier, media: List, threadId: MessageThreadId? = chatId.threadId, @@ -268,7 +266,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup( +): ContentMessage> = sendVisualMediaGroup( chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) @@ -276,7 +274,7 @@ suspend fun TelegramBot.sendVisualMediaGroup( * @see SendVisualMediaGroup */ @JvmName("sendVisualMediaGroupByContent") -suspend fun TelegramBot.sendVisualMediaGroup( +public suspend fun TelegramBot.sendVisualMediaGroup( chat: Chat, media: List, threadId: MessageThreadId? = chat.id.threadId, @@ -285,6 +283,6 @@ suspend fun TelegramBot.sendVisualMediaGroup( protectContent: Boolean = false, effectId: EffectId? = null, replyParameters: ReplyParameters? = null -) = sendVisualMediaGroup( +): ContentMessage> = sendVisualMediaGroup( chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPaidMedia.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPaidMedia.kt index 87904da651..432a27bad9 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPaidMedia.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/media/SendPaidMedia.kt @@ -9,12 +9,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.media.TelegramPaidMedia +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPaidMedia( +public suspend fun TelegramBot.sendPaidMedia( chatId: ChatIdentifier, starCount: Int, media: List, @@ -27,7 +29,7 @@ suspend fun TelegramBot.sendPaidMedia( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendPaidMedia( chatId = chatId, starCount = starCount, @@ -48,7 +50,7 @@ suspend fun TelegramBot.sendPaidMedia( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPaidMedia( +public suspend fun TelegramBot.sendPaidMedia( chat: Chat, starCount: Int, media: List, @@ -61,7 +63,7 @@ suspend fun TelegramBot.sendPaidMedia( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPaidMedia( +): ContentMessage = sendPaidMedia( chatId = chat.id, starCount = starCount, media = media, @@ -81,7 +83,7 @@ suspend fun TelegramBot.sendPaidMedia( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPaidMedia( +public suspend inline fun TelegramBot.sendPaidMedia( chatId: ChatIdentifier, starCount: Int, media: List, @@ -93,7 +95,7 @@ suspend inline fun TelegramBot.sendPaidMedia( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendPaidMedia( chatId = chatId, starCount = starCount, @@ -113,7 +115,7 @@ suspend inline fun TelegramBot.sendPaidMedia( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPaidMedia( +public suspend inline fun TelegramBot.sendPaidMedia( chat: Chat, starCount: Int, media: List, @@ -125,7 +127,7 @@ suspend inline fun TelegramBot.sendPaidMedia( protectContent: Boolean = false, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPaidMedia( +): ContentMessage = sendPaidMedia( chatId = chat.id, starCount = starCount, media = media, 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 b86be33f9e..772312f26a 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 @@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.* +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.PhotoContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPhoto( +public suspend fun TelegramBot.sendPhoto( chatId: ChatIdentifier, fileId: InputFile, text: String? = null, @@ -29,7 +31,7 @@ suspend fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendPhoto( chatId = chatId, photo = fileId, @@ -51,7 +53,7 @@ suspend fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPhoto( +public suspend fun TelegramBot.sendPhoto( chat: Chat, fileId: InputFile, text: String? = null, @@ -65,7 +67,7 @@ suspend fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chat.id, fileId = fileId, text = text, @@ -85,7 +87,7 @@ suspend fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPhoto( +public suspend fun TelegramBot.sendPhoto( chatId: ChatIdentifier, photo: PhotoFile, text: String? = null, @@ -99,7 +101,7 @@ suspend fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chatId, fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text = text, @@ -119,7 +121,7 @@ suspend fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPhoto( +public suspend fun TelegramBot.sendPhoto( chat: Chat, photo: PhotoFile, text: String? = null, @@ -133,7 +135,7 @@ suspend fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chat.id, photo = photo, text = text, @@ -153,7 +155,7 @@ suspend fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPhoto( +public suspend fun TelegramBot.sendPhoto( chatId: ChatIdentifier, photoSize: PhotoSize, text: String? = null, @@ -167,7 +169,7 @@ suspend fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chatId, fileId = photoSize.fileId, text = text, @@ -187,7 +189,7 @@ suspend fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendPhoto( +public suspend fun TelegramBot.sendPhoto( chat: Chat, photoSize: PhotoSize, text: String? = null, @@ -201,7 +203,7 @@ suspend fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chat.id, photoSize = photoSize, text = text, @@ -222,7 +224,7 @@ suspend fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPhoto( +public suspend inline fun TelegramBot.sendPhoto( chatId: ChatIdentifier, fileId: InputFile, entities: TextSourcesList, @@ -235,7 +237,7 @@ suspend inline fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendPhoto( chatId = chatId, photo = fileId, @@ -256,7 +258,7 @@ suspend inline fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPhoto( +public suspend inline fun TelegramBot.sendPhoto( chat: Chat, fileId: InputFile, entities: TextSourcesList, @@ -269,7 +271,7 @@ suspend inline fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chat.id, fileId = fileId, entities = entities, @@ -288,7 +290,7 @@ suspend inline fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPhoto( +public suspend inline fun TelegramBot.sendPhoto( chatId: ChatIdentifier, photo: PhotoFile, entities: TextSourcesList, @@ -301,7 +303,7 @@ suspend inline fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chatId, fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities = entities, @@ -320,7 +322,7 @@ suspend inline fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPhoto( +public suspend inline fun TelegramBot.sendPhoto( chat: Chat, photo: PhotoFile, entities: TextSourcesList, @@ -333,7 +335,7 @@ suspend inline fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chat.id, photo = photo, entities = entities, @@ -352,7 +354,7 @@ suspend inline fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPhoto( +public suspend inline fun TelegramBot.sendPhoto( chatId: ChatIdentifier, photoSize: PhotoSize, entities: TextSourcesList, @@ -365,7 +367,7 @@ suspend inline fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chatId, fileId = photoSize.fileId, entities = entities, @@ -384,7 +386,7 @@ suspend inline fun TelegramBot.sendPhoto( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendPhoto( +public suspend inline fun TelegramBot.sendPhoto( chat: Chat, photoSize: PhotoSize, entities: TextSourcesList, @@ -397,7 +399,7 @@ suspend inline fun TelegramBot.sendPhoto( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendPhoto( +): ContentMessage = sendPhoto( chatId = chat.id, photoSize = photoSize, entities = entities, 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 2b6ca92d95..0f89488f84 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 @@ -8,12 +8,14 @@ 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 +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.StickerContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendSticker( +public suspend fun TelegramBot.sendSticker( chatId: ChatIdentifier, sticker: InputFile, threadId: MessageThreadId? = chatId.threadId, @@ -24,7 +26,7 @@ suspend fun TelegramBot.sendSticker( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ) @@ -32,7 +34,7 @@ suspend fun TelegramBot.sendSticker( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendSticker( +public suspend fun TelegramBot.sendSticker( chat: Chat, sticker: InputFile, threadId: MessageThreadId? = chat.id.threadId, @@ -43,13 +45,13 @@ suspend fun TelegramBot.sendSticker( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chat.id, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendSticker(chat.id, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendSticker( +public suspend fun TelegramBot.sendSticker( chatId: ChatIdentifier, sticker: Sticker, threadId: MessageThreadId? = chatId.threadId, @@ -60,13 +62,13 @@ suspend fun TelegramBot.sendSticker( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chatId, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendSticker(chatId, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendSticker( +public suspend fun TelegramBot.sendSticker( chat: Chat, sticker: Sticker, threadId: MessageThreadId? = chat.id.threadId, @@ -77,4 +79,4 @@ suspend fun TelegramBot.sendSticker( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, 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 f641816260..75a439e1d3 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 @@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.VideoFile +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.VideoContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideo( +public suspend fun TelegramBot.sendVideo( chatId: ChatIdentifier, video: InputFile, thumb: InputFile? = null, @@ -33,7 +35,7 @@ suspend fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVideo( chatId = chatId, video = video, @@ -60,7 +62,7 @@ suspend fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideo( +public suspend fun TelegramBot.sendVideo( chatId: ChatIdentifier, video: VideoFile, text: String? = null, @@ -74,7 +76,7 @@ suspend fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = chatId, video = video.fileId, thumb = video.thumbnail ?.fileId, @@ -98,7 +100,7 @@ suspend fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideo( +public suspend fun TelegramBot.sendVideo( chat: Chat, video: InputFile, thumb: InputFile? = null, @@ -116,7 +118,7 @@ suspend fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = chat.id, video = video, thumb = thumb, @@ -141,7 +143,7 @@ suspend fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideo( +public suspend fun TelegramBot.sendVideo( chat: Chat, video: VideoFile, text: String? = null, @@ -155,7 +157,7 @@ suspend fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = chat.id, video = video, text = text, @@ -175,7 +177,7 @@ suspend fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVideo( +public suspend inline fun TelegramBot.sendVideo( chatId: ChatIdentifier, video: InputFile, thumb: InputFile? = null, @@ -192,7 +194,7 @@ suspend inline fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVideo( chatId = chatId, video = video, @@ -218,7 +220,7 @@ suspend inline fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVideo( +public suspend inline fun TelegramBot.sendVideo( chatId: ChatIdentifier, video: VideoFile, entities: TextSourcesList, @@ -231,7 +233,7 @@ suspend inline fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = chatId, video = video.fileId, thumb = video.thumbnail ?.fileId, @@ -254,7 +256,7 @@ suspend inline fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVideo( +public suspend inline fun TelegramBot.sendVideo( chat: Chat, video: InputFile, thumb: InputFile? = null, @@ -271,7 +273,7 @@ suspend inline fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = chat.id, video = video, thumb = thumb, @@ -295,7 +297,7 @@ suspend inline fun TelegramBot.sendVideo( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVideo( +public suspend inline fun TelegramBot.sendVideo( chat: Chat, video: VideoFile, entities: TextSourcesList, @@ -308,7 +310,7 @@ suspend inline fun TelegramBot.sendVideo( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideo( +): ContentMessage = sendVideo( chatId = chat.id, video = video, entities = entities, 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 1c0277235c..9416811896 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 @@ -8,12 +8,14 @@ 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 +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.VideoNoteContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideoNote( +public suspend fun TelegramBot.sendVideoNote( chatId: ChatIdentifier, videoNote: InputFile, thumb: InputFile? = null, @@ -26,7 +28,7 @@ suspend fun TelegramBot.sendVideoNote( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVideoNote( chatId, videoNote, @@ -47,7 +49,7 @@ suspend fun TelegramBot.sendVideoNote( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideoNote( +public suspend fun TelegramBot.sendVideoNote( chatId: ChatIdentifier, videoNote: VideoNoteFile, threadId: MessageThreadId? = chatId.threadId, @@ -57,7 +59,7 @@ suspend fun TelegramBot.sendVideoNote( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote( +): ContentMessage = sendVideoNote( chatId, videoNote.fileId, videoNote.thumbnail ?.fileId, videoNote.duration, videoNote.width, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -65,7 +67,7 @@ suspend fun TelegramBot.sendVideoNote( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideoNote( +public suspend fun TelegramBot.sendVideoNote( chat: Chat, videoNote: InputFile, thumb: InputFile? = null, @@ -78,13 +80,13 @@ suspend fun TelegramBot.sendVideoNote( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVideoNote( +public suspend fun TelegramBot.sendVideoNote( chat: Chat, videoNote: VideoNoteFile, threadId: MessageThreadId? = chat.id.threadId, @@ -94,4 +96,4 @@ suspend fun TelegramBot.sendVideoNote( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, 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 8f708377c6..9a3dfa8674 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 @@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.files.VoiceFile +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.VoiceContent /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVoice( +public suspend fun TelegramBot.sendVoice( chatId: ChatIdentifier, voice: InputFile, text: String? = null, @@ -28,7 +30,7 @@ suspend fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVoice( chatId, voice, @@ -49,7 +51,7 @@ suspend fun TelegramBot.sendVoice( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVoice( +public suspend fun TelegramBot.sendVoice( chat: Chat, voice: InputFile, text: String? = null, @@ -62,13 +64,13 @@ suspend fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, text, parseMode, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chat.id, voice, text, parseMode, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVoice( +public suspend fun TelegramBot.sendVoice( chatId: ChatIdentifier, voice: VoiceFile, text: String? = null, @@ -80,7 +82,7 @@ suspend fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice( +): ContentMessage = sendVoice( chatId, voice.fileId, text, parseMode, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) @@ -88,7 +90,7 @@ suspend fun TelegramBot.sendVoice( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend fun TelegramBot.sendVoice( +public suspend fun TelegramBot.sendVoice( chat: Chat, voice: VoiceFile, text: String? = null, @@ -100,14 +102,14 @@ suspend fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chat.id, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVoice( +public suspend inline fun TelegramBot.sendVoice( chatId: ChatIdentifier, voice: InputFile, entities: TextSourcesList, @@ -119,7 +121,7 @@ suspend inline fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendVoice( chatId = chatId, voice = voice, @@ -139,7 +141,7 @@ suspend inline fun TelegramBot.sendVoice( * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVoice( +public suspend inline fun TelegramBot.sendVoice( chat: Chat, voice: InputFile, entities: TextSourcesList, @@ -151,13 +153,13 @@ suspend inline fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, entities, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chat.id, voice, entities, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVoice( +public suspend inline fun TelegramBot.sendVoice( chatId: ChatIdentifier, voice: VoiceFile, entities: TextSourcesList, @@ -168,14 +170,14 @@ suspend inline fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice( +): ContentMessage = sendVoice( chatId, voice.fileId, entities, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup ) /** * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param */ -suspend inline fun TelegramBot.sendVoice( +public suspend inline fun TelegramBot.sendVoice( chat: Chat, voice: VoiceFile, entities: TextSourcesList, @@ -186,4 +188,4 @@ suspend inline fun TelegramBot.sendVoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLink.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLink.kt index 27b8d1d08c..2430043d91 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLink.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLink.kt @@ -2,15 +2,11 @@ package dev.inmo.tgbotapi.extensions.api.send.payments import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink -import dev.inmo.tgbotapi.requests.send.payments.SendInvoice -import dev.inmo.tgbotapi.types.* -import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup -import dev.inmo.tgbotapi.types.chat.CommonUser import dev.inmo.tgbotapi.types.payments.LabeledPrice import dev.inmo.tgbotapi.types.payments.abstracts.Currency import dev.inmo.tgbotapi.types.payments.abstracts.XTR -suspend fun TelegramBot.createInvoiceLink( +public suspend fun TelegramBot.createInvoiceLink( title: String, description: String, payload: String, @@ -27,14 +23,14 @@ suspend fun TelegramBot.createInvoiceLink( shouldSendPhoneNumberToProvider: Boolean = false, shouldSendEmailToProvider: Boolean = false, priceDependOnShipAddress: Boolean = false -) = execute( +): String = execute( CreateInvoiceLink(title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress) ) /** * For links witn XTR currency and using of Telegram Stars */ -suspend fun TelegramBot.createInvoiceLink( +public suspend fun TelegramBot.createInvoiceLink( title: String, description: String, payload: String, @@ -49,6 +45,6 @@ suspend fun TelegramBot.createInvoiceLink( shouldSendPhoneNumberToProvider: Boolean = false, shouldSendEmailToProvider: Boolean = false, priceDependOnShipAddress: Boolean = false -) = execute( +): String = execute( CreateInvoiceLink(title, description, payload, null, Currency.XTR, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress) ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPayment.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPayment.kt index 89cc9e48bc..8d2ff8c6c8 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPayment.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPayment.kt @@ -6,12 +6,12 @@ import dev.inmo.tgbotapi.types.UserId import dev.inmo.tgbotapi.types.payments.SuccessfulPayment import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId -suspend fun TelegramBot.refundStarPayment( +public suspend fun TelegramBot.refundStarPayment( userId: UserId, telegramPaymentChargeId: TelegramPaymentChargeId -) = execute(RefundStarPayment(userId, telegramPaymentChargeId)) +): Boolean = execute(RefundStarPayment(userId, telegramPaymentChargeId)) -suspend fun TelegramBot.refundStarPayment( +public suspend fun TelegramBot.refundStarPayment( userId: UserId, successfulPayment: SuccessfulPayment -) = refundStarPayment(userId, successfulPayment.telegramPaymentChargeId) \ No newline at end of file +): Boolean = refundStarPayment(userId, successfulPayment.telegramPaymentChargeId) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt index aea0885b1e..681ae2bfe2 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/payments/SendInvoice.kt @@ -5,6 +5,8 @@ import dev.inmo.tgbotapi.requests.send.payments.SendInvoice import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.chat.CommonUser +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.InvoiceContent import dev.inmo.tgbotapi.types.payments.LabeledPrice import dev.inmo.tgbotapi.types.payments.abstracts.Currency import dev.inmo.tgbotapi.types.payments.abstracts.XTR @@ -13,7 +15,7 @@ import dev.inmo.tgbotapi.types.payments.abstracts.XTR * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.sendInvoice( +public suspend fun TelegramBot.sendInvoice( chatId: IdChatIdentifier, title: String, description: String, @@ -38,7 +40,7 @@ suspend fun TelegramBot.sendInvoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: InlineKeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ) @@ -46,7 +48,7 @@ suspend fun TelegramBot.sendInvoice( * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.sendInvoice( +public suspend fun TelegramBot.sendInvoice( user: CommonUser, title: String, description: String, @@ -70,14 +72,14 @@ suspend fun TelegramBot.sendInvoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, null, disableNotification, protectContent, effectId, replyParameters, replyMarkup) +): ContentMessage = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, null, disableNotification, protectContent, effectId, replyParameters, replyMarkup) /** * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.sendInvoice( +public suspend fun TelegramBot.sendInvoice( chatId: IdChatIdentifier, title: String, description: String, @@ -91,7 +93,7 @@ suspend fun TelegramBot.sendInvoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: InlineKeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendInvoice(chatId, title, description, payload, price, startParameter, providerData, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ) @@ -99,7 +101,7 @@ suspend fun TelegramBot.sendInvoice( * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * as a builder for that */ -suspend fun TelegramBot.sendInvoice( +public suspend fun TelegramBot.sendInvoice( user: CommonUser, title: String, description: String, @@ -112,7 +114,7 @@ suspend fun TelegramBot.sendInvoice( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: InlineKeyboardMarkup? = null -) = sendInvoice( +): ContentMessage = sendInvoice( chatId = user.id, title = title, description = description, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendQuizPoll.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendQuizPoll.kt index 6a2eea164f..5bebb27e0d 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendQuizPoll.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendQuizPoll.kt @@ -6,12 +6,14 @@ 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.ParseMode +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.PollContent import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, question: String, options: List, @@ -30,7 +32,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, question, @@ -53,7 +55,7 @@ suspend fun TelegramBot.sendQuizPoll( ) ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, questionEntities: List, options: List, @@ -71,7 +73,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, questionEntities, @@ -93,7 +95,7 @@ suspend fun TelegramBot.sendQuizPoll( ) ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, question: String, options: List, @@ -111,7 +113,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, question, @@ -134,7 +136,7 @@ suspend fun TelegramBot.sendQuizPoll( ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, questionEntities: List, options: List, @@ -151,7 +153,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, questionEntities, @@ -172,7 +174,7 @@ suspend fun TelegramBot.sendQuizPoll( ) ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, question: String, options: List, @@ -190,7 +192,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, question, @@ -212,7 +214,7 @@ suspend fun TelegramBot.sendQuizPoll( ) ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, questionEntities: List, options: List, @@ -229,7 +231,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, questionEntities, @@ -250,7 +252,7 @@ suspend fun TelegramBot.sendQuizPoll( ) ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, question: String, options: List, @@ -267,7 +269,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, question, @@ -288,7 +290,7 @@ suspend fun TelegramBot.sendQuizPoll( ) ) -suspend fun TelegramBot.sendQuizPoll( +public suspend fun TelegramBot.sendQuizPoll( chatId: ChatIdentifier, questionEntities: List, options: List, @@ -304,7 +306,7 @@ suspend fun TelegramBot.sendQuizPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendQuizPoll( chatId, questionEntities, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPoll.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPoll.kt index a9dfe324dc..fd5a32d7ab 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPoll.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPoll.kt @@ -6,12 +6,14 @@ 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.ParseMode +import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage +import dev.inmo.tgbotapi.types.message.content.PollContent import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo -suspend fun TelegramBot.sendRegularPoll( +public suspend fun TelegramBot.sendRegularPoll( chatId: ChatIdentifier, question: String, options: List, @@ -28,7 +30,7 @@ suspend fun TelegramBot.sendRegularPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendRegularPoll( chatId, question, @@ -49,7 +51,7 @@ suspend fun TelegramBot.sendRegularPoll( ) ) -suspend fun TelegramBot.sendRegularPoll( +public suspend fun TelegramBot.sendRegularPoll( chatId: ChatIdentifier, questionEntities: List, options: List, @@ -65,7 +67,7 @@ suspend fun TelegramBot.sendRegularPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendRegularPoll( chatId, questionEntities, @@ -85,7 +87,7 @@ suspend fun TelegramBot.sendRegularPoll( ) ) -suspend fun TelegramBot.sendRegularPoll( +public suspend fun TelegramBot.sendRegularPoll( chatId: ChatIdentifier, question: String, options: List, @@ -101,7 +103,7 @@ suspend fun TelegramBot.sendRegularPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendRegularPoll( chatId, question, @@ -121,7 +123,7 @@ suspend fun TelegramBot.sendRegularPoll( ) ) -suspend fun TelegramBot.sendRegularPoll( +public suspend fun TelegramBot.sendRegularPoll( chatId: ChatIdentifier, questionEntities: List, options: List, @@ -136,7 +138,7 @@ suspend fun TelegramBot.sendRegularPoll( effectId: EffectId? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null -) = execute( +): ContentMessage = execute( SendRegularPoll( chatId, questionEntities,