diff --git a/.idea/misc.xml b/.idea/misc.xml index 48d59bf..a107e0c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..397eb86 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/qbt-bot.iml b/.idea/qbt-bot.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/qbt-bot.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5db72dd --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 8b89bd4..7b57fb3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,8 +10,8 @@ pluginManagement { id("com.github.jakemarsden.git-hooks") version "0.0.2" id("com.github.johnrengelman.shadow") version "8.1.1" - id("dev.kordex.gradle.docker") version "1.2.0" - id("dev.kordex.gradle.kordex") version "1.2.0" + id("dev.kordex.gradle.docker") version "1.3.0" + id("dev.kordex.gradle.kordex") version "1.3.0" } } diff --git a/src/main/kotlin/qbtbot/App.kt b/src/main/kotlin/qbtbot/App.kt index 997693c..460284a 100644 --- a/src/main/kotlin/qbtbot/App.kt +++ b/src/main/kotlin/qbtbot/App.kt @@ -1,18 +1,14 @@ package qbtbot -import com.kotlindiscord.kord.extensions.DISCORD_GREEN -import com.kotlindiscord.kord.extensions.ExtensibleBot -import com.kotlindiscord.kord.extensions.commands.events.PublicSlashCommandFailedChecksEvent -import com.kotlindiscord.kord.extensions.commands.events.PublicSlashCommandFailedParsingEvent -import com.kotlindiscord.kord.extensions.commands.events.PublicSlashCommandFailedWithExceptionEvent -import com.kotlindiscord.kord.extensions.commands.events.PublicSlashCommandInvocationEvent -import com.kotlindiscord.kord.extensions.commands.events.PublicSlashCommandSucceededEvent -import com.kotlindiscord.kord.extensions.utils.env -import com.kotlindiscord.kord.extensions.utils.getKoin import dev.kord.common.entity.PresenceStatus import dev.kord.core.event.gateway.DisconnectEvent import dev.kord.core.event.gateway.ReadyEvent import dev.kord.gateway.builder.Shards +import dev.kordex.core.DISCORD_GREEN +import dev.kordex.core.ExtensibleBot +import dev.kordex.core.commands.events.* +import dev.kordex.core.utils.env +import dev.kordex.core.utils.getKoin import qbtbot.commands.TorrentInfo import qbtbot.util.Environment import qbtbot.util.PresenceManager diff --git a/src/main/kotlin/qbtbot/commands/TorrentInfo.kt b/src/main/kotlin/qbtbot/commands/TorrentInfo.kt index c189f25..d602ecc 100644 --- a/src/main/kotlin/qbtbot/commands/TorrentInfo.kt +++ b/src/main/kotlin/qbtbot/commands/TorrentInfo.kt @@ -1,8 +1,8 @@ package qbtbot.commands -import com.kotlindiscord.kord.extensions.extensions.Extension -import com.kotlindiscord.kord.extensions.extensions.chatCommand -import com.kotlindiscord.kord.extensions.utils.respond +import dev.kordex.core.extensions.Extension +import dev.kordex.core.extensions.chatCommand +import dev.kordex.core.utils.respond import io.ktor.client.call.body import io.ktor.client.request.get import io.ktor.http.HttpStatusCode diff --git a/src/main/kotlin/qbtbot/util/Extension.kt b/src/main/kotlin/qbtbot/util/Extension.kt index 43a9095..f2a8367 100644 --- a/src/main/kotlin/qbtbot/util/Extension.kt +++ b/src/main/kotlin/qbtbot/util/Extension.kt @@ -1,11 +1,11 @@ package qbtbot.util -import com.kotlindiscord.kord.extensions.ExtensibleBot -import com.kotlindiscord.kord.extensions.utils.env import dev.kord.common.entity.Snowflake import dev.kord.core.Kord import dev.kord.core.entity.Message import dev.kord.rest.builder.message.EmbedBuilder +import dev.kordex.core.ExtensibleBot +import dev.kordex.core.utils.env import io.ktor.client.request.forms.submitForm import io.ktor.client.statement.HttpResponse import io.ktor.http.parameters diff --git a/src/main/kotlin/qbtbot/util/Ktor.kt b/src/main/kotlin/qbtbot/util/Ktor.kt index 95a98c4..d5ca306 100644 --- a/src/main/kotlin/qbtbot/util/Ktor.kt +++ b/src/main/kotlin/qbtbot/util/Ktor.kt @@ -1,12 +1,11 @@ package qbtbot.util -import com.kotlindiscord.kord.extensions.utils.env -import io.ktor.client.HttpClient -import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.client.plugins.cookies.HttpCookies -import io.ktor.client.plugins.cookies.cookies -import io.ktor.http.Cookie -import io.ktor.serialization.kotlinx.json.json +import dev.kordex.core.utils.env +import io.ktor.client.* +import io.ktor.client.plugins.contentnegotiation.* +import io.ktor.client.plugins.cookies.* +import io.ktor.http.* +import io.ktor.serialization.kotlinx.json.* import kotlinx.serialization.json.Json import java.net.URLEncoder diff --git a/src/main/kotlin/qbtbot/util/PresenceManager.kt b/src/main/kotlin/qbtbot/util/PresenceManager.kt index 9548be5..a2aebbc 100644 --- a/src/main/kotlin/qbtbot/util/PresenceManager.kt +++ b/src/main/kotlin/qbtbot/util/PresenceManager.kt @@ -1,8 +1,8 @@ package qbtbot.util -import com.kotlindiscord.kord.extensions.utils.scheduling.Scheduler import dev.kord.core.Kord import dev.kord.gateway.builder.PresenceBuilder +import dev.kordex.core.utils.scheduling.Scheduler import kotlinx.coroutines.flow.count import org.koin.core.component.KoinComponent import kotlin.math.floor