diff --git a/index.js b/index.js index 4b279e1..f1954ce 100644 --- a/index.js +++ b/index.js @@ -35,16 +35,6 @@ const manager = new ClusterManager(client, token, { }) await manager.run(); - console.log(`[${process.env.HOSTNAME || "labscore"}] bot ready. took ${(Date.now() - time) / 1000}.`) - - // This is kind of a hack. - // Our current deployment system has a tendency to launch the bot twice, this "ensures" that - // incorrect instances close again. This should *probably* just be moved to dirigent instead. - if(process.env.PB_MANAGER_HOST){ - let liveDeploy = await superagent.get(`${process.env.PB_MANAGER_HOST}_pbs/v1/GetPbServiceId`) - if(process.env.HOSTNAME !== liveDeploy.body.d){ - console.log(`[${process.env.HOSTNAME}] invalid deployment session`) - process.exit(); - } - } + console.log(`[${process.env.HOSTNAME || "labscore"}] bot ready (${Date.now() - time}ms)`) + console.log(`[${process.env.HOSTNAME || "labscore"}] manager running shards ${manager.shardStart}-${manager.shardEnd} (${manager.shardCount})`); })(); \ No newline at end of file diff --git a/labscore/client.js b/labscore/client.js index 25af4f9..67537c7 100644 --- a/labscore/client.js +++ b/labscore/client.js @@ -241,24 +241,25 @@ interactionClient.on('commandRunError', async ({context, error}) => { }); try{ + let clusterTimings = Date.now(); // 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`) + console.log(`[${process.env.HOSTNAME || "labscore"}]{${cluster.clusterId}} cluster ran (${Date.now() - clusterTimings}ms)`) 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`) + console.log(`[${process.env.HOSTNAME || "labscore"}]${shards} command client ready (${Date.now() - clusterTimings}ms)`) } { 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`) + console.log(`[${process.env.HOSTNAME || "labscore"}]${shards} interaction command client ready (${Date.now() - clusterTimings}ms)`) } } catch(e){ console.log(e)