From 14ce90d323b9b22216be8367fde860d64a681726 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 30 Oct 2021 21:07:31 +0600 Subject: [PATCH] 0.37.0 migration --- gradle.properties | 2 +- src/main/kotlin/telegram_bot/App.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 57a656e..0659528 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ kotlin.js.generate.externals=true kotlin.incremental=true kotlin_version=1.5.31 -tgbotapi_version=0.36.1 +tgbotapi_version=0.37.0 diff --git a/src/main/kotlin/telegram_bot/App.kt b/src/main/kotlin/telegram_bot/App.kt index 677d985..d0ef8d7 100644 --- a/src/main/kotlin/telegram_bot/App.kt +++ b/src/main/kotlin/telegram_bot/App.kt @@ -3,7 +3,7 @@ package telegram_bot import dev.inmo.tgbotapi.bot.Ktor.telegramBot import dev.inmo.tgbotapi.extensions.api.bot.getMe import dev.inmo.tgbotapi.extensions.api.send.reply -import dev.inmo.tgbotapi.extensions.behaviour_builder.buildBehaviour +import dev.inmo.tgbotapi.extensions.behaviour_builder.buildBehaviourWithLongPolling import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand import kotlinx.coroutines.* @@ -18,7 +18,7 @@ suspend fun main(args: Array) { val scope = CoroutineScope(Dispatchers.Default) // here should be main logic of your bot - bot.buildBehaviour(scope) { + bot.buildBehaviourWithLongPolling(scope) { // in this lambda you will be able to call methods without "bot." prefix val me = getMe()