2020-11-05 17:48:23 +00:00
|
|
|
package dev.inmo.tgbotapi.extensions.api.send
|
|
|
|
|
|
|
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
|
|
|
import dev.inmo.tgbotapi.requests.send.CopyMessage
|
|
|
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
2022-05-01 14:36:07 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
2020-11-05 17:48:23 +00:00
|
|
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
2022-05-01 14:43:03 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
2020-11-05 17:48:23 +00:00
|
|
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
2022-04-21 18:16:41 +00:00
|
|
|
import dev.inmo.tgbotapi.types.chat.Chat
|
2020-11-05 17:48:23 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
toChatId: ChatIdentifier,
|
2020-11-05 17:48:23 +00:00
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
2022-07-10 18:26:57 +00:00
|
|
|
CopyMessage(
|
|
|
|
fromChatId,
|
|
|
|
messageId,
|
|
|
|
toChatId,
|
|
|
|
text,
|
|
|
|
parseMode,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
allowSendingWithoutReply,
|
|
|
|
replyMarkup
|
|
|
|
)
|
2020-11-05 17:48:23 +00:00
|
|
|
)
|
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
toChatId: ChatIdentifier,
|
2020-11-05 17:48:23 +00:00
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
toChat: Chat,
|
2020-11-05 17:48:23 +00:00
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
toChat: Chat,
|
2020-11-05 17:48:23 +00:00
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
|
|
|
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
2022-07-10 18:26:57 +00:00
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
2020-11-05 17:48:23 +00:00
|
|
|
toChatId: ChatIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
entities: TextSourcesList,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = execute(
|
|
|
|
CopyMessage(
|
|
|
|
fromChatId,
|
|
|
|
messageId,
|
|
|
|
toChatId,
|
|
|
|
entities,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
allowSendingWithoutReply,
|
|
|
|
replyMarkup
|
|
|
|
)
|
|
|
|
)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
2022-07-10 18:26:57 +00:00
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
entities: TextSourcesList,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(fromChat.id, messageId, toChatId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
toChat: Chat,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(fromChatId, messageId, toChat.id, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
2022-07-10 18:26:57 +00:00
|
|
|
toChat: Chat,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(fromChat.id, messageId, toChat.id, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
2022-07-10 18:26:57 +00:00
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
message: Message,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
toChat: Chat,
|
2022-07-10 18:26:57 +00:00
|
|
|
message: Message,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(message.chat, message.messageId, toChat, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
message: Message,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(message.chat, message.messageId, toChatId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend inline fun TelegramBot.copyMessage(
|
|
|
|
toChat: Chat,
|
|
|
|
message: Message,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2020-11-05 17:48:23 +00:00
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2022-07-10 18:26:57 +00:00
|
|
|
) = copyMessage(message.chat, message.messageId, toChat, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-08-04 12:09:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [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(
|
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
|
|
|
CopyMessage(
|
|
|
|
fromChatId,
|
|
|
|
messageId,
|
|
|
|
toChatId,
|
|
|
|
text,
|
|
|
|
parseMode,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = copyMessage(
|
|
|
|
toChatId,
|
|
|
|
fromChat.id,
|
|
|
|
messageId,
|
|
|
|
text,
|
|
|
|
parseMode,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChat: Chat,
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = copyMessage(
|
|
|
|
toChat.id,
|
|
|
|
fromChatId,
|
|
|
|
messageId,
|
|
|
|
text,
|
|
|
|
parseMode,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChat: Chat,
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = copyMessage(
|
|
|
|
toChat.id,
|
|
|
|
fromChat.id,
|
|
|
|
messageId,
|
|
|
|
text,
|
|
|
|
parseMode,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
entities: TextSourcesList,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
|
|
|
CopyMessage(
|
|
|
|
fromChatId,
|
|
|
|
messageId,
|
|
|
|
toChatId,
|
|
|
|
entities,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChatId: ChatIdentifier,
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
entities: TextSourcesList,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = copyMessage(
|
|
|
|
toChatId,
|
|
|
|
fromChat.id,
|
|
|
|
messageId,
|
|
|
|
entities,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChat: Chat,
|
|
|
|
fromChatId: ChatIdentifier,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
entities: TextSourcesList,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = copyMessage(
|
|
|
|
toChat.id,
|
|
|
|
fromChatId,
|
|
|
|
messageId,
|
|
|
|
entities,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
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.copyMessage(
|
|
|
|
toChat: Chat,
|
|
|
|
fromChat: Chat,
|
|
|
|
messageId: MessageIdentifier,
|
|
|
|
entities: TextSourcesList,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = copyMessage(
|
|
|
|
toChat.id,
|
|
|
|
fromChat.id,
|
|
|
|
messageId,
|
|
|
|
entities,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
allowSendingWithoutReply,
|
|
|
|
replyMarkup
|
|
|
|
)
|