File tree Expand file tree Collapse file tree 14 files changed +24
-28
lines changed
src/main/kotlin/io/github/freya022/botcommands
test-bot/src/test/kotlin/dev/freya02/botcommands/bot/commands/message Expand file tree Collapse file tree 14 files changed +24
-28
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,6 @@ dependencies {
4949
5050 // -------------------- GLOBAL DEPENDENCIES --------------------
5151
52- api(libs.kotlinx.datetime)
53-
5452 // Deserialization
5553 api(libs.jackson.databind)
5654 api(libs.jackson.module.kotlin)
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ import io.github.freya022.botcommands.api.core.utils.isSubclassOf
44import io.github.freya022.botcommands.api.core.utils.toBoxed
55import io.github.freya022.botcommands.internal.utils.findErasureOfAt
66import io.github.freya022.botcommands.internal.utils.rethrow
7- import kotlinx.datetime.Instant
8- import kotlinx.datetime.toKotlinInstant
97import java.sql.ResultSet
108import java.sql.SQLException
119import java.util.*
1210import java.util.stream.Stream
1311import java.util.stream.StreamSupport
1412import kotlin.reflect.jvm.jvmErasure
1513import kotlin.reflect.typeOf
14+ import kotlin.time.Instant
15+ import kotlin.time.toKotlinInstant
1616
1717/* *
1818 * Utility class to iterate over a [ResultSet],
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import io.github.freya022.botcommands.internal.utils.takeIfFinite
2424import io.github.freya022.botcommands.internal.utils.throwInternal
2525import io.github.oshai.kotlinlogging.KotlinLogging
2626import kotlinx.coroutines.runBlocking
27- import kotlinx.datetime .Clock
27+ import kotlin.time .Clock
2828
2929private const val PREFIX = " BotCommands-Components-"
3030private const val PREFIX_LENGTH = PREFIX .length
@@ -170,4 +170,4 @@ internal class ComponentController(
170170
171171 internal fun getComponentId (internalId : Int ): String = PREFIX + internalId
172172 }
173- }
173+ }
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import kotlinx.coroutines.CancellationException
1414import kotlinx.coroutines.Job
1515import kotlinx.coroutines.delay
1616import kotlinx.coroutines.launch
17- import kotlinx.datetime .Clock
18- import kotlinx.datetime .Instant
17+ import kotlin.time .Clock
18+ import kotlin.time .Instant
1919
2020private val logger = KotlinLogging .logger { }
2121
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package io.github.freya022.botcommands.internal.components.data
33import io.github.freya022.botcommands.internal.components.ComponentType
44import io.github.freya022.botcommands.internal.components.LifetimeType
55import io.github.freya022.botcommands.internal.components.data.timeout.ComponentTimeout
6- import kotlinx.datetime.Instant
76import kotlin.time.Duration
7+ import kotlin.time.Instant
88
99internal sealed interface ComponentData {
1010 val internalId: Int
@@ -13,4 +13,4 @@ internal sealed interface ComponentData {
1313 val expiresAt: Instant ?
1414 val timeout: ComponentTimeout ?
1515 val resetTimeoutOnUseDuration: Duration ?
16- }
16+ }
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package io.github.freya022.botcommands.internal.components.data
33import io.github.freya022.botcommands.internal.components.ComponentType
44import io.github.freya022.botcommands.internal.components.LifetimeType
55import io.github.freya022.botcommands.internal.components.data.timeout.ComponentTimeout
6- import kotlinx.datetime.Instant
76import kotlin.time.Duration
7+ import kotlin.time.Instant
88
99internal class ComponentGroupData internal constructor(
1010 override val internalId : Int ,
@@ -16,4 +16,4 @@ internal class ComponentGroupData internal constructor(
1616): ComponentData {
1717 override val componentType: ComponentType
1818 get() = ComponentType .GROUP
19- }
19+ }
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import io.github.freya022.botcommands.internal.components.ComponentType
77import io.github.freya022.botcommands.internal.components.LifetimeType
88import io.github.freya022.botcommands.internal.components.data.timeout.EphemeralTimeout
99import io.github.freya022.botcommands.internal.components.handler.EphemeralHandler
10- import kotlinx.datetime.Instant
1110import kotlin.time.Duration
11+ import kotlin.time.Instant
1212
1313internal class EphemeralComponentData (
1414 override val internalId : Int ,
@@ -25,4 +25,4 @@ internal class EphemeralComponentData(
2525) : ActionComponentData {
2626 override val lifetimeType: LifetimeType
2727 get() = LifetimeType .EPHEMERAL
28- }
28+ }
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import io.github.freya022.botcommands.internal.components.ComponentType
77import io.github.freya022.botcommands.internal.components.LifetimeType
88import io.github.freya022.botcommands.internal.components.data.timeout.PersistentTimeout
99import io.github.freya022.botcommands.internal.components.handler.PersistentHandler
10- import kotlinx.datetime.Instant
1110import kotlin.time.Duration
11+ import kotlin.time.Instant
1212
1313internal class PersistentComponentData (
1414 override val internalId : Int ,
@@ -25,4 +25,4 @@ internal class PersistentComponentData(
2525) : ActionComponentData {
2626 override val lifetimeType: LifetimeType
2727 get() = LifetimeType .PERSISTENT
28- }
28+ }
Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ import io.github.freya022.botcommands.internal.utils.throwArgument
2727import io.github.freya022.botcommands.internal.utils.throwInternal
2828import io.github.oshai.kotlinlogging.KotlinLogging
2929import kotlinx.coroutines.runBlocking
30- import kotlinx.datetime.Clock
31- import kotlinx.datetime.Instant
32- import kotlinx.datetime.toJavaInstant
3330import net.dv8tion.jda.api.Permission
3431import java.sql.DatabaseMetaData
3532import java.sql.Timestamp
33+ import kotlin.time.Clock
3634import kotlin.time.Duration
3735import kotlin.time.Duration.Companion.milliseconds
36+ import kotlin.time.Instant
37+ import kotlin.time.toJavaInstant
3838
3939private val logger = KotlinLogging .logger { }
4040
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import kotlinx.coroutines.CoroutineScope
2424import kotlinx.coroutines.ExecutorCoroutineDispatcher
2525import kotlinx.coroutines.cancel
2626import kotlinx.coroutines.runBlocking
27- import kotlinx.datetime.Clock
2827import net.dv8tion.jda.api.JDA
2928import net.dv8tion.jda.api.entities.Message
3029import net.dv8tion.jda.api.events.session.ShutdownEvent
@@ -39,6 +38,7 @@ import java.util.concurrent.locks.ReentrantLock
3938import kotlin.concurrent.withLock
4039import kotlin.reflect.full.memberProperties
4140import kotlin.reflect.jvm.jvmErasure
41+ import kotlin.time.Clock
4242import kotlin.time.Duration
4343import kotlin.time.Duration.Companion.minutes
4444import kotlin.time.toJavaDuration
You can’t perform that action at this time.
0 commit comments