From dde98f95c04e120b3724e18b3abdd14d95cbbcee Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Thu, 24 Oct 2024 19:02:32 +0200 Subject: [PATCH] Some hotfixes --- gradle/libs.versions.toml | 2 +- .../kotlin/space/votebot/commands/vote/InfoCommand.kt | 8 +++----- plugin/src/main/kotlin/space/votebot/core/Plugin.kt | 4 ++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b050d8e..ad2f40a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.0.21" -mikbot = "3.37.5" +mikbot = "3.37.3" ktor = "2.3.12" [libraries] diff --git a/plugin/src/main/kotlin/space/votebot/commands/vote/InfoCommand.kt b/plugin/src/main/kotlin/space/votebot/commands/vote/InfoCommand.kt index 6297dd0..8394921 100644 --- a/plugin/src/main/kotlin/space/votebot/commands/vote/InfoCommand.kt +++ b/plugin/src/main/kotlin/space/votebot/commands/vote/InfoCommand.kt @@ -7,10 +7,8 @@ import dev.schlaubi.mikbot.plugin.api.util.executableEverywhere import dev.schlaubi.stdx.coroutines.parallelMapNotNull import io.ktor.client.* import io.ktor.client.call.* -import io.ktor.client.plugins.contentnegotiation.* import io.ktor.client.request.* import io.ktor.http.* -import io.ktor.serialization.kotlinx.json.* import io.ktor.util.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -30,9 +28,9 @@ private val json = Json { } private val client = HttpClient { - install(ContentNegotiation) { - json(json) - } +// install(ContentNegotiation) { +// json(json) +// } } @Serializable diff --git a/plugin/src/main/kotlin/space/votebot/core/Plugin.kt b/plugin/src/main/kotlin/space/votebot/core/Plugin.kt index 714ef14..9e6d1af 100644 --- a/plugin/src/main/kotlin/space/votebot/core/Plugin.kt +++ b/plugin/src/main/kotlin/space/votebot/core/Plugin.kt @@ -32,6 +32,10 @@ class VoteBotPlugin(wrapper: PluginContext) : Plugin(wrapper) { enable = Config.ENVIRONMENT == Environment.PRODUCTION } } + kord { + // Disable non essential intents to keep down processing and traffic + intents(false, false) {} + } i18n { applicationCommandLocales.add(Locale.FRENCH) }