Skip to content

Commit

Permalink
Fix shard count
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Dec 27, 2024
1 parent 8033c39 commit ae5ea4f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ try {
await commandManager.registerGlobalCommands();

await logger.info('Spawning shards');
const manager = new ShardingManager( import.meta.dirname + '/shard.js', {
token: config.data.authToken,
totalShards: 2,
});
const manager = new ShardingManager(
import.meta.dirname + '/shard.js',
{
token: config.data.authToken,
}
);

manager.on('shardCreate', async shard => {
shard.args = [shard.id, manager.totalShards];
await logger.notice(`Launched shard ${shard.id}`);


shard.on("ready", () => {
shard.on('ready', () => {
logger.info(`Shard ${shard.id} connected to Discord's Gateway.`);
});
});
Expand Down

0 comments on commit ae5ea4f

Please sign in to comment.