diff --git a/labscore/client.js b/labscore/client.js index 6002a8f..25af4f9 100644 --- a/labscore/client.js +++ b/labscore/client.js @@ -241,14 +241,25 @@ interactionClient.on('commandRunError', async ({context, error}) => { }); try{ - await cluster.run(); - await commandClient.addMultipleIn('../commands/message/'); - await commandClient.run() - - await interactionClient.addMultipleIn('../commands/interaction/context'); - await interactionClient.addMultipleIn('../commands/interaction/user'); - await interactionClient.addMultipleIn('../commands/interaction/slash'); - await interactionClient.run(); + // TODO: This should in theory already be done by detritus, figure out why it isn't + await cluster.run().then(); + + console.log(`[${process.env.HOSTNAME || "labscore"}]{${cluster.clusterId}} cluster ran`) + let shards = `{${cluster.clusterId}} (${cluster.shards.map((shard) => shard.shardId).join(', ') })`; + console.log(`[${process.env.HOSTNAME || "labscore"}]${shards} shards loaded`) + + { + await commandClient.addMultipleIn('../commands/message/'); + await commandClient.run() + console.log(`[${process.env.HOSTNAME || "labscore"}]${shards} command client ready`) + } + { + await interactionClient.addMultipleIn('../commands/interaction/context'); + await interactionClient.addMultipleIn('../commands/interaction/user'); + await interactionClient.addMultipleIn('../commands/interaction/slash'); + await interactionClient.run(); + console.log(`[${process.env.HOSTNAME || "labscore"}]${shards} interaction command client ready`) + } } catch(e){ console.log(e) console.log(e.errors)