update tgbotapi version

This commit is contained in:
InsanusMokrassar 2020-11-02 14:39:36 +06:00
parent 7b66c89632
commit 3820e29bf2
2 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,10 @@
import dev.inmo.tgbotapi.extensions.api.send.sendTextMessage
import dev.inmo.tgbotapi.extensions.api.telegramBot
import dev.inmo.tgbotapi.extensions.utils.flatMap
import dev.inmo.tgbotapi.extensions.utils.formatting.codeMarkdownV2
import dev.inmo.tgbotapi.extensions.utils.formatting.regularMarkdownV2
import dev.inmo.tgbotapi.extensions.utils.safely
import dev.inmo.tgbotapi.extensions.utils.shortcuts.mediaGroupMessages
import dev.inmo.tgbotapi.extensions.utils.updates.asContentMessagesFlow
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingFlowsUpdatesByLongPolling
import dev.inmo.tgbotapi.types.ParseMode.MarkdownV2
@ -23,7 +25,7 @@ suspend fun main(vararg args: String) {
val scope = CoroutineScope(Dispatchers.Default)
bot.startGettingFlowsUpdatesByLongPolling(scope = scope) {
messageFlow.asContentMessagesFlow().mapNotNull { it as? PossiblyForwardedMessage }.onEach { message ->
(merge(messageFlow.asContentMessagesFlow(), mediaGroupMessages(scope).flatMap())).mapNotNull { it as? PossiblyForwardedMessage }.onEach { message ->
safely({ it.printStackTrace() }) {
val toAnswer = when (val forwardInfo = message.forwardInfo) {
null -> "There is no forward info"

View File

@ -2,4 +2,4 @@ kotlin.code.style=official
org.gradle.parallel=true
kotlin_version=1.4.10
telegram_bot_api_version=0.29.2
telegram_bot_api_version=0.29.3