1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00
This commit is contained in:
InsanusMokrassar 2021-06-24 12:54:50 +06:00
parent 61cf9936fb
commit 1e181bc042
2 changed files with 12 additions and 10 deletions

View File

@ -446,21 +446,21 @@ suspend inline fun TelegramBot.replyWithMediaGroup(
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendMediaGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply) ) = sendMediaGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
suspend inline fun TelegramBot.reply( suspend inline fun TelegramBot.replyWithPlaylist(
to: Message, to: Message,
media: List<AudioMediaGroupMemberInputMedia>, media: List<AudioMediaGroupMemberInputMedia>,
disableNotification: Boolean = false, disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendPlaylist(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply) ) = sendPlaylist(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
suspend inline fun TelegramBot.reply( suspend inline fun TelegramBot.replyWithDocuments(
to: Message, to: Message,
media: List<DocumentMediaGroupMemberInputMedia>, media: List<DocumentMediaGroupMemberInputMedia>,
disableNotification: Boolean = false, disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = sendDocumentsGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply) ) = sendDocumentsGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
suspend inline fun TelegramBot.reply( suspend inline fun TelegramBot.replyWithGallery(
to: Message, to: Message,
media: List<VisualMediaGroupMemberInputMedia>, media: List<VisualMediaGroupMemberInputMedia>,
disableNotification: Boolean = false, disableNotification: Boolean = false,

View File

@ -1,7 +1,9 @@
package dev.inmo.tgbotapi.extensions.api.send.media package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.extensions.api.send.reply import dev.inmo.tgbotapi.extensions.api.send.replyWithPlaylist
import dev.inmo.tgbotapi.extensions.api.send.replyWithDocuments
import dev.inmo.tgbotapi.extensions.api.send.replyWithGallery
import dev.inmo.tgbotapi.extensions.api.send.replyWithMediaGroup import dev.inmo.tgbotapi.extensions.api.send.replyWithMediaGroup
import dev.inmo.tgbotapi.requests.send.media.* import dev.inmo.tgbotapi.requests.send.media.*
import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.ChatIdentifier
@ -141,36 +143,36 @@ suspend inline fun TelegramBot.replyWithMediaGroup(
@Deprecated( @Deprecated(
"Replaced", "Replaced",
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply") ReplaceWith("replyWithPlaylist", "dev.inmo.tgbotapi.extensions.api.send.replyWithPlaylist")
) )
suspend inline fun TelegramBot.replyWithPlaylist( suspend inline fun TelegramBot.replyWithPlaylist(
to: Message, to: Message,
media: List<AudioMediaGroupMemberInputMedia>, media: List<AudioMediaGroupMemberInputMedia>,
disableNotification: Boolean = false, disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = reply(to, media, disableNotification, allowSendingWithoutReply) ) = replyWithPlaylist(to, media, disableNotification, allowSendingWithoutReply)
@Deprecated( @Deprecated(
"Replaced", "Replaced",
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply") ReplaceWith("replyWithDocuments", "dev.inmo.tgbotapi.extensions.api.send.replyWithDocuments")
) )
suspend inline fun TelegramBot.replyWithDocumentsGroup( suspend inline fun TelegramBot.replyWithDocumentsGroup(
to: Message, to: Message,
media: List<DocumentMediaGroupMemberInputMedia>, media: List<DocumentMediaGroupMemberInputMedia>,
disableNotification: Boolean = false, disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = reply(to, media, disableNotification, allowSendingWithoutReply) ) = replyWithDocuments(to, media, disableNotification, allowSendingWithoutReply)
@Deprecated( @Deprecated(
"Replaced", "Replaced",
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply") ReplaceWith("replyWithGallery", "dev.inmo.tgbotapi.extensions.api.send.replyWithGallery")
) )
suspend inline fun TelegramBot.replyWithVisualMediaGroup( suspend inline fun TelegramBot.replyWithVisualMediaGroup(
to: Message, to: Message,
media: List<VisualMediaGroupMemberInputMedia>, media: List<VisualMediaGroupMemberInputMedia>,
disableNotification: Boolean = false, disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null allowSendingWithoutReply: Boolean? = null
) = reply(to, media, disableNotification, allowSendingWithoutReply) ) = replyWithGallery(to, media, disableNotification, allowSendingWithoutReply)
@Deprecated( @Deprecated(
"Replaced", "Replaced",