improve startup logging

This commit is contained in:
bignutty 2024-12-27 00:03:10 +01:00
parent 8ceba51a30
commit 934f6ec09f

View file

@ -241,14 +241,25 @@ interactionClient.on('commandRunError', async ({context, error}) => {
});
try{
await cluster.run();
await commandClient.addMultipleIn('../commands/message/');
await commandClient.run()
// TODO: This should in theory already be done by detritus, figure out why it isn't
await cluster.run().then();
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"}]{${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)