Work In Progress
This documentation is in beta. It's missing lots of content, search is broken, and many links go nowhere. These problems will be fixed before release, but there's plenty of work left!
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.