mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
moving to an explicit API mode
refactored `send` package (an effin' huge one!)
This commit is contained in:
parent
ed39fde776
commit
f36373b718
@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -25,7 +25,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): MessageId = execute(
|
||||
CopyMessage(
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -45,7 +45,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -57,13 +57,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
toChat: Chat,
|
||||
@ -75,13 +75,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
toChat: Chat,
|
||||
@ -93,14 +93,14 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -111,7 +111,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): MessageId = execute(
|
||||
CopyMessage(
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -130,7 +130,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -141,13 +141,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(fromChat.id, messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
toChat: Chat,
|
||||
@ -158,13 +158,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChatId, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(fromChatId, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
toChat: Chat,
|
||||
@ -175,13 +175,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(fromChat.id, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: AccessibleMessage,
|
||||
text: String? = null,
|
||||
@ -192,13 +192,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
message: AccessibleMessage,
|
||||
text: String? = null,
|
||||
@ -209,13 +209,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(message.chat, message.messageId, toChat, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(message.chat, message.messageId, toChat, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: AccessibleMessage,
|
||||
entities: TextSourcesList,
|
||||
@ -225,13 +225,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(message.chat, message.messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(message.chat, message.messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
message: AccessibleMessage,
|
||||
entities: TextSourcesList,
|
||||
@ -241,13 +241,13 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(message.chat, message.messageId, toChat, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
): MessageId = copyMessage(message.chat, message.messageId, toChat, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
@ -259,7 +259,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): MessageId = execute(
|
||||
CopyMessage(
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -279,7 +279,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
@ -291,7 +291,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
toChatId,
|
||||
fromChat.id,
|
||||
messageId,
|
||||
@ -309,7 +309,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
@ -321,7 +321,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
toChat.id,
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -339,7 +339,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
@ -351,7 +351,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
toChat.id,
|
||||
fromChat.id,
|
||||
messageId,
|
||||
@ -370,7 +370,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
@ -381,7 +381,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): MessageId = execute(
|
||||
CopyMessage(
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -400,7 +400,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
@ -411,7 +411,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
toChatId,
|
||||
fromChat.id,
|
||||
messageId,
|
||||
@ -428,7 +428,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
@ -439,7 +439,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
toChat.id,
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -456,7 +456,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
public suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
fromChat: Chat,
|
||||
messageId: MessageId,
|
||||
@ -467,7 +467,7 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
toChat.id,
|
||||
fromChat.id,
|
||||
messageId,
|
||||
|
@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import kotlin.jvm.JvmName
|
||||
|
||||
suspend fun TelegramBot.copyMessages(
|
||||
public suspend fun TelegramBot.copyMessages(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageIds: List<MessageId>,
|
||||
@ -15,7 +15,7 @@ suspend fun TelegramBot.copyMessages(
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = messageIds.chunked(copyMessagesLimit.last).flatMap {
|
||||
): List<MessageId> = messageIds.chunked(copyMessagesLimit.last).flatMap {
|
||||
execute(
|
||||
CopyMessages(
|
||||
toChatId = toChatId,
|
||||
@ -29,7 +29,7 @@ suspend fun TelegramBot.copyMessages(
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.copyMessages(
|
||||
public suspend fun TelegramBot.copyMessages(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageIds: Array<MessageId>,
|
||||
@ -37,7 +37,7 @@ suspend fun TelegramBot.copyMessages(
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = copyMessages(
|
||||
): List<MessageId> = copyMessages(
|
||||
toChatId = toChatId,
|
||||
fromChatId = fromChatId,
|
||||
messageIds = messageIds.toList(),
|
||||
@ -47,14 +47,14 @@ suspend fun TelegramBot.copyMessages(
|
||||
removeCaption = removeCaption
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.copyMessages(
|
||||
public suspend fun TelegramBot.copyMessages(
|
||||
toChatId: ChatIdentifier,
|
||||
messagesMetas: List<Message.MetaInfo>,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = messagesMetas.groupBy { it.chatId }.flatMap { (chatId, messages) ->
|
||||
): List<MessageId> = messagesMetas.groupBy { it.chatId }.flatMap { (chatId, messages) ->
|
||||
copyMessages(
|
||||
toChatId = toChatId,
|
||||
fromChatId = chatId,
|
||||
@ -67,14 +67,14 @@ suspend fun TelegramBot.copyMessages(
|
||||
}
|
||||
|
||||
@JvmName("copyMessagesWithMessages")
|
||||
suspend fun TelegramBot.copyMessages(
|
||||
public suspend fun TelegramBot.copyMessages(
|
||||
toChatId: ChatIdentifier,
|
||||
messages: List<AccessibleMessage>,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = copyMessages(
|
||||
): List<MessageId> = copyMessages(
|
||||
toChatId = toChatId,
|
||||
messagesMetas = messages.map { it.metaInfo },
|
||||
threadId = threadId,
|
||||
@ -83,7 +83,7 @@ suspend fun TelegramBot.copyMessages(
|
||||
removeCaption = removeCaption
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.copy(
|
||||
public suspend fun TelegramBot.copy(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageIds: List<MessageId>,
|
||||
@ -91,7 +91,7 @@ suspend fun TelegramBot.copy(
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = copyMessages(
|
||||
): List<MessageId> = copyMessages(
|
||||
toChatId = toChatId,
|
||||
fromChatId = fromChatId,
|
||||
messageIds = messageIds,
|
||||
@ -101,7 +101,7 @@ suspend fun TelegramBot.copy(
|
||||
removeCaption = removeCaption
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.copy(
|
||||
public suspend fun TelegramBot.copy(
|
||||
toChatId: ChatIdentifier,
|
||||
fromChatId: ChatIdentifier,
|
||||
messageIds: Array<MessageId>,
|
||||
@ -109,7 +109,7 @@ suspend fun TelegramBot.copy(
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = copyMessages(
|
||||
): List<MessageId> = copyMessages(
|
||||
toChatId = toChatId,
|
||||
fromChatId = fromChatId,
|
||||
messageIds = messageIds,
|
||||
@ -119,14 +119,14 @@ suspend fun TelegramBot.copy(
|
||||
removeCaption = removeCaption
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.copy(
|
||||
public suspend fun TelegramBot.copy(
|
||||
toChatId: ChatIdentifier,
|
||||
messagesMetas: List<Message.MetaInfo>,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = copyMessages(
|
||||
): List<MessageId> = copyMessages(
|
||||
toChatId = toChatId,
|
||||
messagesMetas = messagesMetas,
|
||||
threadId = threadId,
|
||||
@ -136,14 +136,14 @@ suspend fun TelegramBot.copy(
|
||||
)
|
||||
|
||||
@JvmName("copyWithMessages")
|
||||
suspend fun TelegramBot.copy(
|
||||
public suspend fun TelegramBot.copy(
|
||||
toChatId: ChatIdentifier,
|
||||
messages: List<AccessibleMessage>,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
removeCaption: Boolean = false
|
||||
) = copyMessages(
|
||||
): List<MessageId> = copyMessages(
|
||||
toChatId = toChatId,
|
||||
messages = messages,
|
||||
threadId = threadId,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,7 @@ import dev.inmo.tgbotapi.types.files.Sticker
|
||||
import dev.inmo.tgbotapi.types.games.Game
|
||||
import dev.inmo.tgbotapi.types.location.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.*
|
||||
import dev.inmo.tgbotapi.types.message.payments.PaidMedia
|
||||
import dev.inmo.tgbotapi.types.message.payments.toTelegramMediaPhoto
|
||||
@ -45,7 +46,7 @@ import kotlin.jvm.JvmName
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
phoneNumber: String,
|
||||
@ -59,7 +60,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendContact(
|
||||
): ContentMessage<ContactContent> = sendContact(
|
||||
replyInChatId,
|
||||
phoneNumber,
|
||||
firstName,
|
||||
@ -77,7 +78,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
contact: Contact,
|
||||
@ -89,7 +90,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendContact(
|
||||
): ContentMessage<ContactContent> = sendContact(
|
||||
replyInChatId,
|
||||
contact,
|
||||
replyInThreadId,
|
||||
@ -108,7 +109,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.replyWithDice(
|
||||
public suspend inline fun TelegramBot.replyWithDice(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
animationType: DiceAnimationType? = null,
|
||||
@ -120,13 +121,13 @@ suspend inline fun TelegramBot.replyWithDice(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendDice(replyInChatId, animationType, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
animationType: DiceAnimationType,
|
||||
@ -138,7 +139,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithDice(toChatId, toMessageId, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
): ContentMessage<DiceContent> = replyWithDice(toChatId, toMessageId, animationType, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
// Location
|
||||
@ -147,7 +148,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
latitude: Double,
|
||||
@ -160,7 +161,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
replyInChatId,
|
||||
latitude,
|
||||
longitude,
|
||||
@ -177,7 +178,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
location: StaticLocation,
|
||||
@ -189,7 +190,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
replyInChatId,
|
||||
location,
|
||||
replyInThreadId,
|
||||
@ -208,7 +209,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
text: String,
|
||||
@ -222,7 +223,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendTextMessage(
|
||||
): ContentMessage<TextContent> = sendTextMessage(
|
||||
replyInChatId,
|
||||
text,
|
||||
parseMode,
|
||||
@ -240,7 +241,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
entities: TextSourcesList,
|
||||
@ -253,7 +254,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendTextMessage(
|
||||
): ContentMessage<TextContent> = sendTextMessage(
|
||||
replyInChatId,
|
||||
entities,
|
||||
linkPreviewOptions,
|
||||
@ -270,7 +271,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
separator: TextSource? = null,
|
||||
@ -284,13 +285,13 @@ suspend fun TelegramBot.reply(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
separator: String,
|
||||
@ -304,7 +305,7 @@ suspend fun TelegramBot.reply(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
): ContentMessage<TextContent> = reply(toChatId, toMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
// Venue
|
||||
@ -313,7 +314,7 @@ suspend fun TelegramBot.reply(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
latitude: Double,
|
||||
@ -332,7 +333,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = replyInChatId,
|
||||
latitude = latitude,
|
||||
longitude = longitude,
|
||||
@ -351,7 +352,7 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
location: StaticLocation,
|
||||
@ -369,7 +370,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = replyInChatId,
|
||||
latitude = location.latitude,
|
||||
longitude = location.longitude,
|
||||
@ -388,7 +389,7 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
venue: Venue,
|
||||
@ -400,7 +401,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = replyInChatId,
|
||||
venue = venue,
|
||||
threadId = replyInThreadId,
|
||||
@ -415,7 +416,7 @@ suspend inline fun TelegramBot.reply(
|
||||
|
||||
// Game
|
||||
|
||||
suspend inline fun TelegramBot.replyWithGame(
|
||||
public suspend inline fun TelegramBot.replyWithGame(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
gameShortName: String,
|
||||
@ -427,11 +428,11 @@ suspend inline fun TelegramBot.replyWithGame(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendGame(
|
||||
): ContentMessage<GameContent> = sendGame(
|
||||
replyInChatId, gameShortName, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.replyWithGame(
|
||||
public suspend inline fun TelegramBot.replyWithGame(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
game: Game,
|
||||
@ -443,11 +444,11 @@ suspend inline fun TelegramBot.replyWithGame(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendGame(
|
||||
): ContentMessage<GameContent> = sendGame(
|
||||
replyInChatId, game.title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
game: Game,
|
||||
@ -459,12 +460,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithGame(toChatId, toMessageId, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
): ContentMessage<GameContent> = replyWithGame(toChatId, toMessageId, game, replyInChatId, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
// Animation
|
||||
|
||||
suspend inline fun TelegramBot.replyWithAnimation(
|
||||
public suspend inline fun TelegramBot.replyWithAnimation(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
animation: InputFile,
|
||||
@ -484,7 +485,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
replyInChatId,
|
||||
animation,
|
||||
thumb,
|
||||
@ -504,7 +505,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
animation: AnimationFile,
|
||||
@ -523,9 +524,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(replyInChatId, animation, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
animation: InputFile,
|
||||
@ -544,7 +545,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
replyInChatId,
|
||||
animation,
|
||||
thumb,
|
||||
@ -563,7 +564,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
animation: AnimationFile,
|
||||
@ -581,12 +582,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(replyInChatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<AnimationContent> = sendAnimation(replyInChatId, animation, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// Audio
|
||||
|
||||
suspend inline fun TelegramBot.replyWithAudio(
|
||||
public suspend inline fun TelegramBot.replyWithAudio(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
audio: InputFile,
|
||||
@ -604,9 +605,9 @@ suspend inline fun TelegramBot.replyWithAudio(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(replyInChatId, audio, thumb, text, parseMode, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
audio: AudioFile,
|
||||
@ -621,9 +622,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(replyInChatId, audio, text, parseMode, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
audio: InputFile,
|
||||
@ -640,9 +641,9 @@ suspend inline fun TelegramBot.replyWithAudio(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(replyInChatId, audio, thumb, entities, duration, performer, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
audio: AudioFile,
|
||||
@ -656,12 +657,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<AudioContent> = sendAudio(replyInChatId, audio, entities, title, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// Documents
|
||||
|
||||
suspend inline fun TelegramBot.replyWithDocument(
|
||||
public suspend inline fun TelegramBot.replyWithDocument(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
document: InputFile,
|
||||
@ -677,9 +678,9 @@ suspend inline fun TelegramBot.replyWithDocument(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(replyInChatId, document, thumb, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
document: DocumentFile,
|
||||
@ -694,9 +695,9 @@ suspend inline fun TelegramBot.reply(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(replyInChatId, document, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
document: InputFile,
|
||||
@ -711,9 +712,9 @@ suspend inline fun TelegramBot.replyWithDocument(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(replyInChatId, document, thumb, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
document: DocumentFile,
|
||||
@ -727,13 +728,13 @@ suspend inline fun TelegramBot.reply(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<DocumentContent> = sendDocument(replyInChatId, document, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup, disableContentTypeDetection)
|
||||
|
||||
|
||||
// Media Group
|
||||
|
||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||
suspend inline fun TelegramBot.replyWithMediaGroup(
|
||||
public suspend inline fun TelegramBot.replyWithMediaGroup(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
media: List<MediaGroupMemberTelegramMedia>,
|
||||
@ -744,9 +745,9 @@ suspend inline fun TelegramBot.replyWithMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = sendMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply))
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||
@ -757,9 +758,9 @@ suspend inline fun TelegramBot.replyWithPlaylist(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = sendPlaylist(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply))
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||
@ -770,9 +771,9 @@ suspend inline fun TelegramBot.replyWithDocuments(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = sendDocumentsGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply))
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||
@ -783,12 +784,12 @@ suspend inline fun TelegramBot.replyWithGallery(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply))
|
||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(replyInChatId, media, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply))
|
||||
|
||||
|
||||
// Photo
|
||||
|
||||
suspend inline fun TelegramBot.replyWithPhoto(
|
||||
public suspend inline fun TelegramBot.replyWithPhoto(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
fileId: InputFile,
|
||||
@ -804,9 +805,9 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(replyInChatId, fileId, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
photo: PhotoFile,
|
||||
@ -822,9 +823,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(replyInChatId, photo, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
photoSize: PhotoSize,
|
||||
@ -840,10 +841,10 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(replyInChatId, photoSize, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
fileId: InputFile,
|
||||
@ -858,9 +859,9 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(replyInChatId, fileId, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
photo: PhotoFile,
|
||||
@ -875,9 +876,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(replyInChatId, photo, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
photoSize: PhotoSize,
|
||||
@ -892,12 +893,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(replyInChatId, photoSize, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<PhotoContent> = sendPhoto(replyInChatId, photoSize, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// Sticker
|
||||
|
||||
suspend inline fun TelegramBot.replyWithSticker(
|
||||
public suspend inline fun TelegramBot.replyWithSticker(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
sticker: InputFile,
|
||||
@ -910,9 +911,9 @@ suspend inline fun TelegramBot.replyWithSticker(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
sticker: Sticker,
|
||||
@ -925,12 +926,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<StickerContent> = sendSticker(replyInChatId, sticker, replyInThreadId, replyInBusinessConnectionId, emoji, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// Videos
|
||||
|
||||
suspend inline fun TelegramBot.replyWithVideo(
|
||||
public suspend inline fun TelegramBot.replyWithVideo(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
video: InputFile,
|
||||
@ -950,9 +951,9 @@ suspend inline fun TelegramBot.replyWithVideo(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(replyInChatId, video, thumb, text, parseMode, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
video: VideoFile,
|
||||
@ -968,9 +969,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(replyInChatId, video, text, parseMode, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
video: InputFile,
|
||||
@ -989,9 +990,9 @@ suspend inline fun TelegramBot.replyWithVideo(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(replyInChatId, video, thumb, entities, showCaptionAboveMedia, spoilered, duration, width, height, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
video: VideoFile,
|
||||
@ -1006,12 +1007,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(replyInChatId, video, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<VideoContent> = sendVideo(replyInChatId, video, entities, showCaptionAboveMedia, spoilered, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// VideoNotes
|
||||
|
||||
suspend inline fun TelegramBot.replyWithVideoNote(
|
||||
public suspend inline fun TelegramBot.replyWithVideoNote(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
videoNote: InputFile,
|
||||
@ -1026,9 +1027,9 @@ suspend inline fun TelegramBot.replyWithVideoNote(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideoNote(replyInChatId, videoNote, thumb, duration, size, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
videoNote: VideoNoteFile,
|
||||
@ -1040,12 +1041,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<VideoNoteContent> = sendVideoNote(replyInChatId, videoNote, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// Voice
|
||||
|
||||
suspend inline fun TelegramBot.replyWithVoice(
|
||||
public suspend inline fun TelegramBot.replyWithVoice(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
voice: InputFile,
|
||||
@ -1060,9 +1061,9 @@ suspend inline fun TelegramBot.replyWithVoice(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(replyInChatId, voice, text, parseMode, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
voice: VoiceFile,
|
||||
@ -1076,10 +1077,10 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(replyInChatId, voice, text, parseMode, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
voice: InputFile,
|
||||
@ -1093,9 +1094,9 @@ suspend inline fun TelegramBot.replyWithVoice(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(replyInChatId, voice, entities, duration, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
voice: VoiceFile,
|
||||
@ -1108,7 +1109,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<VoiceContent> = sendVoice(replyInChatId, voice, entities, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
|
||||
|
||||
// Invoice
|
||||
@ -1117,7 +1118,7 @@ suspend inline fun TelegramBot.reply(
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
title: String,
|
||||
@ -1144,12 +1145,12 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = sendInvoice(replyInChatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, replyInThreadId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
question: String,
|
||||
@ -1167,9 +1168,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
poll: RegularPoll,
|
||||
@ -1188,10 +1189,10 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendRegularPoll(replyInChatId, question, options, closeInfo, questionParseMode, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
questionTextSources: List<TextSource>,
|
||||
@ -1208,9 +1209,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, isClosed, allowMultipleAnswers, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
poll: RegularPoll,
|
||||
@ -1228,9 +1229,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendRegularPoll(replyInChatId, questionTextSources, options, closeInfo, isAnonymous, allowMultipleAnswers, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
question: String,
|
||||
@ -1250,9 +1251,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
quizPoll: QuizPoll,
|
||||
@ -1274,9 +1275,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
questionTextSources: List<TextSource>,
|
||||
@ -1295,9 +1296,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
quizPoll: QuizPoll,
|
||||
@ -1318,9 +1319,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanation, explanationParseMode, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
question: String,
|
||||
@ -1339,9 +1340,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
quizPoll: QuizPoll,
|
||||
@ -1362,9 +1363,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, question, options, correctOptionId, closeInfo, questionParseMode, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
questionTextSources: List<TextSource>,
|
||||
@ -1382,9 +1383,9 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
quizPoll: QuizPoll,
|
||||
@ -1404,10 +1405,10 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendQuizPoll(replyInChatId, questionTextSources, options, correctOptionId, closeInfo, explanationTextSources, isAnonymous, isClosed, replyInThreadId, replyInBusinessConnectionId, disableNotification, protectContent, effectId, ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply), replyMarkup)
|
||||
): ContentMessage<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,
|
||||
toMessageId: MessageId,
|
||||
poll: Poll,
|
||||
@ -1424,7 +1425,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = when (poll) {
|
||||
): ContentMessage<PollContent> = when (poll) {
|
||||
is RegularPoll -> reply(
|
||||
toChatId = toChatId,
|
||||
toMessageId = toMessageId,
|
||||
@ -1464,7 +1465,7 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
}
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
poll: Poll,
|
||||
@ -1481,7 +1482,7 @@ suspend inline fun TelegramBot.reply(
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = when (poll) {
|
||||
): ContentMessage<PollContent> = when (poll) {
|
||||
is RegularPoll -> reply(
|
||||
toChatId = toChatId,
|
||||
toMessageId = toMessageId,
|
||||
@ -1524,7 +1525,7 @@ suspend inline fun TelegramBot.reply(
|
||||
}
|
||||
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
fromChatId: ChatIdentifier,
|
||||
@ -1538,7 +1539,7 @@ suspend inline fun TelegramBot.reply(
|
||||
protectContent: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(
|
||||
): MessageId = copyMessage(
|
||||
replyInChatId,
|
||||
fromChatId,
|
||||
messageId,
|
||||
@ -1552,7 +1553,7 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
fromChat: Chat,
|
||||
@ -1566,9 +1567,9 @@ suspend inline fun TelegramBot.reply(
|
||||
protectContent: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||
): MessageId = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
suspend inline fun TelegramBot.reply(
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
copy: AccessibleMessage,
|
||||
@ -1581,9 +1582,9 @@ suspend inline fun TelegramBot.reply(
|
||||
protectContent: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||
): MessageId = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, showCaptionAboveMedia, replyInChatId, replyInThreadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
content: MessageContent,
|
||||
@ -1615,7 +1616,7 @@ suspend fun TelegramBot.reply(
|
||||
*
|
||||
* @see handleLiveLocation
|
||||
*/
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
locationsFlow: Flow<EditLiveLocationInfo>,
|
||||
@ -1627,7 +1628,7 @@ suspend fun TelegramBot.reply(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = handleLiveLocation(
|
||||
): Unit = handleLiveLocation(
|
||||
replyInChatId,
|
||||
locationsFlow,
|
||||
liveTimeMillis,
|
||||
@ -1646,7 +1647,7 @@ suspend fun TelegramBot.reply(
|
||||
*/
|
||||
@JvmName("replyLiveLocationWithLocationChatIdAndMessageId")
|
||||
@JsName("replyLiveLocationWithLocationChatIdAndMessageId")
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
locationsFlow: Flow<Location>,
|
||||
@ -1679,7 +1680,7 @@ suspend fun TelegramBot.reply(
|
||||
*/
|
||||
@JvmName("replyLiveLocationWithLatLongChatIdAndMessageId")
|
||||
@JsName("replyLiveLocationWithLatLongChatIdAndMessageId")
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
locationsFlow: Flow<Pair<Double, Double>>,
|
||||
@ -1705,7 +1706,7 @@ suspend fun TelegramBot.reply(
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
mediaFile: TelegramMediaFile,
|
||||
@ -1839,7 +1840,7 @@ suspend fun TelegramBot.reply(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
content: TextedMediaContent,
|
||||
@ -1948,7 +1949,7 @@ suspend fun TelegramBot.reply(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
content: TextedMediaContent,
|
||||
@ -2049,7 +2050,7 @@ suspend fun TelegramBot.reply(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
starCount: Int,
|
||||
@ -2082,7 +2083,7 @@ suspend fun TelegramBot.reply(
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
public suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
starCount: Int,
|
||||
|
@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent
|
||||
/**
|
||||
* This method will send [content] to the [chatId] as is
|
||||
*/
|
||||
suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
chatId: ChatIdentifier,
|
||||
content: T,
|
||||
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||
@ -19,7 +19,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<T> = execute(
|
||||
content.createResend(
|
||||
chatId = chatId,
|
||||
messageThreadId = messageThreadId,
|
||||
@ -34,7 +34,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
/**
|
||||
* 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,
|
||||
content: T,
|
||||
messageThreadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -43,7 +43,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = resend(
|
||||
): ContentMessage<T> = resend(
|
||||
chatId = chat.id,
|
||||
content = content,
|
||||
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
|
||||
* [dev.inmo.tgbotapi.types.message.content.PhotoContent])
|
||||
*/
|
||||
suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
chatId: ChatIdentifier,
|
||||
message: ContentMessage<T>,
|
||||
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||
@ -68,7 +68,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = resend(
|
||||
): ContentMessage<T> = resend(
|
||||
chatId = chatId,
|
||||
content = message.content,
|
||||
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
|
||||
* [dev.inmo.tgbotapi.types.message.content.PhotoContent])
|
||||
*/
|
||||
suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
chat: Chat,
|
||||
message: ContentMessage<T>,
|
||||
messageThreadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -93,7 +93,7 @@ suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = resend(
|
||||
): ContentMessage<T> = resend(
|
||||
chatId = chat.id,
|
||||
message = message,
|
||||
messageThreadId = messageThreadId,
|
||||
|
@ -10,147 +10,147 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.threadId
|
||||
|
||||
suspend fun TelegramBot.sendBotAction(
|
||||
public suspend fun TelegramBot.sendBotAction(
|
||||
chatId: ChatIdentifier,
|
||||
action: BotAction,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = execute(
|
||||
): Boolean = execute(
|
||||
SendAction(chatId, action, threadId, businessConnectionId)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendBotAction(
|
||||
public suspend fun TelegramBot.sendBotAction(
|
||||
chat: Chat,
|
||||
action: BotAction,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat.id, action, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat.id, action, threadId, businessConnectionId)
|
||||
|
||||
|
||||
suspend fun TelegramBot.sendActionTyping(
|
||||
public suspend fun TelegramBot.sendActionTyping(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, TypingAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, TypingAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadPhoto(
|
||||
public suspend fun TelegramBot.sendActionUploadPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, UploadPhotoAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, UploadPhotoAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionRecordVideo(
|
||||
public suspend fun TelegramBot.sendActionRecordVideo(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, RecordVideoAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, RecordVideoAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadVideo(
|
||||
public suspend fun TelegramBot.sendActionUploadVideo(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, UploadVideoAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, UploadVideoAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionRecordVoice(
|
||||
public suspend fun TelegramBot.sendActionRecordVoice(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, RecordVoiceAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, RecordVoiceAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadVoice(
|
||||
public suspend fun TelegramBot.sendActionUploadVoice(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, UploadVoiceAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, UploadVoiceAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadDocument(
|
||||
public suspend fun TelegramBot.sendActionUploadDocument(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, UploadDocumentAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, UploadDocumentAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionFindLocation(
|
||||
public suspend fun TelegramBot.sendActionFindLocation(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, FindLocationAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, FindLocationAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionRecordVideoNote(
|
||||
public suspend fun TelegramBot.sendActionRecordVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadVideoNote(
|
||||
public suspend fun TelegramBot.sendActionUploadVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
|
||||
) = sendBotAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId)
|
||||
|
||||
|
||||
suspend fun TelegramBot.sendActionTyping(
|
||||
public suspend fun TelegramBot.sendActionTyping(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, TypingAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, TypingAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadPhoto(
|
||||
public suspend fun TelegramBot.sendActionUploadPhoto(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, UploadPhotoAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, UploadPhotoAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionRecordVideo(
|
||||
public suspend fun TelegramBot.sendActionRecordVideo(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, RecordVideoAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, RecordVideoAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadVideo(
|
||||
public suspend fun TelegramBot.sendActionUploadVideo(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, UploadVideoAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, UploadVideoAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionRecordVoice(
|
||||
public suspend fun TelegramBot.sendActionRecordVoice(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, RecordVoiceAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, RecordVoiceAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadVoice(
|
||||
public suspend fun TelegramBot.sendActionUploadVoice(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, UploadVoiceAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, UploadVoiceAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadDocument(
|
||||
public suspend fun TelegramBot.sendActionUploadDocument(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, UploadDocumentAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, UploadDocumentAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionFindLocation(
|
||||
public suspend fun TelegramBot.sendActionFindLocation(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, FindLocationAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, FindLocationAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionRecordVideoNote(
|
||||
public suspend fun TelegramBot.sendActionRecordVideoNote(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, RecordVideoNoteAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, RecordVideoNoteAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionUploadVideoNote(
|
||||
public suspend fun TelegramBot.sendActionUploadVideoNote(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, UploadVideoNoteAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, UploadVideoNoteAction, threadId, businessConnectionId)
|
||||
|
||||
suspend fun TelegramBot.sendActionChooseStickerAction(
|
||||
public suspend fun TelegramBot.sendActionChooseStickerAction(
|
||||
chat: Chat,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
|
||||
) = sendBotAction(chat, ChooseStickerAction, threadId, businessConnectionId)
|
||||
): Boolean = sendBotAction(chat, ChooseStickerAction, threadId, businessConnectionId)
|
||||
|
||||
|
@ -12,10 +12,10 @@ import kotlinx.coroutines.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
private const val refreshTime: MilliSeconds = (botActionActualityTime - 1) * 1000L
|
||||
typealias TelegramBotActionCallback<T> = suspend TelegramBot.() -> T
|
||||
public typealias TelegramBotActionCallback<T> = suspend TelegramBot.() -> T
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
suspend fun <T> TelegramBot.withAction(
|
||||
public suspend fun <T> TelegramBot.withAction(
|
||||
actionRequest: SendAction,
|
||||
block: TelegramBotActionCallback<T>
|
||||
): T {
|
||||
@ -36,7 +36,7 @@ suspend fun <T> TelegramBot.withAction(
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
suspend fun <T> TelegramBot.withAction(
|
||||
public suspend fun <T> TelegramBot.withAction(
|
||||
chatId: IdChatIdentifier,
|
||||
action: BotAction,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -53,7 +53,7 @@ suspend fun <T> TelegramBot.withAction(
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
suspend fun <T> TelegramBot.withAction(
|
||||
public suspend fun <T> TelegramBot.withAction(
|
||||
chat: Chat,
|
||||
action: BotAction,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -73,77 +73,77 @@ suspend fun <T> TelegramBot.withAction(
|
||||
}
|
||||
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, TypingAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, UploadPhotoAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, RecordVideoAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, UploadVideoAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, RecordVoiceAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, UploadVoiceAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, UploadDocumentAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, FindLocationAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, RecordVideoNoteAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chatId, UploadVideoNoteAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
@ -152,77 +152,77 @@ suspend fun <T> TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, th
|
||||
|
||||
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, TypingAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, UploadPhotoAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, RecordVideoAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, UploadVideoAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, RecordVoiceAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, UploadVoiceAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, UploadDocumentAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, FindLocationAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, RecordVideoNoteAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return withAction(chat, UploadVideoNoteAction, threadId, businessConnectionId, block)
|
||||
}
|
||||
@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 {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
|
@ -6,12 +6,14 @@ import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
public suspend fun TelegramBot.sendContact(
|
||||
chatId: ChatIdentifier,
|
||||
phoneNumber: String,
|
||||
firstName: String,
|
||||
@ -23,7 +25,7 @@ suspend fun TelegramBot.sendContact(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<ContactContent> = execute(
|
||||
SendContact(
|
||||
chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
@ -33,7 +35,7 @@ suspend fun TelegramBot.sendContact(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
public suspend fun TelegramBot.sendContact(
|
||||
chatId: ChatIdentifier,
|
||||
contact: Contact,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -43,7 +45,7 @@ suspend fun TelegramBot.sendContact(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<ContactContent> = execute(
|
||||
SendContact(
|
||||
chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
@ -53,7 +55,7 @@ suspend fun TelegramBot.sendContact(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
public suspend fun TelegramBot.sendContact(
|
||||
chat: Chat,
|
||||
phoneNumber: String,
|
||||
firstName: String,
|
||||
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendContact(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendContact(
|
||||
): ContentMessage<ContactContent> = sendContact(
|
||||
chat.id, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -73,7 +75,7 @@ suspend fun TelegramBot.sendContact(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
public suspend fun TelegramBot.sendContact(
|
||||
chat: Chat,
|
||||
contact: Contact,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -83,6 +85,6 @@ suspend fun TelegramBot.sendContact(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendContact(
|
||||
): ContentMessage<ContactContent> = sendContact(
|
||||
chat.id, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendDice(
|
||||
public suspend fun TelegramBot.sendDice(
|
||||
chatId: ChatIdentifier,
|
||||
animationType: DiceAnimationType? = null,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -22,7 +24,7 @@ suspend fun TelegramBot.sendDice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<DiceContent> = execute(
|
||||
SendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
)
|
||||
|
||||
@ -30,7 +32,7 @@ suspend fun TelegramBot.sendDice(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendDice(
|
||||
public suspend fun TelegramBot.sendDice(
|
||||
chat: Chat,
|
||||
animationType: DiceAnimationType? = null,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -40,4 +42,4 @@ suspend fun TelegramBot.sendDice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<DiceContent> = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.Location
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -27,7 +29,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<LocationContent> = execute(
|
||||
SendLiveLocation(
|
||||
chatId,
|
||||
latitude,
|
||||
@ -50,7 +52,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: Location,
|
||||
livePeriod: Seconds,
|
||||
@ -64,7 +66,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
chatId,
|
||||
location.latitude,
|
||||
location.longitude,
|
||||
@ -85,7 +87,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -100,7 +102,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
chat.id,
|
||||
latitude,
|
||||
longitude,
|
||||
@ -121,7 +123,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
livePeriod: Seconds,
|
||||
@ -135,7 +137,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
chatId = chat.id,
|
||||
latitude = location.latitude,
|
||||
longitude = location.longitude,
|
||||
@ -156,7 +158,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLiveLocation(
|
||||
public suspend fun TelegramBot.sendLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -171,13 +173,13 @@ suspend fun TelegramBot.sendLiveLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLiveLocation(
|
||||
public suspend fun TelegramBot.sendLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: Location,
|
||||
livePeriod: Seconds,
|
||||
@ -191,13 +193,13 @@ suspend fun TelegramBot.sendLiveLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLiveLocation(
|
||||
public suspend fun TelegramBot.sendLiveLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -212,13 +214,13 @@ suspend fun TelegramBot.sendLiveLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLiveLocation(
|
||||
public suspend fun TelegramBot.sendLiveLocation(
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
livePeriod: Seconds,
|
||||
@ -232,4 +234,4 @@ suspend fun TelegramBot.sendLiveLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<LocationContent> = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -8,6 +8,8 @@ import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.buildEntities
|
||||
@ -16,7 +18,7 @@ import dev.inmo.tgbotapi.utils.buildEntities
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -28,7 +30,7 @@ suspend fun TelegramBot.sendMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<TextContent> = execute(
|
||||
SendTextMessage(
|
||||
chatId,
|
||||
text,
|
||||
@ -48,7 +50,7 @@ suspend fun TelegramBot.sendMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -60,7 +62,7 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendMessage(
|
||||
): ContentMessage<TextContent> = sendMessage(
|
||||
chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -68,7 +70,7 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -80,14 +82,14 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -99,13 +101,13 @@ suspend fun TelegramBot.sendMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -116,7 +118,7 @@ suspend fun TelegramBot.sendMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<TextContent> = execute(
|
||||
SendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
)
|
||||
|
||||
@ -124,7 +126,7 @@ suspend fun TelegramBot.sendMessage(
|
||||
* @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -136,14 +138,14 @@ suspend fun TelegramBot.sendMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -155,13 +157,13 @@ suspend fun TelegramBot.sendMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -172,7 +174,7 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendMessage(
|
||||
): ContentMessage<TextContent> = sendMessage(
|
||||
chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -180,7 +182,7 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
* @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -192,14 +194,14 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -211,13 +213,13 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -228,13 +230,13 @@ suspend fun TelegramBot.sendMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -246,14 +248,14 @@ suspend fun TelegramBot.sendMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
public suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -265,14 +267,14 @@ suspend fun TelegramBot.sendMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
entities: TextSourcesList,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -283,13 +285,13 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
separator: TextSource? = null,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -301,14 +303,14 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
public suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
separator: String,
|
||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||
@ -320,4 +322,4 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<TextContent> = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.Location
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -23,7 +25,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<LocationContent> = execute(
|
||||
SendStaticLocation(
|
||||
chatId,
|
||||
latitude,
|
||||
@ -42,7 +44,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: Location,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -52,7 +54,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
chatId,
|
||||
location.latitude,
|
||||
location.longitude,
|
||||
@ -69,7 +71,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -80,7 +82,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
chat.id,
|
||||
latitude,
|
||||
longitude,
|
||||
@ -97,7 +99,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
public suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -107,7 +109,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(
|
||||
): ContentMessage<LocationContent> = sendLocation(
|
||||
chat.id,
|
||||
location.latitude,
|
||||
location.longitude,
|
||||
@ -124,7 +126,7 @@ suspend fun TelegramBot.sendLocation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
public suspend fun TelegramBot.sendStaticLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -135,13 +137,13 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
public suspend fun TelegramBot.sendStaticLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: Location,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -151,13 +153,13 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
public suspend fun TelegramBot.sendStaticLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -168,13 +170,13 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
public suspend fun TelegramBot.sendStaticLocation(
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -184,4 +186,4 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<LocationContent> = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -7,13 +7,15 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.VenueContent
|
||||
import dev.inmo.tgbotapi.types.venue.Venue
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
public suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -30,7 +32,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VenueContent> = execute(
|
||||
SendVenue(
|
||||
chatId = chatId,
|
||||
latitude = latitude,
|
||||
@ -55,7 +57,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
public suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -72,7 +74,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = chat.id,
|
||||
latitude = latitude,
|
||||
longitude = longitude,
|
||||
@ -95,7 +97,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
public suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
location: StaticLocation,
|
||||
title: String,
|
||||
@ -111,7 +113,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = chatId,
|
||||
latitude = location.latitude,
|
||||
longitude = location.longitude,
|
||||
@ -134,7 +136,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
public suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
location: StaticLocation,
|
||||
title: String,
|
||||
@ -150,7 +152,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = chat.id,
|
||||
latitude = location.latitude,
|
||||
longitude = location.longitude,
|
||||
@ -173,7 +175,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
public suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
venue: Venue,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -183,7 +185,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VenueContent> = execute(
|
||||
SendVenue(
|
||||
chatId = chatId,
|
||||
venue = venue,
|
||||
@ -201,7 +203,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
public suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
venue: Venue,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -211,7 +213,7 @@ suspend fun TelegramBot.sendVenue(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVenue(
|
||||
): ContentMessage<VenueContent> = sendVenue(
|
||||
chatId = chat.id,
|
||||
venue = venue,
|
||||
threadId = threadId,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10,112 +10,112 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||
import kotlin.jvm.JvmName
|
||||
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
reactions: List<Reaction> = emptyList(),
|
||||
big: Boolean = false
|
||||
) = execute(
|
||||
): Boolean = execute(
|
||||
SetMessageReactions(chatId, messageId, reactions, big)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
reaction: Reaction? = null,
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(chatId, messageId, listOfNotNull(reaction), big)
|
||||
): Boolean = setMessageReactions(chatId, messageId, listOfNotNull(reaction), big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
chat: Chat,
|
||||
messageId: MessageId,
|
||||
reactions: List<Reaction> = emptyList(),
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(chat.id, messageId, reactions, big)
|
||||
): Boolean = setMessageReactions(chat.id, messageId, reactions, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
chat: Chat,
|
||||
messageId: MessageId,
|
||||
reaction: Reaction? = null,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(chat.id, messageId, reaction, big)
|
||||
): Boolean = setMessageReaction(chat.id, messageId, reaction, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
meta: Message.MetaInfo,
|
||||
reactions: List<Reaction> = emptyList(),
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(meta.chatId, meta.messageId, reactions, big)
|
||||
): Boolean = setMessageReactions(meta.chatId, meta.messageId, reactions, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
meta: Message.MetaInfo,
|
||||
reaction: Reaction? = null,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(meta.chatId, meta.messageId, reaction, big)
|
||||
): Boolean = setMessageReaction(meta.chatId, meta.messageId, reaction, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
message: AccessibleMessage,
|
||||
reactions: List<Reaction> = emptyList(),
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(message.metaInfo, reactions, big)
|
||||
): Boolean = setMessageReactions(message.metaInfo, reactions, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
message: AccessibleMessage,
|
||||
reaction: Reaction? = null,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(message.metaInfo, reaction, big)
|
||||
): Boolean = setMessageReaction(message.metaInfo, reaction, big)
|
||||
|
||||
@JvmName("setMessageReactionsStrings")
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
emojis: List<String>,
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(chatId, messageId, emojis.map { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReactions(chatId, messageId, emojis.map { Reaction.Emoji(it) }, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
emoji: String?,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(chatId, messageId, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReaction(chatId, messageId, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
|
||||
@JvmName("setMessageReactionsStrings")
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
chat: Chat,
|
||||
messageId: MessageId,
|
||||
emojis: List<String>,
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(chat, messageId, emojis.map { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReactions(chat, messageId, emojis.map { Reaction.Emoji(it) }, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
chat: Chat,
|
||||
messageId: MessageId,
|
||||
emoji: String?,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(chat, messageId, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReaction(chat, messageId, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
|
||||
@JvmName("setMessageReactionsStrings")
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
meta: Message.MetaInfo,
|
||||
emojis: List<String>,
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(meta, emojis.map { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReactions(meta, emojis.map { Reaction.Emoji(it) }, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
meta: Message.MetaInfo,
|
||||
emoji: String?,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(meta, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReaction(meta, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
|
||||
@JvmName("setMessageReactionsStrings")
|
||||
suspend fun TelegramBot.setMessageReactions(
|
||||
public suspend fun TelegramBot.setMessageReactions(
|
||||
message: AccessibleMessage,
|
||||
emojis: List<String>,
|
||||
big: Boolean = false
|
||||
) = setMessageReactions(message, emojis.map { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReactions(message, emojis.map { Reaction.Emoji(it) }, big)
|
||||
|
||||
suspend fun TelegramBot.setMessageReaction(
|
||||
public suspend fun TelegramBot.setMessageReaction(
|
||||
message: AccessibleMessage,
|
||||
emoji: String?,
|
||||
big: Boolean = false
|
||||
) = setMessageReaction(message, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
): Boolean = setMessageReaction(message, emoji ?.let { Reaction.Emoji(it) }, big)
|
||||
|
@ -7,12 +7,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.games.Game
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.GameContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
public suspend fun TelegramBot.sendGame(
|
||||
chatId: ChatIdentifier,
|
||||
gameShortName: String,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -22,7 +24,7 @@ suspend fun TelegramBot.sendGame(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<GameContent> = execute(
|
||||
SendGame(
|
||||
chatId, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
@ -32,7 +34,7 @@ suspend fun TelegramBot.sendGame(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
public suspend fun TelegramBot.sendGame(
|
||||
chat: Chat,
|
||||
gameShortName: String,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -42,7 +44,7 @@ suspend fun TelegramBot.sendGame(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendGame(
|
||||
): ContentMessage<GameContent> = sendGame(
|
||||
chat.id, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -50,7 +52,7 @@ suspend fun TelegramBot.sendGame(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
public suspend fun TelegramBot.sendGame(
|
||||
chatId: ChatIdentifier,
|
||||
game: Game,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -60,7 +62,7 @@ suspend fun TelegramBot.sendGame(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendGame(
|
||||
): ContentMessage<GameContent> = sendGame(
|
||||
chatId, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -68,7 +70,7 @@ suspend fun TelegramBot.sendGame(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
public suspend fun TelegramBot.sendGame(
|
||||
chat: Chat,
|
||||
game: Game,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -78,6 +80,6 @@ suspend fun TelegramBot.sendGame(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendGame(
|
||||
): ContentMessage<GameContent> = sendGame(
|
||||
chat.id, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.AnimationFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.AnimationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -33,7 +35,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<AnimationContent> = execute(
|
||||
SendAnimation(
|
||||
chatId = chatId,
|
||||
animation = animation,
|
||||
@ -59,7 +61,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: AnimationFile,
|
||||
text: String? = null,
|
||||
@ -76,7 +78,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chatId,
|
||||
animation = animation.fileId,
|
||||
thumb = animation.thumbnail ?.fileId,
|
||||
@ -100,7 +102,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -118,7 +120,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chat.id,
|
||||
animation = animation,
|
||||
thumb = thumb,
|
||||
@ -142,7 +144,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: AnimationFile,
|
||||
text: String? = null,
|
||||
@ -159,7 +161,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chat.id,
|
||||
animation = animation,
|
||||
text = text,
|
||||
@ -183,7 +185,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -200,7 +202,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<AnimationContent> = execute(
|
||||
SendAnimation(
|
||||
chatId = chatId,
|
||||
animation = animation,
|
||||
@ -225,7 +227,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: AnimationFile,
|
||||
entities: TextSourcesList,
|
||||
@ -241,7 +243,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chatId,
|
||||
animation = animation.fileId,
|
||||
thumb = animation.thumbnail ?.fileId,
|
||||
@ -264,7 +266,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -281,7 +283,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chat.id,
|
||||
animation = animation,
|
||||
thumb = thumb,
|
||||
@ -304,7 +306,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
public suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: AnimationFile,
|
||||
entities: TextSourcesList,
|
||||
@ -320,7 +322,7 @@ suspend fun TelegramBot.sendAnimation(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(
|
||||
): ContentMessage<AnimationContent> = sendAnimation(
|
||||
chatId = chat.id,
|
||||
animation = animation,
|
||||
entities = entities,
|
||||
|
@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.AudioContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
public suspend fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -31,7 +33,7 @@ suspend fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<AudioContent> = execute(
|
||||
SendAudio(
|
||||
chatId,
|
||||
audio,
|
||||
@ -55,7 +57,7 @@ suspend fun TelegramBot.sendAudio(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
public suspend fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -71,13 +73,13 @@ suspend fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
public suspend fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: AudioFile,
|
||||
text: String? = null,
|
||||
@ -90,13 +92,13 @@ suspend fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, text, parseMode, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
public suspend fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: AudioFile,
|
||||
text: String? = null,
|
||||
@ -109,14 +111,14 @@ suspend fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
public suspend inline fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -131,7 +133,7 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<AudioContent> = execute(
|
||||
SendAudio(
|
||||
chatId,
|
||||
audio,
|
||||
@ -154,7 +156,7 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
public suspend inline fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -169,13 +171,13 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
public suspend inline fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: AudioFile,
|
||||
entities: TextSourcesList,
|
||||
@ -187,13 +189,13 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, entities, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
public suspend inline fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: AudioFile,
|
||||
entities: TextSourcesList,
|
||||
@ -205,4 +207,4 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<AudioContent> = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.DocumentContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
public suspend fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -29,7 +31,7 @@ suspend fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = execute(
|
||||
): ContentMessage<DocumentContent> = execute(
|
||||
SendDocument(
|
||||
chatId,
|
||||
document,
|
||||
@ -51,7 +53,7 @@ suspend fun TelegramBot.sendDocument(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
public suspend fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -65,13 +67,13 @@ suspend fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, thumb, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
public suspend fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: DocumentFile,
|
||||
text: String? = null,
|
||||
@ -84,7 +86,7 @@ suspend fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(
|
||||
): ContentMessage<DocumentContent> = sendDocument(
|
||||
chatId, document.fileId, document.thumbnail ?.fileId, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection
|
||||
)
|
||||
|
||||
@ -92,7 +94,7 @@ suspend fun TelegramBot.sendDocument(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
public suspend fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: DocumentFile,
|
||||
text: String? = null,
|
||||
@ -105,13 +107,13 @@ suspend fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
public suspend inline fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -124,7 +126,7 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = execute(
|
||||
): ContentMessage<DocumentContent> = execute(
|
||||
SendDocument(
|
||||
chatId,
|
||||
document,
|
||||
@ -145,7 +147,7 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
public suspend inline fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -158,13 +160,13 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, thumb, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
public suspend inline fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: DocumentFile,
|
||||
entities: TextSourcesList,
|
||||
@ -176,7 +178,7 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(
|
||||
): ContentMessage<DocumentContent> = sendDocument(
|
||||
chatId, document.fileId, document.thumbnail ?.fileId, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection
|
||||
)
|
||||
|
||||
@ -184,7 +186,7 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
public suspend inline fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: DocumentFile,
|
||||
entities: TextSourcesList,
|
||||
@ -196,4 +198,4 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
||||
): ContentMessage<DocumentContent> = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
||||
|
@ -6,10 +6,8 @@ import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.media.*
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent
|
||||
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent
|
||||
import dev.inmo.tgbotapi.types.message.content.AudioContent
|
||||
import dev.inmo.tgbotapi.types.message.content.DocumentContent
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.*
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import kotlin.jvm.JvmName
|
||||
|
||||
@ -17,7 +15,7 @@ import kotlin.jvm.JvmName
|
||||
* @see SendMediaGroup
|
||||
*/
|
||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||
suspend fun TelegramBot.sendMediaGroup(
|
||||
public suspend fun TelegramBot.sendMediaGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<MediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -26,7 +24,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = execute(
|
||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
|
||||
SendMediaGroup<MediaGroupPartContent>(
|
||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
@ -36,7 +34,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
* @see SendMediaGroup
|
||||
*/
|
||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||
suspend fun TelegramBot.sendMediaGroup(
|
||||
public suspend fun TelegramBot.sendMediaGroup(
|
||||
chat: Chat,
|
||||
media: List<MediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -45,7 +43,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendMediaGroup(
|
||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -54,7 +52,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
*/
|
||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||
@JvmName("sendMedaGroupByContent")
|
||||
suspend fun TelegramBot.sendMediaGroup(
|
||||
public suspend fun TelegramBot.sendMediaGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<MediaGroupPartContent>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -63,7 +61,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendMediaGroup(
|
||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -72,7 +70,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
*/
|
||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||
@JvmName("sendMedaGroupByContent")
|
||||
suspend fun TelegramBot.sendMediaGroup(
|
||||
public suspend fun TelegramBot.sendMediaGroup(
|
||||
chat: Chat,
|
||||
media: List<MediaGroupPartContent>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -81,14 +79,14 @@ suspend fun TelegramBot.sendMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendMediaGroup(
|
||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
/**
|
||||
* @see SendPlaylist
|
||||
*/
|
||||
suspend fun TelegramBot.sendPlaylist(
|
||||
public suspend fun TelegramBot.sendPlaylist(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -97,7 +95,7 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = execute(
|
||||
): ContentMessage<MediaGroupContent<AudioContent>> = execute(
|
||||
SendPlaylist(
|
||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
@ -106,7 +104,7 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
/**
|
||||
* @see SendPlaylist
|
||||
*/
|
||||
suspend fun TelegramBot.sendPlaylist(
|
||||
public suspend fun TelegramBot.sendPlaylist(
|
||||
chat: Chat,
|
||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -115,7 +113,7 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendPlaylist(
|
||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -123,7 +121,7 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
* @see SendPlaylist
|
||||
*/
|
||||
@JvmName("sendPlaylistByContent")
|
||||
suspend fun TelegramBot.sendPlaylist(
|
||||
public suspend fun TelegramBot.sendPlaylist(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<AudioContent>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -132,7 +130,7 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendPlaylist(
|
||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -140,7 +138,7 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
* @see SendPlaylist
|
||||
*/
|
||||
@JvmName("sendPlaylistByContent")
|
||||
suspend fun TelegramBot.sendPlaylist(
|
||||
public suspend fun TelegramBot.sendPlaylist(
|
||||
chat: Chat,
|
||||
media: List<AudioContent>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -149,14 +147,14 @@ suspend fun TelegramBot.sendPlaylist(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendPlaylist(
|
||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
/**
|
||||
* @see SendDocumentsGroup
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocumentsGroup(
|
||||
public suspend fun TelegramBot.sendDocumentsGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -165,7 +163,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = execute(
|
||||
): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
|
||||
SendDocumentsGroup(
|
||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
@ -174,7 +172,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
/**
|
||||
* @see SendDocumentsGroup
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocumentsGroup(
|
||||
public suspend fun TelegramBot.sendDocumentsGroup(
|
||||
chat: Chat,
|
||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -183,7 +181,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendDocumentsGroup(
|
||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -191,7 +189,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
* @see SendDocumentsGroup
|
||||
*/
|
||||
@JvmName("sendDocumentsByContent")
|
||||
suspend fun TelegramBot.sendDocumentsGroup(
|
||||
public suspend fun TelegramBot.sendDocumentsGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<DocumentContent>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -200,7 +198,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendDocumentsGroup(
|
||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -208,7 +206,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
* @see SendDocumentsGroup
|
||||
*/
|
||||
@JvmName("sendDocumentsByContent")
|
||||
suspend fun TelegramBot.sendDocumentsGroup(
|
||||
public suspend fun TelegramBot.sendDocumentsGroup(
|
||||
chat: Chat,
|
||||
media: List<DocumentContent>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -217,14 +215,14 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendDocumentsGroup(
|
||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
/**
|
||||
* @see SendVisualMediaGroup
|
||||
*/
|
||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
public suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -233,7 +231,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = execute(
|
||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
|
||||
SendVisualMediaGroup(
|
||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
@ -242,7 +240,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
/**
|
||||
* @see SendVisualMediaGroup
|
||||
*/
|
||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
public suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
chat: Chat,
|
||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -251,7 +249,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendVisualMediaGroup(
|
||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -259,7 +257,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
* @see SendVisualMediaGroup
|
||||
*/
|
||||
@JvmName("sendVisualMediaGroupByContent")
|
||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
public suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<VisualMediaGroupPartContent>,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -268,7 +266,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendVisualMediaGroup(
|
||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
||||
@ -276,7 +274,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
* @see SendVisualMediaGroup
|
||||
*/
|
||||
@JvmName("sendVisualMediaGroupByContent")
|
||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
public suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
chat: Chat,
|
||||
media: List<VisualMediaGroupPartContent>,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -285,6 +283,6 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null
|
||||
) = sendVisualMediaGroup(
|
||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
||||
)
|
||||
|
@ -9,12 +9,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.media.TelegramPaidMedia
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPaidMedia(
|
||||
public suspend fun TelegramBot.sendPaidMedia(
|
||||
chatId: ChatIdentifier,
|
||||
starCount: Int,
|
||||
media: List<TelegramPaidMedia>,
|
||||
@ -27,7 +29,7 @@ suspend fun TelegramBot.sendPaidMedia(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PaidMediaInfoContent> = execute(
|
||||
SendPaidMedia(
|
||||
chatId = chatId,
|
||||
starCount = starCount,
|
||||
@ -48,7 +50,7 @@ suspend fun TelegramBot.sendPaidMedia(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPaidMedia(
|
||||
public suspend fun TelegramBot.sendPaidMedia(
|
||||
chat: Chat,
|
||||
starCount: Int,
|
||||
media: List<TelegramPaidMedia>,
|
||||
@ -61,7 +63,7 @@ suspend fun TelegramBot.sendPaidMedia(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPaidMedia(
|
||||
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
||||
chatId = chat.id,
|
||||
starCount = starCount,
|
||||
media = media,
|
||||
@ -81,7 +83,7 @@ suspend fun TelegramBot.sendPaidMedia(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPaidMedia(
|
||||
public suspend inline fun TelegramBot.sendPaidMedia(
|
||||
chatId: ChatIdentifier,
|
||||
starCount: Int,
|
||||
media: List<TelegramPaidMedia>,
|
||||
@ -93,7 +95,7 @@ suspend inline fun TelegramBot.sendPaidMedia(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PaidMediaInfoContent> = execute(
|
||||
SendPaidMedia(
|
||||
chatId = chatId,
|
||||
starCount = starCount,
|
||||
@ -113,7 +115,7 @@ suspend inline fun TelegramBot.sendPaidMedia(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPaidMedia(
|
||||
public suspend inline fun TelegramBot.sendPaidMedia(
|
||||
chat: Chat,
|
||||
starCount: Int,
|
||||
media: List<TelegramPaidMedia>,
|
||||
@ -125,7 +127,7 @@ suspend inline fun TelegramBot.sendPaidMedia(
|
||||
protectContent: Boolean = false,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPaidMedia(
|
||||
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
||||
chatId = chat.id,
|
||||
starCount = starCount,
|
||||
media = media,
|
||||
|
@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.PhotoContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
public suspend fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
fileId: InputFile,
|
||||
text: String? = null,
|
||||
@ -29,7 +31,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PhotoContent> = execute(
|
||||
SendPhoto(
|
||||
chatId = chatId,
|
||||
photo = fileId,
|
||||
@ -51,7 +53,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
public suspend fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
fileId: InputFile,
|
||||
text: String? = null,
|
||||
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chat.id,
|
||||
fileId = fileId,
|
||||
text = text,
|
||||
@ -85,7 +87,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
public suspend fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photo: PhotoFile,
|
||||
text: String? = null,
|
||||
@ -99,7 +101,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chatId,
|
||||
fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"),
|
||||
text = text,
|
||||
@ -119,7 +121,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
public suspend fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
photo: PhotoFile,
|
||||
text: String? = null,
|
||||
@ -133,7 +135,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chat.id,
|
||||
photo = photo,
|
||||
text = text,
|
||||
@ -153,7 +155,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
public suspend fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photoSize: PhotoSize,
|
||||
text: String? = null,
|
||||
@ -167,7 +169,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chatId,
|
||||
fileId = photoSize.fileId,
|
||||
text = text,
|
||||
@ -187,7 +189,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
public suspend fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
photoSize: PhotoSize,
|
||||
text: String? = null,
|
||||
@ -201,7 +203,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chat.id,
|
||||
photoSize = photoSize,
|
||||
text = text,
|
||||
@ -222,7 +224,7 @@ suspend fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
public suspend inline fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
fileId: InputFile,
|
||||
entities: TextSourcesList,
|
||||
@ -235,7 +237,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PhotoContent> = execute(
|
||||
SendPhoto(
|
||||
chatId = chatId,
|
||||
photo = fileId,
|
||||
@ -256,7 +258,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
public suspend inline fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
fileId: InputFile,
|
||||
entities: TextSourcesList,
|
||||
@ -269,7 +271,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chat.id,
|
||||
fileId = fileId,
|
||||
entities = entities,
|
||||
@ -288,7 +290,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
public suspend inline fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photo: PhotoFile,
|
||||
entities: TextSourcesList,
|
||||
@ -301,7 +303,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chatId,
|
||||
fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"),
|
||||
entities = entities,
|
||||
@ -320,7 +322,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
public suspend inline fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
photo: PhotoFile,
|
||||
entities: TextSourcesList,
|
||||
@ -333,7 +335,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chat.id,
|
||||
photo = photo,
|
||||
entities = entities,
|
||||
@ -352,7 +354,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
public suspend inline fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photoSize: PhotoSize,
|
||||
entities: TextSourcesList,
|
||||
@ -365,7 +367,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chatId,
|
||||
fileId = photoSize.fileId,
|
||||
entities = entities,
|
||||
@ -384,7 +386,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
public suspend inline fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
photoSize: PhotoSize,
|
||||
entities: TextSourcesList,
|
||||
@ -397,7 +399,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(
|
||||
): ContentMessage<PhotoContent> = sendPhoto(
|
||||
chatId = chat.id,
|
||||
photoSize = photoSize,
|
||||
entities = entities,
|
||||
|
@ -8,12 +8,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.Sticker
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendSticker(
|
||||
public suspend fun TelegramBot.sendSticker(
|
||||
chatId: ChatIdentifier,
|
||||
sticker: InputFile,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -24,7 +26,7 @@ suspend fun TelegramBot.sendSticker(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<StickerContent> = execute(
|
||||
SendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
)
|
||||
|
||||
@ -32,7 +34,7 @@ suspend fun TelegramBot.sendSticker(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendSticker(
|
||||
public suspend fun TelegramBot.sendSticker(
|
||||
chat: Chat,
|
||||
sticker: InputFile,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -43,13 +45,13 @@ suspend fun TelegramBot.sendSticker(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendSticker(chat.id, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendSticker(
|
||||
public suspend fun TelegramBot.sendSticker(
|
||||
chatId: ChatIdentifier,
|
||||
sticker: Sticker,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -60,13 +62,13 @@ suspend fun TelegramBot.sendSticker(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendSticker(chatId, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendSticker(
|
||||
public suspend fun TelegramBot.sendSticker(
|
||||
chat: Chat,
|
||||
sticker: Sticker,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -77,4 +79,4 @@ suspend fun TelegramBot.sendSticker(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<StickerContent> = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.VideoFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.VideoContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideo(
|
||||
public suspend fun TelegramBot.sendVideo(
|
||||
chatId: ChatIdentifier,
|
||||
video: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -33,7 +35,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VideoContent> = execute(
|
||||
SendVideo(
|
||||
chatId = chatId,
|
||||
video = video,
|
||||
@ -60,7 +62,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideo(
|
||||
public suspend fun TelegramBot.sendVideo(
|
||||
chatId: ChatIdentifier,
|
||||
video: VideoFile,
|
||||
text: String? = null,
|
||||
@ -74,7 +76,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(
|
||||
): ContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chatId,
|
||||
video = video.fileId,
|
||||
thumb = video.thumbnail ?.fileId,
|
||||
@ -98,7 +100,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideo(
|
||||
public suspend fun TelegramBot.sendVideo(
|
||||
chat: Chat,
|
||||
video: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -116,7 +118,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(
|
||||
): ContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chat.id,
|
||||
video = video,
|
||||
thumb = thumb,
|
||||
@ -141,7 +143,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideo(
|
||||
public suspend fun TelegramBot.sendVideo(
|
||||
chat: Chat,
|
||||
video: VideoFile,
|
||||
text: String? = null,
|
||||
@ -155,7 +157,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(
|
||||
): ContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chat.id,
|
||||
video = video,
|
||||
text = text,
|
||||
@ -175,7 +177,7 @@ suspend fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVideo(
|
||||
public suspend inline fun TelegramBot.sendVideo(
|
||||
chatId: ChatIdentifier,
|
||||
video: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -192,7 +194,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VideoContent> = execute(
|
||||
SendVideo(
|
||||
chatId = chatId,
|
||||
video = video,
|
||||
@ -218,7 +220,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVideo(
|
||||
public suspend inline fun TelegramBot.sendVideo(
|
||||
chatId: ChatIdentifier,
|
||||
video: VideoFile,
|
||||
entities: TextSourcesList,
|
||||
@ -231,7 +233,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(
|
||||
): ContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chatId,
|
||||
video = video.fileId,
|
||||
thumb = video.thumbnail ?.fileId,
|
||||
@ -254,7 +256,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVideo(
|
||||
public suspend inline fun TelegramBot.sendVideo(
|
||||
chat: Chat,
|
||||
video: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -271,7 +273,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(
|
||||
): ContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chat.id,
|
||||
video = video,
|
||||
thumb = thumb,
|
||||
@ -295,7 +297,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVideo(
|
||||
public suspend inline fun TelegramBot.sendVideo(
|
||||
chat: Chat,
|
||||
video: VideoFile,
|
||||
entities: TextSourcesList,
|
||||
@ -308,7 +310,7 @@ suspend inline fun TelegramBot.sendVideo(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideo(
|
||||
): ContentMessage<VideoContent> = sendVideo(
|
||||
chatId = chat.id,
|
||||
video = video,
|
||||
entities = entities,
|
||||
|
@ -8,12 +8,14 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideoNote(
|
||||
public suspend fun TelegramBot.sendVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
videoNote: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -26,7 +28,7 @@ suspend fun TelegramBot.sendVideoNote(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VideoNoteContent> = execute(
|
||||
SendVideoNote(
|
||||
chatId,
|
||||
videoNote,
|
||||
@ -47,7 +49,7 @@ suspend fun TelegramBot.sendVideoNote(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideoNote(
|
||||
public suspend fun TelegramBot.sendVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
videoNote: VideoNoteFile,
|
||||
threadId: MessageThreadId? = chatId.threadId,
|
||||
@ -57,7 +59,7 @@ suspend fun TelegramBot.sendVideoNote(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideoNote(
|
||||
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||
chatId, videoNote.fileId, videoNote.thumbnail ?.fileId, videoNote.duration, videoNote.width, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendVideoNote(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideoNote(
|
||||
public suspend fun TelegramBot.sendVideoNote(
|
||||
chat: Chat,
|
||||
videoNote: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -78,13 +80,13 @@ suspend fun TelegramBot.sendVideoNote(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVideoNote(
|
||||
public suspend fun TelegramBot.sendVideoNote(
|
||||
chat: Chat,
|
||||
videoNote: VideoNoteFile,
|
||||
threadId: MessageThreadId? = chat.id.threadId,
|
||||
@ -94,4 +96,4 @@ suspend fun TelegramBot.sendVideoNote(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<VideoNoteContent> = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -10,12 +10,14 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.files.VoiceFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.VoiceContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVoice(
|
||||
public suspend fun TelegramBot.sendVoice(
|
||||
chatId: ChatIdentifier,
|
||||
voice: InputFile,
|
||||
text: String? = null,
|
||||
@ -28,7 +30,7 @@ suspend fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VoiceContent> = execute(
|
||||
SendVoice(
|
||||
chatId,
|
||||
voice,
|
||||
@ -49,7 +51,7 @@ suspend fun TelegramBot.sendVoice(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVoice(
|
||||
public suspend fun TelegramBot.sendVoice(
|
||||
chat: Chat,
|
||||
voice: InputFile,
|
||||
text: String? = null,
|
||||
@ -62,13 +64,13 @@ suspend fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(chat.id, voice, text, parseMode, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVoice(
|
||||
public suspend fun TelegramBot.sendVoice(
|
||||
chatId: ChatIdentifier,
|
||||
voice: VoiceFile,
|
||||
text: String? = null,
|
||||
@ -80,7 +82,7 @@ suspend fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(
|
||||
): ContentMessage<VoiceContent> = sendVoice(
|
||||
chatId, voice.fileId, text, parseMode, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
|
||||
@ -88,7 +90,7 @@ suspend fun TelegramBot.sendVoice(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.sendVoice(
|
||||
public suspend fun TelegramBot.sendVoice(
|
||||
chat: Chat,
|
||||
voice: VoiceFile,
|
||||
text: String? = null,
|
||||
@ -100,14 +102,14 @@ suspend fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(chat.id, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVoice(
|
||||
public suspend inline fun TelegramBot.sendVoice(
|
||||
chatId: ChatIdentifier,
|
||||
voice: InputFile,
|
||||
entities: TextSourcesList,
|
||||
@ -119,7 +121,7 @@ suspend inline fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<VoiceContent> = execute(
|
||||
SendVoice(
|
||||
chatId = chatId,
|
||||
voice = voice,
|
||||
@ -139,7 +141,7 @@ suspend inline fun TelegramBot.sendVoice(
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVoice(
|
||||
public suspend inline fun TelegramBot.sendVoice(
|
||||
chat: Chat,
|
||||
voice: InputFile,
|
||||
entities: TextSourcesList,
|
||||
@ -151,13 +153,13 @@ suspend inline fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(chat.id, voice, entities, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVoice(
|
||||
public suspend inline fun TelegramBot.sendVoice(
|
||||
chatId: ChatIdentifier,
|
||||
voice: VoiceFile,
|
||||
entities: TextSourcesList,
|
||||
@ -168,14 +170,14 @@ suspend inline fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(
|
||||
): ContentMessage<VoiceContent> = sendVoice(
|
||||
chatId, voice.fileId, entities, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
||||
)
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendVoice(
|
||||
public suspend inline fun TelegramBot.sendVoice(
|
||||
chat: Chat,
|
||||
voice: VoiceFile,
|
||||
entities: TextSourcesList,
|
||||
@ -186,4 +188,4 @@ suspend inline fun TelegramBot.sendVoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<VoiceContent> = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
|
@ -2,15 +2,11 @@ package dev.inmo.tgbotapi.extensions.api.send.payments
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
|
||||
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
||||
|
||||
suspend fun TelegramBot.createInvoiceLink(
|
||||
public suspend fun TelegramBot.createInvoiceLink(
|
||||
title: String,
|
||||
description: String,
|
||||
payload: String,
|
||||
@ -27,14 +23,14 @@ suspend fun TelegramBot.createInvoiceLink(
|
||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||
shouldSendEmailToProvider: Boolean = false,
|
||||
priceDependOnShipAddress: Boolean = false
|
||||
) = execute(
|
||||
): String = execute(
|
||||
CreateInvoiceLink(title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
|
||||
)
|
||||
|
||||
/**
|
||||
* For links witn XTR currency and using of Telegram Stars
|
||||
*/
|
||||
suspend fun TelegramBot.createInvoiceLink(
|
||||
public suspend fun TelegramBot.createInvoiceLink(
|
||||
title: String,
|
||||
description: String,
|
||||
payload: String,
|
||||
@ -49,6 +45,6 @@ suspend fun TelegramBot.createInvoiceLink(
|
||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||
shouldSendEmailToProvider: Boolean = false,
|
||||
priceDependOnShipAddress: Boolean = false
|
||||
) = execute(
|
||||
): String = execute(
|
||||
CreateInvoiceLink(title, description, payload, null, Currency.XTR, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
|
||||
)
|
||||
|
@ -6,12 +6,12 @@ import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.payments.SuccessfulPayment
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId
|
||||
|
||||
suspend fun TelegramBot.refundStarPayment(
|
||||
public suspend fun TelegramBot.refundStarPayment(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId
|
||||
) = execute(RefundStarPayment(userId, telegramPaymentChargeId))
|
||||
): Boolean = execute(RefundStarPayment(userId, telegramPaymentChargeId))
|
||||
|
||||
suspend fun TelegramBot.refundStarPayment(
|
||||
public suspend fun TelegramBot.refundStarPayment(
|
||||
userId: UserId,
|
||||
successfulPayment: SuccessfulPayment
|
||||
) = refundStarPayment(userId, successfulPayment.telegramPaymentChargeId)
|
||||
): Boolean = refundStarPayment(userId, successfulPayment.telegramPaymentChargeId)
|
@ -5,6 +5,8 @@ import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
|
||||
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
||||
@ -13,7 +15,7 @@ import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendInvoice(
|
||||
public suspend fun TelegramBot.sendInvoice(
|
||||
chatId: IdChatIdentifier,
|
||||
title: String,
|
||||
description: String,
|
||||
@ -38,7 +40,7 @@ suspend fun TelegramBot.sendInvoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<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)
|
||||
)
|
||||
|
||||
@ -46,7 +48,7 @@ suspend fun TelegramBot.sendInvoice(
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendInvoice(
|
||||
public suspend fun TelegramBot.sendInvoice(
|
||||
user: CommonUser,
|
||||
title: String,
|
||||
description: String,
|
||||
@ -70,14 +72,14 @@ suspend fun TelegramBot.sendInvoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, null, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
): ContentMessage<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]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendInvoice(
|
||||
public suspend fun TelegramBot.sendInvoice(
|
||||
chatId: IdChatIdentifier,
|
||||
title: String,
|
||||
description: String,
|
||||
@ -91,7 +93,7 @@ suspend fun TelegramBot.sendInvoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<InvoiceContent> = execute(
|
||||
SendInvoice(chatId, title, description, payload, price, startParameter, providerData, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
||||
)
|
||||
|
||||
@ -99,7 +101,7 @@ suspend fun TelegramBot.sendInvoice(
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.sendInvoice(
|
||||
public suspend fun TelegramBot.sendInvoice(
|
||||
user: CommonUser,
|
||||
title: String,
|
||||
description: String,
|
||||
@ -112,7 +114,7 @@ suspend fun TelegramBot.sendInvoice(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = sendInvoice(
|
||||
): ContentMessage<InvoiceContent> = sendInvoice(
|
||||
chatId = user.id,
|
||||
title = title,
|
||||
description = description,
|
||||
|
@ -6,12 +6,14 @@ import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.PollContent
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.polls.InputPollOption
|
||||
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
|
||||
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<InputPollOption>,
|
||||
@ -30,7 +32,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
question,
|
||||
@ -53,7 +55,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
questionEntities: List<TextSource>,
|
||||
options: List<InputPollOption>,
|
||||
@ -71,7 +73,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
questionEntities,
|
||||
@ -93,7 +95,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<InputPollOption>,
|
||||
@ -111,7 +113,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
question,
|
||||
@ -134,7 +136,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
questionEntities: List<TextSource>,
|
||||
options: List<InputPollOption>,
|
||||
@ -151,7 +153,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
questionEntities,
|
||||
@ -172,7 +174,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<InputPollOption>,
|
||||
@ -190,7 +192,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
question,
|
||||
@ -212,7 +214,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
questionEntities: List<TextSource>,
|
||||
options: List<InputPollOption>,
|
||||
@ -229,7 +231,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
questionEntities,
|
||||
@ -250,7 +252,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<InputPollOption>,
|
||||
@ -267,7 +269,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
question,
|
||||
@ -288,7 +290,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
public suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
questionEntities: List<TextSource>,
|
||||
options: List<InputPollOption>,
|
||||
@ -304,7 +306,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendQuizPoll(
|
||||
chatId,
|
||||
questionEntities,
|
||||
|
@ -6,12 +6,14 @@ import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.PollContent
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.polls.InputPollOption
|
||||
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
|
||||
|
||||
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
public suspend fun TelegramBot.sendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<InputPollOption>,
|
||||
@ -28,7 +30,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendRegularPoll(
|
||||
chatId,
|
||||
question,
|
||||
@ -49,7 +51,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
public suspend fun TelegramBot.sendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
questionEntities: List<TextSource>,
|
||||
options: List<InputPollOption>,
|
||||
@ -65,7 +67,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendRegularPoll(
|
||||
chatId,
|
||||
questionEntities,
|
||||
@ -85,7 +87,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
public suspend fun TelegramBot.sendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<InputPollOption>,
|
||||
@ -101,7 +103,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendRegularPoll(
|
||||
chatId,
|
||||
question,
|
||||
@ -121,7 +123,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
public suspend fun TelegramBot.sendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
questionEntities: List<TextSource>,
|
||||
options: List<InputPollOption>,
|
||||
@ -136,7 +138,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
): ContentMessage<PollContent> = execute(
|
||||
SendRegularPoll(
|
||||
chatId,
|
||||
questionEntities,
|
||||
|
Loading…
Reference in New Issue
Block a user