diff --git a/plugin/src/main/kotlin/dev/inmo/plagubot/KoinDatabaseExtensions.kt b/plugin/src/main/kotlin/dev/inmo/plagubot/KoinDatabaseExtensions.kt new file mode 100644 index 0000000..d3ed49d --- /dev/null +++ b/plugin/src/main/kotlin/dev/inmo/plagubot/KoinDatabaseExtensions.kt @@ -0,0 +1,11 @@ +package dev.inmo.plagubot + +import org.jetbrains.exposed.sql.Database +import org.koin.core.Koin +import org.koin.core.scope.Scope + +val Scope.database: Database + get() = get() + +val Koin.database: Database + get() = get() diff --git a/plugin/src/main/kotlin/dev/inmo/plagubot/KoinExtensions.kt b/plugin/src/main/kotlin/dev/inmo/plagubot/KoinExtensions.kt index 33a4cae..18585df 100644 --- a/plugin/src/main/kotlin/dev/inmo/plagubot/KoinExtensions.kt +++ b/plugin/src/main/kotlin/dev/inmo/plagubot/KoinExtensions.kt @@ -11,12 +11,6 @@ import org.koin.core.module.Module import org.koin.core.scope.Scope import kotlin.reflect.KClass -val Scope.database: Database - get() = get() - -val Koin.database: Database - get() = get() - /** * Using [single] to register `T` with serializer [configSerializer] *