0.37.0 migration

This commit is contained in:
InsanusMokrassar 2021-10-30 21:07:31 +06:00
parent fbbc7d8cc0
commit 14ce90d323
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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<String>) {
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()