// import { ClusterManager } from 'status-sharding';
const { ClusterManager } = require('status-sharding');
const manager = new ClusterManager('./path-to-client.js', {
mode: 'worker', // or process
token: 'very-secret-token', // if you want auto-calculation do not provide stuff below
totalShards: 1, // leave empty for auto calculation
totalClusters: 1, // shards are distributed over clusters
shardsPerClusters: 1,
});
manager.on('clusterReady', (cluster) => {
console.log(`Cluster ${cluster.id} is ready.`);
});
manager.on('ready', () => console.log('All clusters are ready.'));
manager.spawn();
Make sure to replace 'path-to-client.js' with the actual path to your client file. Also, replace 'very-secret-token' with your actual Discord bot token.