mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-09 09:53:47 +00:00
Moved to-overload to intended place
This commit is contained in:
parent
613f6de483
commit
32db4a19d2
@ -2234,3 +2234,35 @@ suspend fun TelegramBot.reply(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
to: AccessibleMessage,
|
||||
starCount: Int,
|
||||
media: List<TelegramPaidMedia>,
|
||||
entities: TextSourcesList,
|
||||
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,
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
replyMarkup = replyMarkup,
|
||||
replyParameters = ReplyParameters(
|
||||
messageId = to.messageId,
|
||||
chatIdentifier = to.chat.id,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply
|
||||
)
|
||||
)
|
||||
}
|
@ -2049,45 +2049,6 @@ suspend fun TelegramBot.reply(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
to: AccessibleMessage,
|
||||
content: PaidMediaInfoContent,
|
||||
replyInChatId: IdChatIdentifier = to.chat.id,
|
||||
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
parseMode: ParseMode? = 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(
|
||||
chatId = replyInChatId,
|
||||
starCount = content.paidMediaInfo.stars,
|
||||
media = media,
|
||||
text = content.text,
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = content.showCaptionAboveMedia,
|
||||
threadId = replyInThreadId,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
replyMarkup = replyMarkup,
|
||||
replyParameters = ReplyParameters(
|
||||
messageId = to.messageId,
|
||||
chatIdentifier = to.chat.id,
|
||||
allowSendingWithoutReply = allowSendingWithoutReply
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
|
Loading…
Reference in New Issue
Block a user