![JAR search and dependency download from the Maven repository](/logo.png)
io.github.freya022.botcommands.internal.components.builder.PersistentActionableComponentImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotCommands Show documentation
Show all versions of BotCommands Show documentation
A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.
package io.github.freya022.botcommands.internal.components.builder
import io.github.freya022.botcommands.api.ReceiverConsumer
import io.github.freya022.botcommands.api.components.builder.IPersistentActionableComponent
import io.github.freya022.botcommands.api.components.builder.PersistentHandlerBuilder
import io.github.freya022.botcommands.api.core.BContext
import io.github.freya022.botcommands.internal.components.handler.PersistentHandler
internal class PersistentActionableComponentImpl> internal constructor(
context: BContext,
instanceRetriever: InstanceRetriever
) : AbstractActionableComponent(context, instanceRetriever),
IPersistentActionableComponent {
override var handler: PersistentHandler? = null
private set
override fun bindTo(handlerName: String, block: ReceiverConsumer): T = instance.also {
this.handler = PersistentHandlerBuilder(handlerName).apply(block).build()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy