Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.

Commit

Permalink
ES6 & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Jun 17, 2018
1 parent fb01b5b commit d69467d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sharder.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const { ShardingManager } = require('discord.js');
// don't change total shards unless your bot is at or around 2500 guilds
// don't change total shards unless your bot is at or around 2000 guilds (max guilds on one shard is 2500)
const manager = new ShardingManager(`bot.js`, {totalShards: 1});

manager.spawn();
manager.on('launch', shard => {console.log(`Successfully launched shard ${shard.id}`)});
manager.on('launch', (shard) => {
console.log(`Successfully launched shard ${shard.id}`)
});

// (computers count from zero) Shard #1 will have an ID of 0, #2 will have an ID of 1, etc..

0 comments on commit d69467d

Please sign in to comment.