1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-08 17:33:47 +00:00

moving to an explicit API mode

refactored `send` package (an effin' huge one!)
This commit is contained in:
bpavuk 2024-07-14 15:24:46 +03:00
parent ed39fde776
commit f36373b718
No known key found for this signature in database
GPG Key ID: B501D26D9DEA9CFE
31 changed files with 1019 additions and 984 deletions

View File

@ -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 * @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 * [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, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
@ -25,7 +25,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): MessageId = execute(
CopyMessage( CopyMessage(
fromChatId, fromChatId,
messageId, 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 * @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 * [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, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
@ -57,13 +57,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
toChat: Chat, toChat: Chat,
@ -75,13 +75,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
toChat: Chat, toChat: Chat,
@ -93,14 +93,14 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
@ -111,7 +111,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): MessageId = execute(
CopyMessage( CopyMessage(
fromChatId, fromChatId,
messageId, 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 * @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 * [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, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
@ -141,13 +141,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
toChat: Chat, toChat: Chat,
@ -158,13 +158,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
toChat: Chat, toChat: Chat,
@ -175,13 +175,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, toChatId: ChatIdentifier,
message: AccessibleMessage, message: AccessibleMessage,
text: String? = null, text: String? = null,
@ -192,13 +192,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, toChat: Chat,
message: AccessibleMessage, message: AccessibleMessage,
text: String? = null, text: String? = null,
@ -209,13 +209,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, toChatId: ChatIdentifier,
message: AccessibleMessage, message: AccessibleMessage,
entities: TextSourcesList, entities: TextSourcesList,
@ -225,13 +225,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, toChat: Chat,
message: AccessibleMessage, message: AccessibleMessage,
entities: TextSourcesList, entities: TextSourcesList,
@ -241,13 +241,13 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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 * @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 * [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, toChatId: ChatIdentifier,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
@ -259,7 +259,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): MessageId = execute(
CopyMessage( CopyMessage(
fromChatId, fromChatId,
messageId, 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 * @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 * [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, toChatId: ChatIdentifier,
fromChat: Chat, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
@ -291,7 +291,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
toChatId, toChatId,
fromChat.id, fromChat.id,
messageId, 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 * @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 * [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, toChat: Chat,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
@ -321,7 +321,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
toChat.id, toChat.id,
fromChatId, fromChatId,
messageId, 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 * @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 * [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, toChat: Chat,
fromChat: Chat, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
@ -351,7 +351,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
toChat.id, toChat.id,
fromChat.id, fromChat.id,
messageId, 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 * @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 * [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, toChatId: ChatIdentifier,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
@ -381,7 +381,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): MessageId = execute(
CopyMessage( CopyMessage(
fromChatId, fromChatId,
messageId, 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 * @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 * [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, toChatId: ChatIdentifier,
fromChat: Chat, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
@ -411,7 +411,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
toChatId, toChatId,
fromChat.id, fromChat.id,
messageId, 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 * @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 * [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, toChat: Chat,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
@ -439,7 +439,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
toChat.id, toChat.id,
fromChatId, fromChatId,
messageId, 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 * @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 * [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, toChat: Chat,
fromChat: Chat, fromChat: Chat,
messageId: MessageId, messageId: MessageId,
@ -467,7 +467,7 @@ suspend inline fun TelegramBot.copyMessage(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
toChat.id, toChat.id,
fromChat.id, fromChat.id,
messageId, messageId,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.abstracts.Message
import kotlin.jvm.JvmName import kotlin.jvm.JvmName
suspend fun TelegramBot.copyMessages( public suspend fun TelegramBot.copyMessages(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageIds: List<MessageId>, messageIds: List<MessageId>,
@ -15,7 +15,7 @@ suspend fun TelegramBot.copyMessages(
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = messageIds.chunked(copyMessagesLimit.last).flatMap { ): List<MessageId> = messageIds.chunked(copyMessagesLimit.last).flatMap {
execute( execute(
CopyMessages( CopyMessages(
toChatId = toChatId, toChatId = toChatId,
@ -29,7 +29,7 @@ suspend fun TelegramBot.copyMessages(
) )
} }
suspend fun TelegramBot.copyMessages( public suspend fun TelegramBot.copyMessages(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageIds: Array<MessageId>, messageIds: Array<MessageId>,
@ -37,7 +37,7 @@ suspend fun TelegramBot.copyMessages(
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = copyMessages( ): List<MessageId> = copyMessages(
toChatId = toChatId, toChatId = toChatId,
fromChatId = fromChatId, fromChatId = fromChatId,
messageIds = messageIds.toList(), messageIds = messageIds.toList(),
@ -47,14 +47,14 @@ suspend fun TelegramBot.copyMessages(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.copyMessages( public suspend fun TelegramBot.copyMessages(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messagesMetas: List<Message.MetaInfo>, messagesMetas: List<Message.MetaInfo>,
threadId: MessageThreadId? = toChatId.threadId, threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = messagesMetas.groupBy { it.chatId }.flatMap { (chatId, messages) -> ): List<MessageId> = messagesMetas.groupBy { it.chatId }.flatMap { (chatId, messages) ->
copyMessages( copyMessages(
toChatId = toChatId, toChatId = toChatId,
fromChatId = chatId, fromChatId = chatId,
@ -67,14 +67,14 @@ suspend fun TelegramBot.copyMessages(
} }
@JvmName("copyMessagesWithMessages") @JvmName("copyMessagesWithMessages")
suspend fun TelegramBot.copyMessages( public suspend fun TelegramBot.copyMessages(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messages: List<AccessibleMessage>, messages: List<AccessibleMessage>,
threadId: MessageThreadId? = toChatId.threadId, threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = copyMessages( ): List<MessageId> = copyMessages(
toChatId = toChatId, toChatId = toChatId,
messagesMetas = messages.map { it.metaInfo }, messagesMetas = messages.map { it.metaInfo },
threadId = threadId, threadId = threadId,
@ -83,7 +83,7 @@ suspend fun TelegramBot.copyMessages(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.copy( public suspend fun TelegramBot.copy(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageIds: List<MessageId>, messageIds: List<MessageId>,
@ -91,7 +91,7 @@ suspend fun TelegramBot.copy(
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = copyMessages( ): List<MessageId> = copyMessages(
toChatId = toChatId, toChatId = toChatId,
fromChatId = fromChatId, fromChatId = fromChatId,
messageIds = messageIds, messageIds = messageIds,
@ -101,7 +101,7 @@ suspend fun TelegramBot.copy(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.copy( public suspend fun TelegramBot.copy(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
messageIds: Array<MessageId>, messageIds: Array<MessageId>,
@ -109,7 +109,7 @@ suspend fun TelegramBot.copy(
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = copyMessages( ): List<MessageId> = copyMessages(
toChatId = toChatId, toChatId = toChatId,
fromChatId = fromChatId, fromChatId = fromChatId,
messageIds = messageIds, messageIds = messageIds,
@ -119,14 +119,14 @@ suspend fun TelegramBot.copy(
removeCaption = removeCaption removeCaption = removeCaption
) )
suspend fun TelegramBot.copy( public suspend fun TelegramBot.copy(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messagesMetas: List<Message.MetaInfo>, messagesMetas: List<Message.MetaInfo>,
threadId: MessageThreadId? = toChatId.threadId, threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = copyMessages( ): List<MessageId> = copyMessages(
toChatId = toChatId, toChatId = toChatId,
messagesMetas = messagesMetas, messagesMetas = messagesMetas,
threadId = threadId, threadId = threadId,
@ -136,14 +136,14 @@ suspend fun TelegramBot.copy(
) )
@JvmName("copyWithMessages") @JvmName("copyWithMessages")
suspend fun TelegramBot.copy( public suspend fun TelegramBot.copy(
toChatId: ChatIdentifier, toChatId: ChatIdentifier,
messages: List<AccessibleMessage>, messages: List<AccessibleMessage>,
threadId: MessageThreadId? = toChatId.threadId, threadId: MessageThreadId? = toChatId.threadId,
disableNotification: Boolean = false, disableNotification: Boolean = false,
protectContent: Boolean = false, protectContent: Boolean = false,
removeCaption: Boolean = false removeCaption: Boolean = false
) = copyMessages( ): List<MessageId> = copyMessages(
toChatId = toChatId, toChatId = toChatId,
messages = messages, messages = messages,
threadId = threadId, threadId = threadId,

View File

@ -25,6 +25,7 @@ import dev.inmo.tgbotapi.types.files.Sticker
import dev.inmo.tgbotapi.types.games.Game import dev.inmo.tgbotapi.types.games.Game
import dev.inmo.tgbotapi.types.location.* import dev.inmo.tgbotapi.types.location.*
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage 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.content.*
import dev.inmo.tgbotapi.types.message.payments.PaidMedia import dev.inmo.tgbotapi.types.message.payments.PaidMedia
import dev.inmo.tgbotapi.types.message.payments.toTelegramMediaPhoto 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
phoneNumber: String, phoneNumber: String,
@ -59,7 +60,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendContact( ): ContentMessage<ContactContent> = sendContact(
replyInChatId, replyInChatId,
phoneNumber, phoneNumber,
firstName, 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
contact: Contact, contact: Contact,
@ -89,7 +90,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendContact( ): ContentMessage<ContactContent> = sendContact(
replyInChatId, replyInChatId,
contact, contact,
replyInThreadId, 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
animationType: DiceAnimationType? = null, animationType: DiceAnimationType? = null,
@ -120,13 +121,13 @@ suspend inline fun TelegramBot.replyWithDice(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<DiceContent> = 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
animationType: DiceAnimationType, animationType: DiceAnimationType,
@ -138,7 +139,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = replyWithDice(toChatId, toMessageId, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) ): ContentMessage<DiceContent> = replyWithDice(toChatId, toMessageId, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
// Location // 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
latitude: Double, latitude: Double,
@ -160,7 +161,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
replyInChatId, replyInChatId,
latitude, latitude,
longitude, 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
location: StaticLocation, location: StaticLocation,
@ -189,7 +190,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
replyInChatId, replyInChatId,
location, location,
replyInThreadId, 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
text: String, text: String,
@ -222,7 +223,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
replyInChatId, replyInChatId,
text, text,
parseMode, 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 * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
entities: TextSourcesList, entities: TextSourcesList,
@ -253,7 +254,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
replyInChatId, replyInChatId,
entities, entities,
linkPreviewOptions, linkPreviewOptions,
@ -270,7 +271,7 @@ suspend inline fun TelegramBot.reply(
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
separator: TextSource? = null, separator: TextSource? = null,
@ -284,13 +285,13 @@ suspend fun TelegramBot.reply(
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
separator: String, separator: String,
@ -304,7 +305,7 @@ suspend fun TelegramBot.reply(
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) ): ContentMessage<TextContent> = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
// Venue // Venue
@ -313,7 +314,7 @@ suspend fun TelegramBot.reply(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
latitude: Double, latitude: Double,
@ -332,7 +333,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = replyInChatId, chatId = replyInChatId,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@ -351,7 +352,7 @@ suspend inline fun TelegramBot.reply(
replyMarkup = replyMarkup replyMarkup = replyMarkup
) )
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
location: StaticLocation, location: StaticLocation,
@ -369,7 +370,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = replyInChatId, chatId = replyInChatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@ -388,7 +389,7 @@ suspend inline fun TelegramBot.reply(
replyMarkup = replyMarkup replyMarkup = replyMarkup
) )
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
venue: Venue, venue: Venue,
@ -400,7 +401,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = replyInChatId, chatId = replyInChatId,
venue = venue, venue = venue,
threadId = replyInThreadId, threadId = replyInThreadId,
@ -415,7 +416,7 @@ suspend inline fun TelegramBot.reply(
// Game // Game
suspend inline fun TelegramBot.replyWithGame( public suspend inline fun TelegramBot.replyWithGame(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
gameShortName: String, gameShortName: String,
@ -427,11 +428,11 @@ suspend inline fun TelegramBot.replyWithGame(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendGame( ): ContentMessage<GameContent> = sendGame(
replyInChatId, gameShortName, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
game: Game, game: Game,
@ -443,11 +444,11 @@ suspend inline fun TelegramBot.replyWithGame(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendGame( ): ContentMessage<GameContent> = sendGame(
replyInChatId, game.title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
game: Game, game: Game,
@ -459,12 +460,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = replyWithGame(toChatId, toMessageId, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup) ): ContentMessage<GameContent> = replyWithGame(toChatId, toMessageId, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
// Animation // Animation
suspend inline fun TelegramBot.replyWithAnimation( public suspend inline fun TelegramBot.replyWithAnimation(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
animation: InputFile, animation: InputFile,
@ -484,7 +485,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
replyInChatId, replyInChatId,
animation, animation,
thumb, thumb,
@ -504,7 +505,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
replyMarkup replyMarkup
) )
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
animation: AnimationFile, animation: AnimationFile,
@ -523,9 +524,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<AnimationContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
animation: InputFile, animation: InputFile,
@ -544,7 +545,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
replyInChatId, replyInChatId,
animation, animation,
thumb, thumb,
@ -563,7 +564,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
replyMarkup replyMarkup
) )
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
animation: AnimationFile, animation: AnimationFile,
@ -581,12 +582,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<AnimationContent> = sendAnimation(replyInChatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// Audio // Audio
suspend inline fun TelegramBot.replyWithAudio( public suspend inline fun TelegramBot.replyWithAudio(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
audio: InputFile, audio: InputFile,
@ -604,9 +605,9 @@ suspend inline fun TelegramBot.replyWithAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<AudioContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
audio: AudioFile, audio: AudioFile,
@ -621,9 +622,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<AudioContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
audio: InputFile, audio: InputFile,
@ -640,9 +641,9 @@ suspend inline fun TelegramBot.replyWithAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<AudioContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
audio: AudioFile, audio: AudioFile,
@ -656,12 +657,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<AudioContent> = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// Documents // Documents
suspend inline fun TelegramBot.replyWithDocument( public suspend inline fun TelegramBot.replyWithDocument(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
document: InputFile, document: InputFile,
@ -677,9 +678,9 @@ suspend inline fun TelegramBot.replyWithDocument(
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
document: DocumentFile, document: DocumentFile,
@ -694,9 +695,9 @@ suspend inline fun TelegramBot.reply(
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
document: InputFile, document: InputFile,
@ -711,9 +712,9 @@ suspend inline fun TelegramBot.replyWithDocument(
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
document: DocumentFile, document: DocumentFile,
@ -727,13 +728,13 @@ suspend inline fun TelegramBot.reply(
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection)
// Media Group // Media Group
@RiskFeature(rawSendingMediaGroupsWarning) @RiskFeature(rawSendingMediaGroupsWarning)
suspend inline fun TelegramBot.replyWithMediaGroup( public suspend inline fun TelegramBot.replyWithMediaGroup(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
media: List<MediaGroupMemberTelegramMedia>, media: List<MediaGroupMemberTelegramMedia>,
@ -744,9 +745,9 @@ suspend inline fun TelegramBot.replyWithMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
media: List<AudioMediaGroupMemberTelegramMedia>, media: List<AudioMediaGroupMemberTelegramMedia>,
@ -757,9 +758,9 @@ suspend inline fun TelegramBot.replyWithPlaylist(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendPlaylist(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) ): ContentMessage<MediaGroupContent<AudioContent>> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
media: List<DocumentMediaGroupMemberTelegramMedia>, media: List<DocumentMediaGroupMemberTelegramMedia>,
@ -770,9 +771,9 @@ suspend inline fun TelegramBot.replyWithDocuments(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendDocumentsGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) ): ContentMessage<MediaGroupContent<DocumentContent>> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
media: List<VisualMediaGroupMemberTelegramMedia>, media: List<VisualMediaGroupMemberTelegramMedia>,
@ -783,12 +784,12 @@ suspend inline fun TelegramBot.replyWithGallery(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply)) ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply))
// Photo // Photo
suspend inline fun TelegramBot.replyWithPhoto( public suspend inline fun TelegramBot.replyWithPhoto(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
fileId: InputFile, fileId: InputFile,
@ -804,9 +805,9 @@ suspend inline fun TelegramBot.replyWithPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto(replyInChatId, fileId, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PhotoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
photo: PhotoFile, photo: PhotoFile,
@ -822,9 +823,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto(replyInChatId, photo, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PhotoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
photoSize: PhotoSize, photoSize: PhotoSize,
@ -840,10 +841,10 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto(replyInChatId, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PhotoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
fileId: InputFile, fileId: InputFile,
@ -858,9 +859,9 @@ suspend inline fun TelegramBot.replyWithPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto(replyInChatId, fileId, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PhotoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
photo: PhotoFile, photo: PhotoFile,
@ -875,9 +876,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto(replyInChatId, photo, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PhotoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
photoSize: PhotoSize, photoSize: PhotoSize,
@ -892,12 +893,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto(replyInChatId, photoSize, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PhotoContent> = sendPhoto(replyInChatId, photoSize, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// Sticker // Sticker
suspend inline fun TelegramBot.replyWithSticker( public suspend inline fun TelegramBot.replyWithSticker(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
sticker: InputFile, sticker: InputFile,
@ -910,9 +911,9 @@ suspend inline fun TelegramBot.replyWithSticker(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<StickerContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
sticker: Sticker, sticker: Sticker,
@ -925,12 +926,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<StickerContent> = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// Videos // Videos
suspend inline fun TelegramBot.replyWithVideo( public suspend inline fun TelegramBot.replyWithVideo(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
video: InputFile, video: InputFile,
@ -950,9 +951,9 @@ suspend inline fun TelegramBot.replyWithVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<VideoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
video: VideoFile, video: VideoFile,
@ -968,9 +969,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo(replyInChatId, video, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VideoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
video: InputFile, video: InputFile,
@ -989,9 +990,9 @@ suspend inline fun TelegramBot.replyWithVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<VideoContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
video: VideoFile, video: VideoFile,
@ -1006,12 +1007,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo(replyInChatId, video, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VideoContent> = sendVideo(replyInChatId, video, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// VideoNotes // VideoNotes
suspend inline fun TelegramBot.replyWithVideoNote( public suspend inline fun TelegramBot.replyWithVideoNote(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
videoNote: InputFile, videoNote: InputFile,
@ -1026,9 +1027,9 @@ suspend inline fun TelegramBot.replyWithVideoNote(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(replyInChatId, videoNote, thumb, duration, size, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VideoNoteContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
videoNote: VideoNoteFile, videoNote: VideoNoteFile,
@ -1040,12 +1041,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VideoNoteContent> = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// Voice // Voice
suspend inline fun TelegramBot.replyWithVoice( public suspend inline fun TelegramBot.replyWithVoice(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
voice: InputFile, voice: InputFile,
@ -1060,9 +1061,9 @@ suspend inline fun TelegramBot.replyWithVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VoiceContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
voice: VoiceFile, voice: VoiceFile,
@ -1076,10 +1077,10 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VoiceContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
voice: InputFile, voice: InputFile,
@ -1093,9 +1094,9 @@ suspend inline fun TelegramBot.replyWithVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VoiceContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
voice: VoiceFile, voice: VoiceFile,
@ -1108,7 +1109,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<VoiceContent> = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
// Invoice // Invoice
@ -1117,7 +1118,7 @@ suspend inline fun TelegramBot.reply(
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
title: String, title: String,
@ -1144,12 +1145,12 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = 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<InvoiceContent> = 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 // Polls
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
question: String, question: String,
@ -1167,9 +1168,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
poll: RegularPoll, poll: RegularPoll,
@ -1188,10 +1189,10 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
questionTextSources: List<TextSource>, questionTextSources: List<TextSource>,
@ -1208,9 +1209,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
poll: RegularPoll, poll: RegularPoll,
@ -1228,9 +1229,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup) ): ContentMessage<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
question: String, question: String,
@ -1250,9 +1251,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
quizPoll: QuizPoll, quizPoll: QuizPoll,
@ -1274,9 +1275,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
questionTextSources: List<TextSource>, questionTextSources: List<TextSource>,
@ -1295,9 +1296,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
quizPoll: QuizPoll, quizPoll: QuizPoll,
@ -1318,9 +1319,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
question: String, question: String,
@ -1339,9 +1340,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
quizPoll: QuizPoll, quizPoll: QuizPoll,
@ -1362,9 +1363,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
questionTextSources: List<TextSource>, questionTextSources: List<TextSource>,
@ -1382,9 +1383,9 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
quizPoll: QuizPoll, quizPoll: QuizPoll,
@ -1404,10 +1405,10 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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<PollContent> = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
poll: Poll, poll: Poll,
@ -1424,7 +1425,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = when (poll) { ): ContentMessage<PollContent> = when (poll) {
is RegularPoll -> reply( is RegularPoll -> reply(
toChatId = toChatId, toChatId = toChatId,
toMessageId = toMessageId, toMessageId = toMessageId,
@ -1464,7 +1465,7 @@ suspend inline fun TelegramBot.reply(
replyMarkup = replyMarkup replyMarkup = replyMarkup
) )
} }
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
poll: Poll, poll: Poll,
@ -1481,7 +1482,7 @@ suspend inline fun TelegramBot.reply(
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = when (poll) { ): ContentMessage<PollContent> = when (poll) {
is RegularPoll -> reply( is RegularPoll -> reply(
toChatId = toChatId, toChatId = toChatId,
toMessageId = toMessageId, toMessageId = toMessageId,
@ -1524,7 +1525,7 @@ suspend inline fun TelegramBot.reply(
} }
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
fromChatId: ChatIdentifier, fromChatId: ChatIdentifier,
@ -1538,7 +1539,7 @@ suspend inline fun TelegramBot.reply(
protectContent: Boolean = false, protectContent: Boolean = false,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = copyMessage( ): MessageId = copyMessage(
replyInChatId, replyInChatId,
fromChatId, fromChatId,
messageId, messageId,
@ -1552,7 +1553,7 @@ suspend inline fun TelegramBot.reply(
replyMarkup replyMarkup
) )
suspend inline fun TelegramBot.reply( public suspend inline fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
fromChat: Chat, fromChat: Chat,
@ -1566,9 +1567,9 @@ suspend inline fun TelegramBot.reply(
protectContent: Boolean = false, protectContent: Boolean = false,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
copy: AccessibleMessage, copy: AccessibleMessage,
@ -1581,9 +1582,9 @@ suspend inline fun TelegramBot.reply(
protectContent: Boolean = false, protectContent: Boolean = false,
allowSendingWithoutReply: Boolean? = null, allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = 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, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
content: MessageContent, content: MessageContent,
@ -1615,7 +1616,7 @@ suspend fun TelegramBot.reply(
* *
* @see handleLiveLocation * @see handleLiveLocation
*/ */
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
locationsFlow: Flow<EditLiveLocationInfo>, locationsFlow: Flow<EditLiveLocationInfo>,
@ -1627,7 +1628,7 @@ suspend fun TelegramBot.reply(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = handleLiveLocation( ): Unit = handleLiveLocation(
replyInChatId, replyInChatId,
locationsFlow, locationsFlow,
liveTimeMillis, liveTimeMillis,
@ -1646,7 +1647,7 @@ suspend fun TelegramBot.reply(
*/ */
@JvmName("replyLiveLocationWithLocationChatIdAndMessageId") @JvmName("replyLiveLocationWithLocationChatIdAndMessageId")
@JsName("replyLiveLocationWithLocationChatIdAndMessageId") @JsName("replyLiveLocationWithLocationChatIdAndMessageId")
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
locationsFlow: Flow<Location>, locationsFlow: Flow<Location>,
@ -1679,7 +1680,7 @@ suspend fun TelegramBot.reply(
*/ */
@JvmName("replyLiveLocationWithLatLongChatIdAndMessageId") @JvmName("replyLiveLocationWithLatLongChatIdAndMessageId")
@JsName("replyLiveLocationWithLatLongChatIdAndMessageId") @JsName("replyLiveLocationWithLatLongChatIdAndMessageId")
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
locationsFlow: Flow<Pair<Double, Double>>, locationsFlow: Flow<Pair<Double, Double>>,
@ -1705,7 +1706,7 @@ suspend fun TelegramBot.reply(
) )
} }
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
mediaFile: TelegramMediaFile, mediaFile: TelegramMediaFile,
@ -1839,7 +1840,7 @@ suspend fun TelegramBot.reply(
} }
} }
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
content: TextedMediaContent, content: TextedMediaContent,
@ -1948,7 +1949,7 @@ suspend fun TelegramBot.reply(
} }
} }
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
content: TextedMediaContent, content: TextedMediaContent,
@ -2049,7 +2050,7 @@ suspend fun TelegramBot.reply(
} }
} }
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
starCount: Int, starCount: Int,
@ -2082,7 +2083,7 @@ suspend fun TelegramBot.reply(
) )
} }
suspend fun TelegramBot.reply( public suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier, toChatId: IdChatIdentifier,
toMessageId: MessageId, toMessageId: MessageId,
starCount: Int, starCount: Int,

View File

@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent
/** /**
* This method will send [content] to the [chatId] as is * This method will send [content] to the [chatId] as is
*/ */
suspend inline fun <T : MessageContent> TelegramBot.resend( public suspend inline fun <T : MessageContent> TelegramBot.resend(
chatId: ChatIdentifier, chatId: ChatIdentifier,
content: T, content: T,
messageThreadId: MessageThreadId? = chatId.threadId, messageThreadId: MessageThreadId? = chatId.threadId,
@ -19,7 +19,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<T> = execute(
content.createResend( content.createResend(
chatId = chatId, chatId = chatId,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,
@ -34,7 +34,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
/** /**
* This method will send [content] to the [chat] as is * This method will send [content] to the [chat] as is
*/ */
suspend inline fun <T : MessageContent> TelegramBot.resend( public suspend inline fun <T : MessageContent> TelegramBot.resend(
chat: Chat, chat: Chat,
content: T, content: T,
messageThreadId: MessageThreadId? = chat.id.threadId, messageThreadId: MessageThreadId? = chat.id.threadId,
@ -43,7 +43,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = resend( ): ContentMessage<T> = resend(
chatId = chat.id, chatId = chat.id,
content = content, content = content,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,
@ -59,7 +59,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
* native methods for data sending (like [dev.inmo.tgbotapi.extensions.api.send.media.sendPhoto] if inoming content is * 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]) * [dev.inmo.tgbotapi.types.message.content.PhotoContent])
*/ */
suspend inline fun <T : MessageContent> TelegramBot.resend( public suspend inline fun <T : MessageContent> TelegramBot.resend(
chatId: ChatIdentifier, chatId: ChatIdentifier,
message: ContentMessage<T>, message: ContentMessage<T>,
messageThreadId: MessageThreadId? = chatId.threadId, messageThreadId: MessageThreadId? = chatId.threadId,
@ -68,7 +68,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = resend( ): ContentMessage<T> = resend(
chatId = chatId, chatId = chatId,
content = message.content, content = message.content,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,
@ -84,7 +84,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
* native methods for data sending (like [dev.inmo.tgbotapi.extensions.api.send.media.sendPhoto] if inoming content is * 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]) * [dev.inmo.tgbotapi.types.message.content.PhotoContent])
*/ */
suspend inline fun <T : MessageContent> TelegramBot.resend( public suspend inline fun <T : MessageContent> TelegramBot.resend(
chat: Chat, chat: Chat,
message: ContentMessage<T>, message: ContentMessage<T>,
messageThreadId: MessageThreadId? = chat.id.threadId, messageThreadId: MessageThreadId? = chat.id.threadId,
@ -93,7 +93,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = resend( ): ContentMessage<T> = resend(
chatId = chat.id, chatId = chat.id,
message = message, message = message,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,

View File

@ -10,147 +10,147 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.threadId import dev.inmo.tgbotapi.types.threadId
suspend fun TelegramBot.sendBotAction( public suspend fun TelegramBot.sendBotAction(
chatId: ChatIdentifier, chatId: ChatIdentifier,
action: BotAction, action: BotAction,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
) = execute( ): Boolean = execute(
SendAction(chatId, action, threadId, businessConnectionId) SendAction(chatId, action, threadId, businessConnectionId)
) )
suspend fun TelegramBot.sendBotAction( public suspend fun TelegramBot.sendBotAction(
chat: Chat, chat: Chat,
action: BotAction, action: BotAction,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chatId: ChatIdentifier,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId 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, chat: Chat,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
) = sendBotAction(chat, ChooseStickerAction, threadId, businessConnectionId) ): Boolean = sendBotAction(chat, ChooseStickerAction, threadId, businessConnectionId)

View File

@ -12,10 +12,10 @@ import kotlinx.coroutines.*
import kotlin.contracts.* import kotlin.contracts.*
private const val refreshTime: MilliSeconds = (botActionActualityTime - 1) * 1000L private const val refreshTime: MilliSeconds = (botActionActualityTime - 1) * 1000L
typealias TelegramBotActionCallback<T> = suspend TelegramBot.() -> T public typealias TelegramBotActionCallback<T> = suspend TelegramBot.() -> T
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withAction( public suspend fun <T> TelegramBot.withAction(
actionRequest: SendAction, actionRequest: SendAction,
block: TelegramBotActionCallback<T> block: TelegramBotActionCallback<T>
): T { ): T {
@ -36,7 +36,7 @@ suspend fun <T> TelegramBot.withAction(
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withAction( public suspend fun <T> TelegramBot.withAction(
chatId: IdChatIdentifier, chatId: IdChatIdentifier,
action: BotAction, action: BotAction,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -53,7 +53,7 @@ suspend fun <T> TelegramBot.withAction(
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withAction( public suspend fun <T> TelegramBot.withAction(
chat: Chat, chat: Chat,
action: BotAction, action: BotAction,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -73,77 +73,77 @@ suspend fun <T> TelegramBot.withAction(
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withTypingAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withTypingAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, TypingAction, threadId, businessConnectionId, block) return withAction(chatId, TypingAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadPhotoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadPhotoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, UploadPhotoAction, threadId, businessConnectionId, block) return withAction(chatId, UploadPhotoAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withRecordVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withRecordVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, RecordVideoAction, threadId, businessConnectionId, block) return withAction(chatId, RecordVideoAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadVideoAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, UploadVideoAction, threadId, businessConnectionId, block) return withAction(chatId, UploadVideoAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withRecordVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withRecordVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, RecordVoiceAction, threadId, businessConnectionId, block) return withAction(chatId, RecordVoiceAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadVoiceAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, UploadVoiceAction, threadId, businessConnectionId, block) return withAction(chatId, UploadVoiceAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadDocumentAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadDocumentAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, UploadDocumentAction, threadId, businessConnectionId, block) return withAction(chatId, UploadDocumentAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withFindLocationAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withFindLocationAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, FindLocationAction, threadId, businessConnectionId, block) return withAction(chatId, FindLocationAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withRecordVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withRecordVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId, block) return withAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadVideoNoteAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId, block) return withAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, threadId: MessageThreadId? = chatId.threadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
@ -152,77 +152,77 @@ suspend fun <T> TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, th
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withTypingAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withTypingAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, TypingAction, threadId, businessConnectionId, block) return withAction(chat, TypingAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadPhotoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadPhotoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, UploadPhotoAction, threadId, businessConnectionId, block) return withAction(chat, UploadPhotoAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withRecordVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withRecordVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, RecordVideoAction, threadId, businessConnectionId, block) return withAction(chat, RecordVideoAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadVideoAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, UploadVideoAction, threadId, businessConnectionId, block) return withAction(chat, UploadVideoAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withRecordVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withRecordVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, RecordVoiceAction, threadId, businessConnectionId, block) return withAction(chat, RecordVoiceAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadVoiceAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, UploadVoiceAction, threadId, businessConnectionId, block) return withAction(chat, UploadVoiceAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadDocumentAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadDocumentAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, UploadDocumentAction, threadId, businessConnectionId, block) return withAction(chat, UploadDocumentAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withFindLocationAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withFindLocationAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, FindLocationAction, threadId, businessConnectionId, block) return withAction(chat, FindLocationAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withRecordVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withRecordVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, RecordVideoNoteAction, threadId, businessConnectionId, block) return withAction(chat, RecordVideoNoteAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withUploadVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withUploadVideoNoteAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }
return withAction(chat, UploadVideoNoteAction, threadId, businessConnectionId, block) return withAction(chat, UploadVideoNoteAction, threadId, businessConnectionId, block)
} }
@OptIn(ExperimentalContracts::class) @OptIn(ExperimentalContracts::class)
suspend fun <T> TelegramBot.withChooseStickerAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T { public suspend fun <T> TelegramBot.withChooseStickerAction(chat: Chat, threadId: MessageThreadId? = chat.id.threadId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, block: TelegramBotActionCallback<T>) : T {
contract { contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE) callsInPlace(block, InvocationKind.EXACTLY_ONCE)
} }

View File

@ -6,12 +6,14 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat 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 * @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 * [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, chatId: ChatIdentifier,
phoneNumber: String, phoneNumber: String,
firstName: String, firstName: String,
@ -23,7 +25,7 @@ suspend fun TelegramBot.sendContact(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<ContactContent> = execute(
SendContact( SendContact(
chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chatId: ChatIdentifier,
contact: Contact, contact: Contact,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -43,7 +45,7 @@ suspend fun TelegramBot.sendContact(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<ContactContent> = execute(
SendContact( SendContact(
chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
phoneNumber: String, phoneNumber: String,
firstName: String, firstName: String,
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendContact(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendContact( ): ContentMessage<ContactContent> = sendContact(
chat.id, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
contact: Contact, contact: Contact,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -83,6 +85,6 @@ suspend fun TelegramBot.sendContact(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendContact( ): ContentMessage<ContactContent> = sendContact(
chat.id, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup chat.id, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
) )

View File

@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.dice.DiceAnimationType 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 * @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 * [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, chatId: ChatIdentifier,
animationType: DiceAnimationType? = null, animationType: DiceAnimationType? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -22,7 +24,7 @@ suspend fun TelegramBot.sendDice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<DiceContent> = execute(
SendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) 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 * @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 * [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, chat: Chat,
animationType: DiceAnimationType? = null, animationType: DiceAnimationType? = null,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -40,4 +42,4 @@ suspend fun TelegramBot.sendDice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<DiceContent> = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.Location 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 * @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 * [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, chatId: ChatIdentifier,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -27,7 +29,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<LocationContent> = execute(
SendLiveLocation( SendLiveLocation(
chatId, chatId,
latitude, latitude,
@ -50,7 +52,7 @@ suspend fun TelegramBot.sendLocation(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chatId: ChatIdentifier,
location: Location, location: Location,
livePeriod: Seconds, livePeriod: Seconds,
@ -64,7 +66,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
chatId, chatId,
location.latitude, location.latitude,
location.longitude, 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 * @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 * [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, chat: Chat,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -100,7 +102,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
chat.id, chat.id,
latitude, latitude,
longitude, longitude,
@ -121,7 +123,7 @@ suspend fun TelegramBot.sendLocation(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chat: Chat,
location: Location, location: Location,
livePeriod: Seconds, livePeriod: Seconds,
@ -135,7 +137,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, 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 * @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 * [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, chatId: ChatIdentifier,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -171,13 +173,13 @@ suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = 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 * @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 * [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, chatId: ChatIdentifier,
location: Location, location: Location,
livePeriod: Seconds, livePeriod: Seconds,
@ -191,13 +193,13 @@ suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = 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 * @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 * [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, chat: Chat,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -212,13 +214,13 @@ suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = 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 * @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 * [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, chat: Chat,
location: Location, location: Location,
livePeriod: Seconds, livePeriod: Seconds,
@ -232,4 +234,4 @@ suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -8,6 +8,8 @@ import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat 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.types.message.textsources.TextSource
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
import dev.inmo.tgbotapi.utils.buildEntities 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 * @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 * [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, chatId: ChatIdentifier,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
@ -28,7 +30,7 @@ suspend fun TelegramBot.sendMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<TextContent> = execute(
SendTextMessage( SendTextMessage(
chatId, chatId,
text, text,
@ -48,7 +50,7 @@ suspend fun TelegramBot.sendMessage(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chatId: ChatIdentifier,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
@ -60,7 +62,7 @@ suspend fun TelegramBot.sendTextMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
@ -80,14 +82,14 @@ suspend fun TelegramBot.sendTextMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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 * @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 * [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, chat: Chat,
text: String, text: String,
parseMode: ParseMode? = null, parseMode: ParseMode? = null,
@ -99,13 +101,13 @@ suspend fun TelegramBot.sendMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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 * @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 * [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, chatId: ChatIdentifier,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -116,7 +118,7 @@ suspend fun TelegramBot.sendMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<TextContent> = execute(
SendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendMessage( public suspend fun TelegramBot.sendMessage(
chatId: ChatIdentifier, chatId: ChatIdentifier,
separator: TextSource? = null, separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -136,14 +138,14 @@ suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendMessage( public suspend fun TelegramBot.sendMessage(
chatId: ChatIdentifier, chatId: ChatIdentifier,
separator: String, separator: String,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -155,13 +157,13 @@ suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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 * @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 * [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, chatId: ChatIdentifier,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -172,7 +174,7 @@ suspend fun TelegramBot.sendTextMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendTextMessage( public suspend fun TelegramBot.sendTextMessage(
chatId: ChatIdentifier, chatId: ChatIdentifier,
separator: TextSource? = null, separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -192,14 +194,14 @@ suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendTextMessage( public suspend fun TelegramBot.sendTextMessage(
chatId: ChatIdentifier, chatId: ChatIdentifier,
separator: String, separator: String,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -211,13 +213,13 @@ suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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 * @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 * [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, chat: Chat,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -228,13 +230,13 @@ suspend fun TelegramBot.sendMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendMessage( public suspend fun TelegramBot.sendMessage(
chat: Chat, chat: Chat,
separator: TextSource? = null, separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -246,14 +248,14 @@ suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendMessage( public suspend fun TelegramBot.sendMessage(
chat: Chat, chat: Chat,
separator: String, separator: String,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -265,14 +267,14 @@ suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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 * @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 * [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, chat: Chat,
entities: TextSourcesList, entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -283,13 +285,13 @@ suspend fun TelegramBot.sendTextMessage(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendTextMessage( public suspend fun TelegramBot.sendTextMessage(
chat: Chat, chat: Chat,
separator: TextSource? = null, separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -301,14 +303,14 @@ suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = 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] * @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendTextMessage( public suspend fun TelegramBot.sendTextMessage(
chat: Chat, chat: Chat,
separator: String, separator: String,
linkPreviewOptions: LinkPreviewOptions? = null, linkPreviewOptions: LinkPreviewOptions? = null,
@ -320,4 +322,4 @@ suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<TextContent> = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.Location 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 * @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 * [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, chatId: ChatIdentifier,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -23,7 +25,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<LocationContent> = execute(
SendStaticLocation( SendStaticLocation(
chatId, chatId,
latitude, latitude,
@ -42,7 +44,7 @@ suspend fun TelegramBot.sendLocation(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chatId: ChatIdentifier,
location: Location, location: Location,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -52,7 +54,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
chatId, chatId,
location.latitude, location.latitude,
location.longitude, 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 * @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 * [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, chat: Chat,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -80,7 +82,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
chat.id, chat.id,
latitude, latitude,
longitude, longitude,
@ -97,7 +99,7 @@ suspend fun TelegramBot.sendLocation(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chat: Chat,
location: Location, location: Location,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -107,7 +109,7 @@ suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation( ): ContentMessage<LocationContent> = sendLocation(
chat.id, chat.id,
location.latitude, location.latitude,
location.longitude, 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 * @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 * [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, chatId: ChatIdentifier,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -135,13 +137,13 @@ suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = 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 * @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 * [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, chatId: ChatIdentifier,
location: Location, location: Location,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -151,13 +153,13 @@ suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = 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 * @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 * [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, chat: Chat,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -168,13 +170,13 @@ suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = 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 * @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 * [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, chat: Chat,
location: Location, location: Location,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -184,4 +186,4 @@ suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<LocationContent> = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -7,13 +7,15 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.StaticLocation 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 import dev.inmo.tgbotapi.types.venue.Venue
/** /**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chatId: ChatIdentifier,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -30,7 +32,7 @@ suspend fun TelegramBot.sendVenue(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VenueContent> = execute(
SendVenue( SendVenue(
chatId = chatId, chatId = chatId,
latitude = latitude, 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 * @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 * [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, chat: Chat,
latitude: Double, latitude: Double,
longitude: Double, longitude: Double,
@ -72,7 +74,7 @@ suspend fun TelegramBot.sendVenue(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chat.id, chatId = chat.id,
latitude = latitude, latitude = latitude,
longitude = longitude, 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 * @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 * [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, chatId: ChatIdentifier,
location: StaticLocation, location: StaticLocation,
title: String, title: String,
@ -111,7 +113,7 @@ suspend fun TelegramBot.sendVenue(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chatId, chatId = chatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, 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 * @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 * [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, chat: Chat,
location: StaticLocation, location: StaticLocation,
title: String, title: String,
@ -150,7 +152,7 @@ suspend fun TelegramBot.sendVenue(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, 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 * @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 * [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, chatId: ChatIdentifier,
venue: Venue, venue: Venue,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -183,7 +185,7 @@ suspend fun TelegramBot.sendVenue(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VenueContent> = execute(
SendVenue( SendVenue(
chatId = chatId, chatId = chatId,
venue = venue, 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 * @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 * [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, chat: Chat,
venue: Venue, venue: Venue,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -211,7 +213,7 @@ suspend fun TelegramBot.sendVenue(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chat.id, chatId = chat.id,
venue = venue, venue = venue,
threadId = threadId, threadId = threadId,

View File

@ -10,112 +10,112 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.reactions.Reaction import dev.inmo.tgbotapi.types.reactions.Reaction
import kotlin.jvm.JvmName import kotlin.jvm.JvmName
suspend fun TelegramBot.setMessageReactions( public suspend fun TelegramBot.setMessageReactions(
chatId: ChatIdentifier, chatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
reactions: List<Reaction> = emptyList(), reactions: List<Reaction> = emptyList(),
big: Boolean = false big: Boolean = false
) = execute( ): Boolean = execute(
SetMessageReactions(chatId, messageId, reactions, big) SetMessageReactions(chatId, messageId, reactions, big)
) )
suspend fun TelegramBot.setMessageReaction( public suspend fun TelegramBot.setMessageReaction(
chatId: ChatIdentifier, chatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
reaction: Reaction? = null, reaction: Reaction? = null,
big: Boolean = false 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, chat: Chat,
messageId: MessageId, messageId: MessageId,
reactions: List<Reaction> = emptyList(), reactions: List<Reaction> = emptyList(),
big: Boolean = false 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, chat: Chat,
messageId: MessageId, messageId: MessageId,
reaction: Reaction? = null, reaction: Reaction? = null,
big: Boolean = false 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, meta: Message.MetaInfo,
reactions: List<Reaction> = emptyList(), reactions: List<Reaction> = emptyList(),
big: Boolean = false 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, meta: Message.MetaInfo,
reaction: Reaction? = null, reaction: Reaction? = null,
big: Boolean = false 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, message: AccessibleMessage,
reactions: List<Reaction> = emptyList(), reactions: List<Reaction> = emptyList(),
big: Boolean = false 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, message: AccessibleMessage,
reaction: Reaction? = null, reaction: Reaction? = null,
big: Boolean = false big: Boolean = false
) = setMessageReaction(message.metaInfo, reaction, big) ): Boolean = setMessageReaction(message.metaInfo, reaction, big)
@JvmName("setMessageReactionsStrings") @JvmName("setMessageReactionsStrings")
suspend fun TelegramBot.setMessageReactions( public suspend fun TelegramBot.setMessageReactions(
chatId: ChatIdentifier, chatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
emojis: List<String>, emojis: List<String>,
big: Boolean = false 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, chatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
emoji: String?, emoji: String?,
big: Boolean = false big: Boolean = false
) = setMessageReaction(chatId, messageId, emoji ?.let { Reaction.Emoji(it) }, big) ): Boolean = setMessageReaction(chatId, messageId, emoji ?.let { Reaction.Emoji(it) }, big)
@JvmName("setMessageReactionsStrings") @JvmName("setMessageReactionsStrings")
suspend fun TelegramBot.setMessageReactions( public suspend fun TelegramBot.setMessageReactions(
chat: Chat, chat: Chat,
messageId: MessageId, messageId: MessageId,
emojis: List<String>, emojis: List<String>,
big: Boolean = false 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, chat: Chat,
messageId: MessageId, messageId: MessageId,
emoji: String?, emoji: String?,
big: Boolean = false big: Boolean = false
) = setMessageReaction(chat, messageId, emoji ?.let { Reaction.Emoji(it) }, big) ): Boolean = setMessageReaction(chat, messageId, emoji ?.let { Reaction.Emoji(it) }, big)
@JvmName("setMessageReactionsStrings") @JvmName("setMessageReactionsStrings")
suspend fun TelegramBot.setMessageReactions( public suspend fun TelegramBot.setMessageReactions(
meta: Message.MetaInfo, meta: Message.MetaInfo,
emojis: List<String>, emojis: List<String>,
big: Boolean = false 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, meta: Message.MetaInfo,
emoji: String?, emoji: String?,
big: Boolean = false big: Boolean = false
) = setMessageReaction(meta, emoji ?.let { Reaction.Emoji(it) }, big) ): Boolean = setMessageReaction(meta, emoji ?.let { Reaction.Emoji(it) }, big)
@JvmName("setMessageReactionsStrings") @JvmName("setMessageReactionsStrings")
suspend fun TelegramBot.setMessageReactions( public suspend fun TelegramBot.setMessageReactions(
message: AccessibleMessage, message: AccessibleMessage,
emojis: List<String>, emojis: List<String>,
big: Boolean = false 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, message: AccessibleMessage,
emoji: String?, emoji: String?,
big: Boolean = false big: Boolean = false
) = setMessageReaction(message, emoji ?.let { Reaction.Emoji(it) }, big) ): Boolean = setMessageReaction(message, emoji ?.let { Reaction.Emoji(it) }, big)

View File

@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.games.Game 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 * @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 * [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, chatId: ChatIdentifier,
gameShortName: String, gameShortName: String,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -22,7 +24,7 @@ suspend fun TelegramBot.sendGame(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<GameContent> = execute(
SendGame( SendGame(
chatId, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
gameShortName: String, gameShortName: String,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -42,7 +44,7 @@ suspend fun TelegramBot.sendGame(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendGame( ): ContentMessage<GameContent> = sendGame(
chat.id, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chatId: ChatIdentifier,
game: Game, game: Game,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -60,7 +62,7 @@ suspend fun TelegramBot.sendGame(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendGame( ): ContentMessage<GameContent> = sendGame(
chatId, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
game: Game, game: Game,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -78,6 +80,6 @@ suspend fun TelegramBot.sendGame(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendGame( ): ContentMessage<GameContent> = sendGame(
chat.id, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup chat.id, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
) )

View File

@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.AnimationFile 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 * @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 * [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, chatId: ChatIdentifier,
animation: InputFile, animation: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -33,7 +35,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<AnimationContent> = execute(
SendAnimation( SendAnimation(
chatId = chatId, chatId = chatId,
animation = animation, 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 * @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 * [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, chatId: ChatIdentifier,
animation: AnimationFile, animation: AnimationFile,
text: String? = null, text: String? = null,
@ -76,7 +78,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chatId, chatId = chatId,
animation = animation.fileId, animation = animation.fileId,
thumb = animation.thumbnail ?.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 * @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 * [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, chat: Chat,
animation: InputFile, animation: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -118,7 +120,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
thumb = thumb, 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 * @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 * [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, chat: Chat,
animation: AnimationFile, animation: AnimationFile,
text: String? = null, text: String? = null,
@ -159,7 +161,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
text = text, 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 * @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 * [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, chatId: ChatIdentifier,
animation: InputFile, animation: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -200,7 +202,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<AnimationContent> = execute(
SendAnimation( SendAnimation(
chatId = chatId, chatId = chatId,
animation = animation, 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 * @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 * [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, chatId: ChatIdentifier,
animation: AnimationFile, animation: AnimationFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -241,7 +243,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chatId, chatId = chatId,
animation = animation.fileId, animation = animation.fileId,
thumb = animation.thumbnail ?.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 * @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 * [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, chat: Chat,
animation: InputFile, animation: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -281,7 +283,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
thumb = thumb, 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 * @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 * [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, chat: Chat,
animation: AnimationFile, animation: AnimationFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -320,7 +322,7 @@ suspend fun TelegramBot.sendAnimation(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
entities = entities, entities = entities,

View File

@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.AudioFile 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 * @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 * [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, chatId: ChatIdentifier,
audio: InputFile, audio: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -31,7 +33,7 @@ suspend fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<AudioContent> = execute(
SendAudio( SendAudio(
chatId, chatId,
audio, audio,
@ -55,7 +57,7 @@ suspend fun TelegramBot.sendAudio(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chat: Chat,
audio: InputFile, audio: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -71,13 +73,13 @@ suspend fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<AudioContent> = 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 * @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 * [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, chatId: ChatIdentifier,
audio: AudioFile, audio: AudioFile,
text: String? = null, text: String? = null,
@ -90,13 +92,13 @@ suspend fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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<AudioContent> = 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 * @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 * [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, chat: Chat,
audio: AudioFile, audio: AudioFile,
text: String? = null, text: String? = null,
@ -109,14 +111,14 @@ suspend fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(chat.id, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<AudioContent> = 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 * @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 * [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, chatId: ChatIdentifier,
audio: InputFile, audio: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -131,7 +133,7 @@ suspend inline fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<AudioContent> = execute(
SendAudio( SendAudio(
chatId, chatId,
audio, 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 * @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 * [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, chat: Chat,
audio: InputFile, audio: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -169,13 +171,13 @@ suspend inline fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<AudioContent> = 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 * @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 * [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, chatId: ChatIdentifier,
audio: AudioFile, audio: AudioFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -187,13 +189,13 @@ suspend inline fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = 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<AudioContent> = 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 * @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 * [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, chat: Chat,
audio: AudioFile, audio: AudioFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -205,4 +207,4 @@ suspend inline fun TelegramBot.sendAudio(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<AudioContent> = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.DocumentFile 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 * @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 * [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, chatId: ChatIdentifier,
document: InputFile, document: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -29,7 +31,7 @@ suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = execute( ): ContentMessage<DocumentContent> = execute(
SendDocument( SendDocument(
chatId, chatId,
document, document,
@ -51,7 +53,7 @@ suspend fun TelegramBot.sendDocument(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chat: Chat,
document: InputFile, document: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -65,13 +67,13 @@ suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(chat.id, document, thumb, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = 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 * @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 * [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, chatId: ChatIdentifier,
document: DocumentFile, document: DocumentFile,
text: String? = null, text: String? = null,
@ -84,7 +86,7 @@ suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId, document.fileId, document.thumbnail ?.fileId, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection 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 * @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 * [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, chat: Chat,
document: DocumentFile, document: DocumentFile,
text: String? = null, text: String? = null,
@ -105,13 +107,13 @@ suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(chat.id, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = 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 * @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 * [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, chatId: ChatIdentifier,
document: InputFile, document: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -124,7 +126,7 @@ suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = execute( ): ContentMessage<DocumentContent> = execute(
SendDocument( SendDocument(
chatId, chatId,
document, 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 * @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 * [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, chat: Chat,
document: InputFile, document: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -158,13 +160,13 @@ suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(chat.id, document, thumb, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = 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 * @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 * [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, chatId: ChatIdentifier,
document: DocumentFile, document: DocumentFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -176,7 +178,7 @@ suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId, document.fileId, document.thumbnail ?.fileId, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection 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 * @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 * [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, chat: Chat,
document: DocumentFile, document: DocumentFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -196,4 +198,4 @@ suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
) = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection) ): ContentMessage<DocumentContent> = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)

View File

@ -6,10 +6,8 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.media.* import dev.inmo.tgbotapi.types.media.*
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.AudioContent
import dev.inmo.tgbotapi.types.message.content.DocumentContent
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
import kotlin.jvm.JvmName import kotlin.jvm.JvmName
@ -17,7 +15,7 @@ import kotlin.jvm.JvmName
* @see SendMediaGroup * @see SendMediaGroup
*/ */
@RiskFeature(rawSendingMediaGroupsWarning) @RiskFeature(rawSendingMediaGroupsWarning)
suspend fun TelegramBot.sendMediaGroup( public suspend fun TelegramBot.sendMediaGroup(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<MediaGroupMemberTelegramMedia>, media: List<MediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -26,7 +24,7 @@ suspend fun TelegramBot.sendMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = execute( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
SendMediaGroup<MediaGroupPartContent>( SendMediaGroup<MediaGroupPartContent>(
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -36,7 +34,7 @@ suspend fun TelegramBot.sendMediaGroup(
* @see SendMediaGroup * @see SendMediaGroup
*/ */
@RiskFeature(rawSendingMediaGroupsWarning) @RiskFeature(rawSendingMediaGroupsWarning)
suspend fun TelegramBot.sendMediaGroup( public suspend fun TelegramBot.sendMediaGroup(
chat: Chat, chat: Chat,
media: List<MediaGroupMemberTelegramMedia>, media: List<MediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -45,7 +43,7 @@ suspend fun TelegramBot.sendMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendMediaGroup( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -54,7 +52,7 @@ suspend fun TelegramBot.sendMediaGroup(
*/ */
@RiskFeature(rawSendingMediaGroupsWarning) @RiskFeature(rawSendingMediaGroupsWarning)
@JvmName("sendMedaGroupByContent") @JvmName("sendMedaGroupByContent")
suspend fun TelegramBot.sendMediaGroup( public suspend fun TelegramBot.sendMediaGroup(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<MediaGroupPartContent>, media: List<MediaGroupPartContent>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -63,7 +61,7 @@ suspend fun TelegramBot.sendMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendMediaGroup( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -72,7 +70,7 @@ suspend fun TelegramBot.sendMediaGroup(
*/ */
@RiskFeature(rawSendingMediaGroupsWarning) @RiskFeature(rawSendingMediaGroupsWarning)
@JvmName("sendMedaGroupByContent") @JvmName("sendMedaGroupByContent")
suspend fun TelegramBot.sendMediaGroup( public suspend fun TelegramBot.sendMediaGroup(
chat: Chat, chat: Chat,
media: List<MediaGroupPartContent>, media: List<MediaGroupPartContent>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -81,14 +79,14 @@ suspend fun TelegramBot.sendMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendMediaGroup( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
/** /**
* @see SendPlaylist * @see SendPlaylist
*/ */
suspend fun TelegramBot.sendPlaylist( public suspend fun TelegramBot.sendPlaylist(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<AudioMediaGroupMemberTelegramMedia>, media: List<AudioMediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -97,7 +95,7 @@ suspend fun TelegramBot.sendPlaylist(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = execute( ): ContentMessage<MediaGroupContent<AudioContent>> = execute(
SendPlaylist( SendPlaylist(
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -106,7 +104,7 @@ suspend fun TelegramBot.sendPlaylist(
/** /**
* @see SendPlaylist * @see SendPlaylist
*/ */
suspend fun TelegramBot.sendPlaylist( public suspend fun TelegramBot.sendPlaylist(
chat: Chat, chat: Chat,
media: List<AudioMediaGroupMemberTelegramMedia>, media: List<AudioMediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -115,7 +113,7 @@ suspend fun TelegramBot.sendPlaylist(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendPlaylist( ): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -123,7 +121,7 @@ suspend fun TelegramBot.sendPlaylist(
* @see SendPlaylist * @see SendPlaylist
*/ */
@JvmName("sendPlaylistByContent") @JvmName("sendPlaylistByContent")
suspend fun TelegramBot.sendPlaylist( public suspend fun TelegramBot.sendPlaylist(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<AudioContent>, media: List<AudioContent>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -132,7 +130,7 @@ suspend fun TelegramBot.sendPlaylist(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendPlaylist( ): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -140,7 +138,7 @@ suspend fun TelegramBot.sendPlaylist(
* @see SendPlaylist * @see SendPlaylist
*/ */
@JvmName("sendPlaylistByContent") @JvmName("sendPlaylistByContent")
suspend fun TelegramBot.sendPlaylist( public suspend fun TelegramBot.sendPlaylist(
chat: Chat, chat: Chat,
media: List<AudioContent>, media: List<AudioContent>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -149,14 +147,14 @@ suspend fun TelegramBot.sendPlaylist(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendPlaylist( ): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
/** /**
* @see SendDocumentsGroup * @see SendDocumentsGroup
*/ */
suspend fun TelegramBot.sendDocumentsGroup( public suspend fun TelegramBot.sendDocumentsGroup(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<DocumentMediaGroupMemberTelegramMedia>, media: List<DocumentMediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -165,7 +163,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = execute( ): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
SendDocumentsGroup( SendDocumentsGroup(
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -174,7 +172,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
/** /**
* @see SendDocumentsGroup * @see SendDocumentsGroup
*/ */
suspend fun TelegramBot.sendDocumentsGroup( public suspend fun TelegramBot.sendDocumentsGroup(
chat: Chat, chat: Chat,
media: List<DocumentMediaGroupMemberTelegramMedia>, media: List<DocumentMediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -183,7 +181,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendDocumentsGroup( ): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -191,7 +189,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
* @see SendDocumentsGroup * @see SendDocumentsGroup
*/ */
@JvmName("sendDocumentsByContent") @JvmName("sendDocumentsByContent")
suspend fun TelegramBot.sendDocumentsGroup( public suspend fun TelegramBot.sendDocumentsGroup(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<DocumentContent>, media: List<DocumentContent>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -200,7 +198,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendDocumentsGroup( ): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -208,7 +206,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
* @see SendDocumentsGroup * @see SendDocumentsGroup
*/ */
@JvmName("sendDocumentsByContent") @JvmName("sendDocumentsByContent")
suspend fun TelegramBot.sendDocumentsGroup( public suspend fun TelegramBot.sendDocumentsGroup(
chat: Chat, chat: Chat,
media: List<DocumentContent>, media: List<DocumentContent>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -217,14 +215,14 @@ suspend fun TelegramBot.sendDocumentsGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendDocumentsGroup( ): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
/** /**
* @see SendVisualMediaGroup * @see SendVisualMediaGroup
*/ */
suspend fun TelegramBot.sendVisualMediaGroup( public suspend fun TelegramBot.sendVisualMediaGroup(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<VisualMediaGroupMemberTelegramMedia>, media: List<VisualMediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -233,7 +231,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = execute( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
SendVisualMediaGroup( SendVisualMediaGroup(
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -242,7 +240,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
/** /**
* @see SendVisualMediaGroup * @see SendVisualMediaGroup
*/ */
suspend fun TelegramBot.sendVisualMediaGroup( public suspend fun TelegramBot.sendVisualMediaGroup(
chat: Chat, chat: Chat,
media: List<VisualMediaGroupMemberTelegramMedia>, media: List<VisualMediaGroupMemberTelegramMedia>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -251,7 +249,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendVisualMediaGroup( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -259,7 +257,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
* @see SendVisualMediaGroup * @see SendVisualMediaGroup
*/ */
@JvmName("sendVisualMediaGroupByContent") @JvmName("sendVisualMediaGroupByContent")
suspend fun TelegramBot.sendVisualMediaGroup( public suspend fun TelegramBot.sendVisualMediaGroup(
chatId: ChatIdentifier, chatId: ChatIdentifier,
media: List<VisualMediaGroupPartContent>, media: List<VisualMediaGroupPartContent>,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -268,7 +266,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendVisualMediaGroup( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )
@ -276,7 +274,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
* @see SendVisualMediaGroup * @see SendVisualMediaGroup
*/ */
@JvmName("sendVisualMediaGroupByContent") @JvmName("sendVisualMediaGroupByContent")
suspend fun TelegramBot.sendVisualMediaGroup( public suspend fun TelegramBot.sendVisualMediaGroup(
chat: Chat, chat: Chat,
media: List<VisualMediaGroupPartContent>, media: List<VisualMediaGroupPartContent>,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -285,6 +283,6 @@ suspend fun TelegramBot.sendVisualMediaGroup(
protectContent: Boolean = false, protectContent: Boolean = false,
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
) = sendVisualMediaGroup( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
) )

View File

@ -9,12 +9,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.media.TelegramPaidMedia 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 * @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 * [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, chatId: ChatIdentifier,
starCount: Int, starCount: Int,
media: List<TelegramPaidMedia>, media: List<TelegramPaidMedia>,
@ -27,7 +29,7 @@ suspend fun TelegramBot.sendPaidMedia(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PaidMediaInfoContent> = execute(
SendPaidMedia( SendPaidMedia(
chatId = chatId, chatId = chatId,
starCount = starCount, 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 * @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 * [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, chat: Chat,
starCount: Int, starCount: Int,
media: List<TelegramPaidMedia>, media: List<TelegramPaidMedia>,
@ -61,7 +63,7 @@ suspend fun TelegramBot.sendPaidMedia(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPaidMedia( ): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
chatId = chat.id, chatId = chat.id,
starCount = starCount, starCount = starCount,
media = media, 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 * @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 * [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, chatId: ChatIdentifier,
starCount: Int, starCount: Int,
media: List<TelegramPaidMedia>, media: List<TelegramPaidMedia>,
@ -93,7 +95,7 @@ suspend inline fun TelegramBot.sendPaidMedia(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PaidMediaInfoContent> = execute(
SendPaidMedia( SendPaidMedia(
chatId = chatId, chatId = chatId,
starCount = starCount, 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 * @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 * [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, chat: Chat,
starCount: Int, starCount: Int,
media: List<TelegramPaidMedia>, media: List<TelegramPaidMedia>,
@ -125,7 +127,7 @@ suspend inline fun TelegramBot.sendPaidMedia(
protectContent: Boolean = false, protectContent: Boolean = false,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPaidMedia( ): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
chatId = chat.id, chatId = chat.id,
starCount = starCount, starCount = starCount,
media = media, media = media,

View File

@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.* 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 * @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 * [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, chatId: ChatIdentifier,
fileId: InputFile, fileId: InputFile,
text: String? = null, text: String? = null,
@ -29,7 +31,7 @@ suspend fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PhotoContent> = execute(
SendPhoto( SendPhoto(
chatId = chatId, chatId = chatId,
photo = fileId, 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 * @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 * [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, chat: Chat,
fileId: InputFile, fileId: InputFile,
text: String? = null, text: String? = null,
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
fileId = fileId, fileId = fileId,
text = text, 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 * @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 * [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, chatId: ChatIdentifier,
photo: PhotoFile, photo: PhotoFile,
text: String? = null, text: String? = null,
@ -99,7 +101,7 @@ suspend fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"), fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"),
text = text, 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 * @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 * [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, chat: Chat,
photo: PhotoFile, photo: PhotoFile,
text: String? = null, text: String? = null,
@ -133,7 +135,7 @@ suspend fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photo = photo, photo = photo,
text = text, 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 * @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 * [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, chatId: ChatIdentifier,
photoSize: PhotoSize, photoSize: PhotoSize,
text: String? = null, text: String? = null,
@ -167,7 +169,7 @@ suspend fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photoSize.fileId, fileId = photoSize.fileId,
text = text, 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 * @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 * [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, chat: Chat,
photoSize: PhotoSize, photoSize: PhotoSize,
text: String? = null, text: String? = null,
@ -201,7 +203,7 @@ suspend fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photoSize = photoSize, photoSize = photoSize,
text = text, 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 * @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 * [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, chatId: ChatIdentifier,
fileId: InputFile, fileId: InputFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -235,7 +237,7 @@ suspend inline fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PhotoContent> = execute(
SendPhoto( SendPhoto(
chatId = chatId, chatId = chatId,
photo = fileId, 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 * @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 * [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, chat: Chat,
fileId: InputFile, fileId: InputFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -269,7 +271,7 @@ suspend inline fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
fileId = fileId, fileId = fileId,
entities = entities, 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 * @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 * [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, chatId: ChatIdentifier,
photo: PhotoFile, photo: PhotoFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -301,7 +303,7 @@ suspend inline fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"), fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"),
entities = entities, 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 * @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 * [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, chat: Chat,
photo: PhotoFile, photo: PhotoFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -333,7 +335,7 @@ suspend inline fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photo = photo, photo = photo,
entities = entities, 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 * @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 * [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, chatId: ChatIdentifier,
photoSize: PhotoSize, photoSize: PhotoSize,
entities: TextSourcesList, entities: TextSourcesList,
@ -365,7 +367,7 @@ suspend inline fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photoSize.fileId, fileId = photoSize.fileId,
entities = entities, 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 * @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 * [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, chat: Chat,
photoSize: PhotoSize, photoSize: PhotoSize,
entities: TextSourcesList, entities: TextSourcesList,
@ -397,7 +399,7 @@ suspend inline fun TelegramBot.sendPhoto(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photoSize = photoSize, photoSize = photoSize,
entities = entities, entities = entities,

View File

@ -8,12 +8,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.Sticker 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 * @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 * [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, chatId: ChatIdentifier,
sticker: InputFile, sticker: InputFile,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -24,7 +26,7 @@ suspend fun TelegramBot.sendSticker(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<StickerContent> = execute(
SendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) 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 * @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 * [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, chat: Chat,
sticker: InputFile, sticker: InputFile,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -43,13 +45,13 @@ suspend fun TelegramBot.sendSticker(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendSticker(chat.id, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<StickerContent> = 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 * @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 * [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, chatId: ChatIdentifier,
sticker: Sticker, sticker: Sticker,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -60,13 +62,13 @@ suspend fun TelegramBot.sendSticker(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendSticker(chatId, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<StickerContent> = 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 * @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 * [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, chat: Chat,
sticker: Sticker, sticker: Sticker,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -77,4 +79,4 @@ suspend fun TelegramBot.sendSticker(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<StickerContent> = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.VideoFile 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 * @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 * [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, chatId: ChatIdentifier,
video: InputFile, video: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -33,7 +35,7 @@ suspend fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VideoContent> = execute(
SendVideo( SendVideo(
chatId = chatId, chatId = chatId,
video = video, 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 * @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 * [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, chatId: ChatIdentifier,
video: VideoFile, video: VideoFile,
text: String? = null, text: String? = null,
@ -74,7 +76,7 @@ suspend fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chatId, chatId = chatId,
video = video.fileId, video = video.fileId,
thumb = video.thumbnail ?.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 * @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 * [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, chat: Chat,
video: InputFile, video: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -116,7 +118,7 @@ suspend fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
thumb = thumb, 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 * @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 * [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, chat: Chat,
video: VideoFile, video: VideoFile,
text: String? = null, text: String? = null,
@ -155,7 +157,7 @@ suspend fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
text = text, 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 * @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 * [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, chatId: ChatIdentifier,
video: InputFile, video: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -192,7 +194,7 @@ suspend inline fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VideoContent> = execute(
SendVideo( SendVideo(
chatId = chatId, chatId = chatId,
video = video, 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 * @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 * [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, chatId: ChatIdentifier,
video: VideoFile, video: VideoFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -231,7 +233,7 @@ suspend inline fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chatId, chatId = chatId,
video = video.fileId, video = video.fileId,
thumb = video.thumbnail ?.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 * @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 * [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, chat: Chat,
video: InputFile, video: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -271,7 +273,7 @@ suspend inline fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
thumb = thumb, 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 * @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 * [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, chat: Chat,
video: VideoFile, video: VideoFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -308,7 +310,7 @@ suspend inline fun TelegramBot.sendVideo(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
entities = entities, entities = entities,

View File

@ -8,12 +8,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.VideoNoteFile 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 * @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 * [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, chatId: ChatIdentifier,
videoNote: InputFile, videoNote: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -26,7 +28,7 @@ suspend fun TelegramBot.sendVideoNote(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VideoNoteContent> = execute(
SendVideoNote( SendVideoNote(
chatId, chatId,
videoNote, videoNote,
@ -47,7 +49,7 @@ suspend fun TelegramBot.sendVideoNote(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chatId: ChatIdentifier,
videoNote: VideoNoteFile, videoNote: VideoNoteFile,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
@ -57,7 +59,7 @@ suspend fun TelegramBot.sendVideoNote(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideoNote( ): ContentMessage<VideoNoteContent> = sendVideoNote(
chatId, videoNote.fileId, videoNote.thumbnail ?.fileId, videoNote.duration, videoNote.width, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
videoNote: InputFile, videoNote: InputFile,
thumb: InputFile? = null, thumb: InputFile? = null,
@ -78,13 +80,13 @@ suspend fun TelegramBot.sendVideoNote(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<VideoNoteContent> = 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 * @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 * [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, chat: Chat,
videoNote: VideoNoteFile, videoNote: VideoNoteFile,
threadId: MessageThreadId? = chat.id.threadId, threadId: MessageThreadId? = chat.id.threadId,
@ -94,4 +96,4 @@ suspend fun TelegramBot.sendVideoNote(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<VideoNoteContent> = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.VoiceFile 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 * @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 * [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, chatId: ChatIdentifier,
voice: InputFile, voice: InputFile,
text: String? = null, text: String? = null,
@ -28,7 +30,7 @@ suspend fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VoiceContent> = execute(
SendVoice( SendVoice(
chatId, chatId,
voice, voice,
@ -49,7 +51,7 @@ suspend fun TelegramBot.sendVoice(
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or * @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 * [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, chat: Chat,
voice: InputFile, voice: InputFile,
text: String? = null, text: String? = null,
@ -62,13 +64,13 @@ suspend fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(chat.id, voice, text, parseMode, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<VoiceContent> = 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 * @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 * [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, chatId: ChatIdentifier,
voice: VoiceFile, voice: VoiceFile,
text: String? = null, text: String? = null,
@ -80,7 +82,7 @@ suspend fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId, voice.fileId, text, parseMode, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
voice: VoiceFile, voice: VoiceFile,
text: String? = null, text: String? = null,
@ -100,14 +102,14 @@ suspend fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(chat.id, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<VoiceContent> = 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 * @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 * [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, chatId: ChatIdentifier,
voice: InputFile, voice: InputFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -119,7 +121,7 @@ suspend inline fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<VoiceContent> = execute(
SendVoice( SendVoice(
chatId = chatId, chatId = chatId,
voice = voice, 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 * @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 * [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, chat: Chat,
voice: InputFile, voice: InputFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -151,13 +153,13 @@ suspend inline fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(chat.id, voice, entities, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<VoiceContent> = 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 * @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 * [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, chatId: ChatIdentifier,
voice: VoiceFile, voice: VoiceFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -168,14 +170,14 @@ suspend inline fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId, voice.fileId, entities, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup 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 * @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 * [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, chat: Chat,
voice: VoiceFile, voice: VoiceFile,
entities: TextSourcesList, entities: TextSourcesList,
@ -186,4 +188,4 @@ suspend inline fun TelegramBot.sendVoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) ): ContentMessage<VoiceContent> = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@ -2,15 +2,11 @@ package dev.inmo.tgbotapi.extensions.api.send.payments
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink 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.LabeledPrice
import dev.inmo.tgbotapi.types.payments.abstracts.Currency import dev.inmo.tgbotapi.types.payments.abstracts.Currency
import dev.inmo.tgbotapi.types.payments.abstracts.XTR import dev.inmo.tgbotapi.types.payments.abstracts.XTR
suspend fun TelegramBot.createInvoiceLink( public suspend fun TelegramBot.createInvoiceLink(
title: String, title: String,
description: String, description: String,
payload: String, payload: String,
@ -27,14 +23,14 @@ suspend fun TelegramBot.createInvoiceLink(
shouldSendPhoneNumberToProvider: Boolean = false, shouldSendPhoneNumberToProvider: Boolean = false,
shouldSendEmailToProvider: Boolean = false, shouldSendEmailToProvider: Boolean = false,
priceDependOnShipAddress: 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) 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 * For links witn XTR currency and using of Telegram Stars
*/ */
suspend fun TelegramBot.createInvoiceLink( public suspend fun TelegramBot.createInvoiceLink(
title: String, title: String,
description: String, description: String,
payload: String, payload: String,
@ -49,6 +45,6 @@ suspend fun TelegramBot.createInvoiceLink(
shouldSendPhoneNumberToProvider: Boolean = false, shouldSendPhoneNumberToProvider: Boolean = false,
shouldSendEmailToProvider: Boolean = false, shouldSendEmailToProvider: Boolean = false,
priceDependOnShipAddress: 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) CreateInvoiceLink(title, description, payload, null, Currency.XTR, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
) )

View File

@ -6,12 +6,12 @@ import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.payments.SuccessfulPayment import dev.inmo.tgbotapi.types.payments.SuccessfulPayment
import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId
suspend fun TelegramBot.refundStarPayment( public suspend fun TelegramBot.refundStarPayment(
userId: UserId, userId: UserId,
telegramPaymentChargeId: TelegramPaymentChargeId telegramPaymentChargeId: TelegramPaymentChargeId
) = execute(RefundStarPayment(userId, telegramPaymentChargeId)) ): Boolean = execute(RefundStarPayment(userId, telegramPaymentChargeId))
suspend fun TelegramBot.refundStarPayment( public suspend fun TelegramBot.refundStarPayment(
userId: UserId, userId: UserId,
successfulPayment: SuccessfulPayment successfulPayment: SuccessfulPayment
) = refundStarPayment(userId, successfulPayment.telegramPaymentChargeId) ): Boolean = refundStarPayment(userId, successfulPayment.telegramPaymentChargeId)

View File

@ -5,6 +5,8 @@ import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.CommonUser 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.LabeledPrice
import dev.inmo.tgbotapi.types.payments.abstracts.Currency import dev.inmo.tgbotapi.types.payments.abstracts.Currency
import dev.inmo.tgbotapi.types.payments.abstracts.XTR 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] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendInvoice( public suspend fun TelegramBot.sendInvoice(
chatId: IdChatIdentifier, chatId: IdChatIdentifier,
title: String, title: String,
description: String, description: String,
@ -38,7 +40,7 @@ suspend fun TelegramBot.sendInvoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = execute( ): ContentMessage<InvoiceContent> = 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) 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] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendInvoice( public suspend fun TelegramBot.sendInvoice(
user: CommonUser, user: CommonUser,
title: String, title: String,
description: String, description: String,
@ -70,14 +72,14 @@ suspend fun TelegramBot.sendInvoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = 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<InvoiceContent> = 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] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendInvoice( public suspend fun TelegramBot.sendInvoice(
chatId: IdChatIdentifier, chatId: IdChatIdentifier,
title: String, title: String,
description: String, description: String,
@ -91,7 +93,7 @@ suspend fun TelegramBot.sendInvoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = execute( ): ContentMessage<InvoiceContent> = execute(
SendInvoice(chatId, title, description, payload, price, startParameter, providerData, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup) 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] * @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that * as a builder for that
*/ */
suspend fun TelegramBot.sendInvoice( public suspend fun TelegramBot.sendInvoice(
user: CommonUser, user: CommonUser,
title: String, title: String,
description: String, description: String,
@ -112,7 +114,7 @@ suspend fun TelegramBot.sendInvoice(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
) = sendInvoice( ): ContentMessage<InvoiceContent> = sendInvoice(
chatId = user.id, chatId = user.id,
title = title, title = title,
description = description, description = description,

View File

@ -6,12 +6,14 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.ParseMode 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.message.textsources.TextSource
import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.InputPollOption
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -30,7 +32,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
question, question,
@ -53,7 +55,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -71,7 +73,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
questionEntities, questionEntities,
@ -93,7 +95,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -111,7 +113,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
question, question,
@ -134,7 +136,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -151,7 +153,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
questionEntities, questionEntities,
@ -172,7 +174,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -190,7 +192,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
question, question,
@ -212,7 +214,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -229,7 +231,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
questionEntities, questionEntities,
@ -250,7 +252,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -267,7 +269,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
question, question,
@ -288,7 +290,7 @@ suspend fun TelegramBot.sendQuizPoll(
) )
) )
suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -304,7 +306,7 @@ suspend fun TelegramBot.sendQuizPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId, chatId,
questionEntities, questionEntities,

View File

@ -6,12 +6,14 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.ParseMode 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.message.textsources.TextSource
import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.InputPollOption
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
suspend fun TelegramBot.sendRegularPoll( public suspend fun TelegramBot.sendRegularPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -28,7 +30,7 @@ suspend fun TelegramBot.sendRegularPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId, chatId,
question, question,
@ -49,7 +51,7 @@ suspend fun TelegramBot.sendRegularPoll(
) )
) )
suspend fun TelegramBot.sendRegularPoll( public suspend fun TelegramBot.sendRegularPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendRegularPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId, chatId,
questionEntities, questionEntities,
@ -85,7 +87,7 @@ suspend fun TelegramBot.sendRegularPoll(
) )
) )
suspend fun TelegramBot.sendRegularPoll( public suspend fun TelegramBot.sendRegularPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -101,7 +103,7 @@ suspend fun TelegramBot.sendRegularPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId, chatId,
question, question,
@ -121,7 +123,7 @@ suspend fun TelegramBot.sendRegularPoll(
) )
) )
suspend fun TelegramBot.sendRegularPoll( public suspend fun TelegramBot.sendRegularPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
@ -136,7 +138,7 @@ suspend fun TelegramBot.sendRegularPoll(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
) = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId, chatId,
questionEntities, questionEntities,