mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template.git
synced 2024-11-22 08:13:52 +00:00
0.37.0 migration
This commit is contained in:
parent
fbbc7d8cc0
commit
14ce90d323
@ -5,4 +5,4 @@ kotlin.js.generate.externals=true
|
|||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
|
|
||||||
kotlin_version=1.5.31
|
kotlin_version=1.5.31
|
||||||
tgbotapi_version=0.36.1
|
tgbotapi_version=0.37.0
|
||||||
|
@ -3,7 +3,7 @@ package telegram_bot
|
|||||||
import dev.inmo.tgbotapi.bot.Ktor.telegramBot
|
import dev.inmo.tgbotapi.bot.Ktor.telegramBot
|
||||||
import dev.inmo.tgbotapi.extensions.api.bot.getMe
|
import dev.inmo.tgbotapi.extensions.api.bot.getMe
|
||||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
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 dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ suspend fun main(args: Array<String>) {
|
|||||||
val scope = CoroutineScope(Dispatchers.Default)
|
val scope = CoroutineScope(Dispatchers.Default)
|
||||||
|
|
||||||
// here should be main logic of your bot
|
// 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
|
// in this lambda you will be able to call methods without "bot." prefix
|
||||||
val me = getMe()
|
val me = getMe()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user