commonMain.entity.Strategizable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kord-core Show documentation
Show all versions of kord-core Show documentation
Idiomatic Kotlin Wrapper for The Discord API
The newest version!
package dev.kord.core.entity
import dev.kord.core.supplier.EntitySupplier
import dev.kord.core.supplier.EntitySupplyStrategy
/**
* A class that will defer the requesting of [Entities][KordEntity] to a [supplier].
* Copies of this class with a different [supplier] can be made through [withStrategy].
*
* Unless stated otherwise, all members that fetch [Entities][KordEntity] will delegate to the [supplier].
*/
public interface Strategizable {
/**
* The supplier used to request entities.
*/
public val supplier: EntitySupplier
/**
* Returns a copy of this class with a new [supplier] provided by the [strategy].
*/
public fun withStrategy(strategy: EntitySupplyStrategy<*>): Strategizable
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy