mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: remove comments
This commit is contained in:
1 parent
f6cb4f2518
commit
e3bf619808
1 file changed
+1
-5
@@ -8,15 +8,13 @@ import { manager } from './core/discord/manager';
|
|||||||
async function setupShardManager() {
|
async function setupShardManager() {
|
||||||
console.log('Pre-manager setup starting...');
|
console.log('Pre-manager setup starting...');
|
||||||
|
|
||||||
// Set up a promise that resolves when all shards are ready
|
|
||||||
const readyShards = new Set();
|
const readyShards = new Set();
|
||||||
const totalShards = manager.totalShards;
|
const totalShards = manager.totalShards;
|
||||||
|
|
||||||
// Create a promise that resolves when all shards are ready
|
|
||||||
const allShardsReady = new Promise((resolve, reject) => {
|
const allShardsReady = new Promise((resolve, reject) => {
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
reject(new Error('Shard initialization timed out after 60 seconds'));
|
reject(new Error('Shard initialization timed out after 60 seconds'));
|
||||||
}, 60000); // 60 second timeout
|
}, 60000);
|
||||||
|
|
||||||
manager.on('shardCreate', (shard) => {
|
manager.on('shardCreate', (shard) => {
|
||||||
console.log(`🟡 Launching shard ${shard.id}`);
|
console.log(`🟡 Launching shard ${shard.id}`);
|
||||||
@@ -46,11 +44,9 @@ async function setupShardManager() {
|
|||||||
const shards = await manager.spawn();
|
const shards = await manager.spawn();
|
||||||
console.log('Shards spawned, waiting for ready state...');
|
console.log('Shards spawned, waiting for ready state...');
|
||||||
|
|
||||||
// Wait for all shards to be ready
|
|
||||||
await allShardsReady;
|
await allShardsReady;
|
||||||
console.log('All shards ready, setting up presence...');
|
console.log('All shards ready, setting up presence...');
|
||||||
|
|
||||||
// Fetch statistics
|
|
||||||
let servers = 0;
|
let servers = 0;
|
||||||
let channels = 0;
|
let channels = 0;
|
||||||
let users = 0;
|
let users = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user