mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-22 16:23:54 +00:00
update up to 0.38.8
This commit is contained in:
parent
dec55990dc
commit
e0795c3c14
@ -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))
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user