Sharding

Please keep in mind that sharding is a highly advanced topic! Sharding is only required on 2,500 servers; otherwise, Discord will not allow your bot to log in.

WARNING
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 reciple shard command to start the built-in sharding manager. Every command flags will be passed to the shard instance when supported.

reciple shard

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

// reciple.mjs

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