mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-09 18:03:47 +00:00
Fixed wrongly specified parameters
This commit is contained in:
parent
32db4a19d2
commit
f2fae9184f
@ -2052,32 +2052,25 @@ suspend fun TelegramBot.reply(
|
|||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
content: PaidMediaInfoContent,
|
starCount: Int,
|
||||||
replyInChatId: IdChatIdentifier = toChatId,
|
media: List<TelegramPaidMedia>,
|
||||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
entities: TextSourcesList,
|
||||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
parseMode: ParseMode? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) {
|
) {
|
||||||
val media = content.paidMediaInfo.media.mapNotNull {
|
|
||||||
when (it) {
|
|
||||||
is PaidMedia.Video -> it.toTelegramPaidMediaVideo()
|
|
||||||
is PaidMedia.Photo -> it.toTelegramMediaPhoto()
|
|
||||||
is PaidMedia.Preview, is PaidMedia.Unknown -> null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sendPaidMedia(
|
sendPaidMedia(
|
||||||
chatId = replyInChatId,
|
chatId = toChatId,
|
||||||
starCount = content.paidMediaInfo.stars,
|
starCount = starCount,
|
||||||
media = media,
|
media = media,
|
||||||
text = content.text,
|
entities = entities,
|
||||||
parseMode = parseMode,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
showCaptionAboveMedia = content.showCaptionAboveMedia,
|
threadId = threadId,
|
||||||
threadId = replyInThreadId,
|
businessConnectionId = businessConnectionId,
|
||||||
businessConnectionId = replyInBusinessConnectionId,
|
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
@ -2088,4 +2081,3 @@ suspend fun TelegramBot.reply(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user