mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 03:33:17 +00:00
13 lines
491 B
JavaScript
13 lines
491 B
JavaScript
const config = require("./struct/config/config.js");
|
|
|
|
if (config.devMode) {
|
|
config.token = config.devToken;
|
|
config.shards = 1;
|
|
}
|
|
|
|
const { ShardingManager } = require('discord.js');
|
|
const manager = new ShardingManager('./bot.js', { token: config.token, respawn: true, totalShards: config.shards });
|
|
|
|
console.log('Launching shards...');
|
|
manager.spawn(config.shards, config.shardDelay, config.shardTimeout);
|
|
manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`)); |