Skip to content

Commit

Permalink
Added manual shard count to sharder
Browse files Browse the repository at this point in the history
  • Loading branch information
Gawdl3y committed Feb 1, 2017
1 parent b70f58b commit eb91a14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export const config = bot.config.yargs(yargs)
describe: 'Whether or not to enable anonymous, non-unique, non-identifiable analytics',
group: 'General:'
})
.option('shard-count', {
type: 'number',
describe: 'Number of shards to spawn (only for rpbot-sharder)',
group: 'General:'
})

// General yargs
.help()
Expand Down
1 change: 1 addition & 0 deletions src/sharder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import config from './config';

const manager = new ShardingManager(path.join(__dirname, 'rpbot.js'), {
token: config.token,
totalShards: config.shardCount || 'auto',
shardArgs: process.argv.slice(2)
});
manager.on('launch', shard => {
Expand Down

0 comments on commit eb91a14

Please sign in to comment.