Skip to main content

Sharding

The sharding { } builder allows you to configure Kord's sharding settings — which, by default, will automatically shard your bot across multiple Gateway objects in a single process.

ExtensibleBot(TOKEN) {
// ...

sharding { recommended ->
Shards(recommended)
}
}

This corresponds with Kord's sharding function. The default settings should be fine for most bots.

sharding { ... }Lambda Returns: Shards

Configure how your bot handles sharding.

Lambda Arguments
recommendedType: Int

The number of shards recommended by Discord.