mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
commit
956f02d26d
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
|
## 0.38.3
|
||||||
|
|
||||||
|
* `Common`:
|
||||||
|
* `Version`:
|
||||||
|
* `MicroUtils`: `0.9.1` -> `0.9.2`
|
||||||
|
* `Klock`: `2.4.10` -> `2.4.12`
|
||||||
|
* `UUID`: `0.3.1` -> `0.4.0`
|
||||||
|
* `API`
|
||||||
|
* New extensions `TelegramBot#send*` for media groups with contents
|
||||||
|
|
||||||
## 0.38.2
|
## 0.38.2
|
||||||
|
|
||||||
* `Common`:
|
* `Common`:
|
||||||
|
@ -1,3 +1 @@
|
|||||||
dokka_version=1.6.0
|
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx1024m
|
org.gradle.jvmargs=-Xmx1024m
|
||||||
|
@ -8,16 +8,18 @@ kotlin.incremental.js=true
|
|||||||
kotlin_version=1.6.10
|
kotlin_version=1.6.10
|
||||||
kotlin_coroutines_version=1.6.0
|
kotlin_coroutines_version=1.6.0
|
||||||
kotlin_serialisation_runtime_version=1.3.2
|
kotlin_serialisation_runtime_version=1.3.2
|
||||||
klock_version=2.4.10
|
klock_version=2.4.12
|
||||||
uuid_version=0.3.1
|
uuid_version=0.4.0
|
||||||
ktor_version=1.6.7
|
ktor_version=1.6.7
|
||||||
|
|
||||||
|
micro_utils_version=0.9.2
|
||||||
micro_utils_version=0.9.1
|
|
||||||
|
|
||||||
javax_activation_version=1.1.1
|
javax_activation_version=1.1.1
|
||||||
|
|
||||||
|
|
||||||
|
dokka_version=1.6.10
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=0.38.2
|
library_version=0.38.3
|
||||||
|
|
||||||
github_release_plugin_version=2.2.12
|
github_release_plugin_version=2.2.12
|
||||||
|
@ -7,7 +7,11 @@ import dev.inmo.tgbotapi.types.InputMedia.*
|
|||||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaGroupContent
|
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaGroupContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.content.abstracts.VisualMediaGroupContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.content.media.AudioContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.content.media.DocumentContent
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
|
import kotlin.jvm.JvmName
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see SendMediaGroup
|
* @see SendMediaGroup
|
||||||
@ -41,6 +45,38 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendMediaGroup
|
||||||
|
*/
|
||||||
|
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||||
|
@JvmName("sendMedaGroupByContent")
|
||||||
|
suspend fun TelegramBot.sendMediaGroup(
|
||||||
|
chatId: ChatIdentifier,
|
||||||
|
media: List<MediaGroupContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendMediaGroup(
|
||||||
|
chatId, media.map { it.toMediaGroupMemberInputMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendMediaGroup
|
||||||
|
*/
|
||||||
|
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||||
|
@JvmName("sendMedaGroupByContent")
|
||||||
|
suspend fun TelegramBot.sendMediaGroup(
|
||||||
|
chat: Chat,
|
||||||
|
media: List<MediaGroupContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendMediaGroup(
|
||||||
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see SendPlaylist
|
* @see SendPlaylist
|
||||||
*/
|
*/
|
||||||
@ -71,6 +107,36 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendPlaylist
|
||||||
|
*/
|
||||||
|
@JvmName("sendPlaylistByContent")
|
||||||
|
suspend fun TelegramBot.sendPlaylist(
|
||||||
|
chatId: ChatIdentifier,
|
||||||
|
media: List<AudioContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendPlaylist(
|
||||||
|
chatId, media.map { it.toMediaGroupMemberInputMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendPlaylist
|
||||||
|
*/
|
||||||
|
@JvmName("sendPlaylistByContent")
|
||||||
|
suspend fun TelegramBot.sendPlaylist(
|
||||||
|
chat: Chat,
|
||||||
|
media: List<AudioContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendPlaylist(
|
||||||
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see SendDocumentsGroup
|
* @see SendDocumentsGroup
|
||||||
*/
|
*/
|
||||||
@ -101,6 +167,36 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendDocumentsGroup
|
||||||
|
*/
|
||||||
|
@JvmName("sendDocumentsByContent")
|
||||||
|
suspend fun TelegramBot.sendDocumentsGroup(
|
||||||
|
chatId: ChatIdentifier,
|
||||||
|
media: List<DocumentContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendDocumentsGroup(
|
||||||
|
chatId, media.map { it.toMediaGroupMemberInputMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendDocumentsGroup
|
||||||
|
*/
|
||||||
|
@JvmName("sendDocumentsByContent")
|
||||||
|
suspend fun TelegramBot.sendDocumentsGroup(
|
||||||
|
chat: Chat,
|
||||||
|
media: List<DocumentContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendDocumentsGroup(
|
||||||
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see SendVisualMediaGroup
|
* @see SendVisualMediaGroup
|
||||||
*/
|
*/
|
||||||
@ -130,3 +226,33 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
) = sendVisualMediaGroup(
|
) = sendVisualMediaGroup(
|
||||||
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendVisualMediaGroup
|
||||||
|
*/
|
||||||
|
@JvmName("sendVisualMediaGroupByContent")
|
||||||
|
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||||
|
chatId: ChatIdentifier,
|
||||||
|
media: List<VisualMediaGroupContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendVisualMediaGroup(
|
||||||
|
chatId, media.map { it.toMediaGroupMemberInputMedia() }, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see SendVisualMediaGroup
|
||||||
|
*/
|
||||||
|
@JvmName("sendVisualMediaGroupByContent")
|
||||||
|
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||||
|
chat: Chat,
|
||||||
|
media: List<VisualMediaGroupContent>,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
|
allowSendingWithoutReply: Boolean? = null
|
||||||
|
) = sendVisualMediaGroup(
|
||||||
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user