Sharding

Sharding

Please keep in mind that sharding is a highly advanced topic! Sharding is only required on 2,500 servers or more.

This guide will only tackle the basics of sharding using Discord.js ShardingManager.

Reciple Sharding Setup

To use Reciple with sharding, you can use the the built-in reciple command to start the built-in sharding manager. Every command flags will be passed to the shard instance when supported.

npx reciple shard

You can configure the sharding manager by exporting a sharding object in your reciple.mjs config.

// reciple.mjs

/**
 * @satisfies {import('reciple').ShardingConfig}
 */
export const sharding = {
    mode: 'process',
};