update up to 0.38.8

This commit is contained in:
InsanusMokrassar 2022-03-21 11:25:59 +06:00
parent dec55990dc
commit e0795c3c14
2 changed files with 5 additions and 5 deletions

View File

@ -3,11 +3,10 @@ import dev.inmo.tgbotapi.extensions.api.bot.getMe
import dev.inmo.tgbotapi.bot.Ktor.telegramBot import dev.inmo.tgbotapi.bot.Ktor.telegramBot
import dev.inmo.tgbotapi.extensions.api.send.media.* import dev.inmo.tgbotapi.extensions.api.send.media.*
import dev.inmo.tgbotapi.extensions.behaviour_builder.* import dev.inmo.tgbotapi.extensions.behaviour_builder.*
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.CommonMessageFilterExcludeMediaGroups
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.* import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.*
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus
import dev.inmo.tgbotapi.extensions.utils.shortcuts.* import dev.inmo.tgbotapi.extensions.utils.shortcuts.*
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import kotlinx.coroutines.* import kotlinx.coroutines.*
import kotlin.coroutines.coroutineContext import kotlin.coroutines.coroutineContext
@ -21,7 +20,8 @@ suspend fun activateResenderBot(
bot.buildBehaviourWithLongPolling(CoroutineScope(coroutineContext + SupervisorJob())) { bot.buildBehaviourWithLongPolling(CoroutineScope(coroutineContext + SupervisorJob())) {
onContentMessage( onContentMessage(
subcontextUpdatesFilter = MessageFilterByChat + BehaviourContextAndTwoTypesReceiver { it, _ -> it !is MediaGroupMessage<*> } initialFilter = CommonMessageFilterExcludeMediaGroups,
subcontextUpdatesFilter = MessageFilterByChat
) { ) {
executeUnsafe(it.content.createResend(it.chat.id, replyToMessageId = it.messageId)) executeUnsafe(it.content.createResend(it.chat.id, replyToMessageId = it.messageId))
} }

View File

@ -3,5 +3,5 @@ org.gradle.parallel=true
kotlin_version=1.6.10 kotlin_version=1.6.10
telegram_bot_api_version=0.38.7 telegram_bot_api_version=0.38.8
micro_utils_version=0.9.9 micro_utils_version=0.9.16