KordBuilder

expect class KordBuilder(val token: String) : BaseKordBuilder(source)
actual class KordBuilder(val token: String) : BaseKordBuilder(source)
actual class KordBuilder(val token: String) : BaseKordBuilder(source)

Constructors

Link copied to clipboard
expect constructor(token: String)
actual constructor(token: String)
actual constructor(token: String)

Properties

Link copied to clipboard
Link copied to clipboard

The CoroutineDispatcher kord uses to launch suspending tasks. Dispatchers.Default by default.

The CoroutineDispatcher kord uses to launch suspending tasks. Dispatchers.Default by default.

The CoroutineDispatcher kord uses to launch suspending tasks. Dispatchers.Default by default.

Link copied to clipboard

The default strategy used by entities to retrieve entities. EntitySupplyStrategy.cacheWithRestFallback by default.

The default strategy used by entities to retrieve entities. EntitySupplyStrategy.cacheWithRestFallback by default.

The default strategy used by entities to retrieve entities. EntitySupplyStrategy.cacheWithRestFallback by default.

Link copied to clipboard

Enable adding a Runtime.addShutdownHook to log out of the Gateway when the process is killed.

Link copied to clipboard

The event flow used by Kord.eventFlow to publish events.

The event flow used by Kord.eventFlow to publish events.

The event flow used by Kord.eventFlow to publish events.

Link copied to clipboard

The client used for building Gateways and RequestHandlers. A default implementation will be used when not set.

The client used for building Gateways and RequestHandlers. A default implementation will be used when not set.

The client used for building Gateways and RequestHandlers. A default implementation will be used when not set.

Link copied to clipboard

Enables stack trace recovery on the currently defined RequestHandler.

Enables stack trace recovery on the currently defined RequestHandler.

Enables stack trace recovery on the currently defined RequestHandler.

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun build(): Kord
open suspend fun build(): Kord
open suspend override fun build(): Kord
Link copied to clipboard
fun cache(builder: KordCacheBuilder.(resources: ClientResources) -> Unit)

Configures the DataCache for caching.

fun cache(builder: KordCacheBuilder.(resources: ClientResources) -> Unit)

Configures the DataCache for caching.

fun cache(builder: KordCacheBuilder.(resources: ClientResources) -> Unit)

Configures the DataCache for caching.

Link copied to clipboard
fun gateways(gatewayBuilder: (resources: ClientResources, shards: List<Int>) -> List<Gateway>)

Configures the Gateway for each shard.

fun gateways(gatewayBuilder: (resources: ClientResources, shards: List<Int>) -> List<Gateway>)

Configures the Gateway for each shard.

fun gateways(gatewayBuilder: (resources: ClientResources, shards: List<Int>) -> List<Gateway>)

Configures the Gateway for each shard.

Link copied to clipboard
fun requestHandler(handlerBuilder: (resources: ClientResources) -> RequestHandler)

Configures the RequestHandler for the RestClient.

fun requestHandler(handlerBuilder: (resources: ClientResources) -> RequestHandler)

Configures the RequestHandler for the RestClient.

fun requestHandler(handlerBuilder: (resources: ClientResources) -> RequestHandler)

Configures the RequestHandler for the RestClient.

Link copied to clipboard
fun sharding(shards: (recommended: Int) -> Shards)

Configures the shards this client will connect to, by default 0 until recommended. This can be used to break up to client into multiple processes.

fun sharding(shards: (recommended: Int) -> Shards)

Configures the shards this client will connect to, by default 0 until recommended. This can be used to break up to client into multiple processes.

fun sharding(shards: (recommended: Int) -> Shards)

Configures the shards this client will connect to, by default 0 until recommended. This can be used to break up to client into multiple processes.