From 8fc3498276da15f5b255a646e07447a74e80bbc6 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 28 Nov 2023 21:03:43 +0600 Subject: [PATCH] updates --- build.gradle | 12 ++++++++++++ gradle.properties | 12 ++++++------ .../kotlin/dev/inmo/plagubot/example/CustomPlugin.kt | 5 ++++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 3168998..1d11596 100644 --- a/build.gradle +++ b/build.gradle @@ -48,3 +48,15 @@ dependencies { application { mainClassName = 'dev.inmo.plagubot.AppKt' } + +compileJava { + sourceCompatibility JavaVersion.VERSION_17.toString() + targetCompatibility JavaVersion.VERSION_17.toString() +} + + +compileKotlin { + kotlinOptions { + jvmTarget = "17" + } +} diff --git a/gradle.properties b/gradle.properties index 19524e9..1596034 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,12 +3,12 @@ org.gradle.parallel=true kotlin.js.generate.externals=true kotlin.incremental=true -kotlin_version=1.8.22 -plagubot_version=7.2.3 -plugins_version=0.15.3 +kotlin_version=1.9.21 +plagubot_version=7.4.0 +plugins_version=0.17.0 -micro_utils_version=0.19.9 -tgbotapi_version=9.2.2 -serialization_version=1.5.1 +micro_utils_version=0.20.15 +tgbotapi_version=9.4.1 +serialization_version=1.6.1 version=0.1.8 diff --git a/src/main/kotlin/dev/inmo/plagubot/example/CustomPlugin.kt b/src/main/kotlin/dev/inmo/plagubot/example/CustomPlugin.kt index dfda110..baf6bce 100644 --- a/src/main/kotlin/dev/inmo/plagubot/example/CustomPlugin.kt +++ b/src/main/kotlin/dev/inmo/plagubot/example/CustomPlugin.kt @@ -36,7 +36,7 @@ class CustomPlugin : Plugin, KoinComponent { init { KSLog.default = KSLog("ExampleBot").filtered { l, t, throwable -> - l > LogLevel.DEBUG && throwable !is CancellationException && throwable !is HttpRequestTimeoutException + l > LogLevel.VERBOSE && throwable !is CancellationException && throwable !is HttpRequestTimeoutException } } @@ -99,6 +99,9 @@ class CustomPlugin : Plugin, KoinComponent { onCommand(Regex(".*")) { log.d { "Handled command: ${it.content}" } } + onUnhandledCommand { + log.v { "Unknown command: ${it.content}" } + } enableSettings( koin.get(), koin.get(),