From 888504740946ca50da7ecfce3aa1ca7aca184f6d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 12 Nov 2021 13:38:19 +0600 Subject: [PATCH 1/2] start 0.4.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e5ff9c7..f523080 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,4 +19,4 @@ sqlite_version=3.34.0 github_release_plugin_version=2.2.12 group=dev.inmo -version=0.3.2 +version=0.4.0 From d7638d620fdbd16d2b686373eb8985825949c779 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 12 Nov 2021 14:05:42 +0600 Subject: [PATCH 2/2] 0.4.0 --- bot/src/main/kotlin/dev/inmo/plagubot/App.kt | 12 ------------ bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt | 5 ++--- gradle.properties | 12 ++++++------ gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/bot/src/main/kotlin/dev/inmo/plagubot/App.kt b/bot/src/main/kotlin/dev/inmo/plagubot/App.kt index 9c5b12f..133d990 100644 --- a/bot/src/main/kotlin/dev/inmo/plagubot/App.kt +++ b/bot/src/main/kotlin/dev/inmo/plagubot/App.kt @@ -5,18 +5,6 @@ import kotlinx.coroutines.* import kotlinx.serialization.InternalSerializationApi import java.io.File -@Deprecated( - "This method is redundant due to new class PlaguBot", - ReplaceWith( - "PlaguBot(config).start(scope)", - "dev.inmo.plagubot.PlaguBot" - ) -) -suspend inline fun initPlaguBot( - config: Config, - scope: CoroutineScope = CoroutineScope(Dispatchers.Default) -): Job = PlaguBot(config).start(scope) - /** * This method by default expects one argument in [args] field: path to config */ diff --git a/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt b/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt index 98dae72..5cfa092 100644 --- a/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt +++ b/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt @@ -4,8 +4,7 @@ import dev.inmo.micro_utils.coroutines.safelyWithoutExceptions import dev.inmo.plagubot.config.* import dev.inmo.tgbotapi.bot.Ktor.telegramBot import dev.inmo.tgbotapi.extensions.api.bot.setMyCommands -import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext -import dev.inmo.tgbotapi.extensions.behaviour_builder.buildBehaviour +import dev.inmo.tgbotapi.extensions.behaviour_builder.* import dev.inmo.tgbotapi.types.BotCommand import dev.inmo.tgbotapi.types.botCommandsLimit import kotlinx.coroutines.* @@ -50,7 +49,7 @@ data class PlaguBot( */ suspend fun start( scope: CoroutineScope = CoroutineScope(Dispatchers.Default) - ): Job = bot.buildBehaviour(scope) { + ): Job = bot.buildBehaviourWithLongPolling(scope) { invoke(database, paramsMap) } } diff --git a/gradle.properties b/gradle.properties index f523080..3dd3d62 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,15 +6,15 @@ kotlin.incremental=true kotlin_version=1.5.31 kotlin_coroutines_version=1.5.2 -kotlin_serialisation_runtime_version=1.2.2 -kotlin_exposed_version=0.34.2 +kotlin_serialisation_runtime_version=1.3.1 +kotlin_exposed_version=0.36.1 -sdi_version=0.5.0 -tgbotapi_version=0.35.9 -microutils_version=0.5.28 +sdi_version=0.6.0 +tgbotapi_version=0.37.0 +microutils_version=0.8.2 klassindex_version=4.1.0-rc.1 -sqlite_version=3.34.0 +sqlite_version=3.36.0.3 github_release_plugin_version=2.2.12 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 442d913..e750102 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists