Skip to content

Commit

Permalink
Expose ModalManager.await()
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkirby153 committed Jun 24, 2024
1 parent 5d63c4c commit d3ae526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/mrkirby153/botcore/modal/ModalManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import kotlinx.coroutines.suspendCancellableCoroutine
import net.dv8tion.jda.api.JDA
import net.dv8tion.jda.api.events.interaction.ModalInteractionEvent
import net.dv8tion.jda.api.hooks.ListenerAdapter
import net.dv8tion.jda.api.interactions.callbacks.IModalCallback
import net.dv8tion.jda.api.interactions.modals.Modal
import net.dv8tion.jda.api.sharding.ShardManager
import okhttp3.internal.toImmutableMap
Expand Down Expand Up @@ -141,8 +142,7 @@ suspend fun ModalManager.await(
return await(modal, timeout, timeUnit)
}

@PublishedApi
internal suspend fun ModalManager.await(
suspend fun ModalManager.await(
modal: Modal,
timeout: Long = 5,
timeUnit: TimeUnit = TimeUnit.MINUTES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import java.util.concurrent.TimeUnit
open class ModalManagerConfiguration(
private val shardManager: ShardManager,
@Value("\${bot.modal.gcPeriod:1}") private val time: Long,
@Value("\${bot.modal.gcUnit:SECOND}") private val unit: TimeUnit,
@Value("\${bot.modal.gcUnit:SECONDS}") private val unit: TimeUnit,
) {

private val log by SLF4J
Expand Down

0 comments on commit d3ae526

Please sign in to comment.