1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

Added overloads with text and custom parsing mode instead of entities

This commit is contained in:
bpavuk 2024-07-10 18:34:43 +03:00
parent 26b864a314
commit 982b401b28
No known key found for this signature in database
GPG Key ID: B501D26D9DEA9CFE
2 changed files with 69 additions and 0 deletions

View File

@ -2265,4 +2265,38 @@ suspend fun TelegramBot.reply(
allowSendingWithoutReply = allowSendingWithoutReply
)
)
}
suspend fun TelegramBot.reply(
to: AccessibleMessage,
starCount: Int,
media: List<TelegramPaidMedia>,
text: String? = null,
parseMode: ParseMode? = null,
showCaptionAboveMedia: Boolean = false,
threadId: MessageThreadId? = to.chat.id.threadId,
businessConnectionId: BusinessConnectionId? = to.chat.id.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
) {
sendPaidMedia(
chatId = to.chat.id,
starCount = starCount,
media = media,
text = text,
parseMode = parseMode,
showCaptionAboveMedia = showCaptionAboveMedia,
threadId = threadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
replyMarkup = replyMarkup,
replyParameters = ReplyParameters(
messageId = to.messageId,
chatIdentifier = to.chat.id,
allowSendingWithoutReply = allowSendingWithoutReply
)
)
}

View File

@ -2081,3 +2081,38 @@ suspend fun TelegramBot.reply(
)
)
}
suspend fun TelegramBot.reply(
toChatId: IdChatIdentifier,
toMessageId: MessageId,
starCount: Int,
media: List<TelegramPaidMedia>,
text: String? = null,
parseMode: ParseMode? = null,
showCaptionAboveMedia: Boolean = false,
threadId: MessageThreadId? = toChatId.threadId,
businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
) {
sendPaidMedia(
chatId = toChatId,
starCount = starCount,
media = media,
text = text,
parseMode = parseMode,
showCaptionAboveMedia = showCaptionAboveMedia,
threadId = threadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
replyMarkup = replyMarkup,
replyParameters = ReplyParameters(
messageId = toMessageId,
chatIdentifier = toChatId,
allowSendingWithoutReply = allowSendingWithoutReply
)
)
}