logging part 2

This commit is contained in:
derpystuff 2023-07-16 23:28:13 +02:00
parent 416b89c6ce
commit 5b84b9a70a
2 changed files with 34 additions and 8 deletions

View file

@ -18,6 +18,8 @@ const manager = new ClusterManager(client, token, {
(async () => {
console.log(`v2 | starting v2.`)
// Logging
manager.on("clusterProcess", ({ clusterProcess }) => {
clusterProcess.on('close', ({code, signal}) => {
basecamp(`<:ico_w4:1086624964284788787>\`[${process.env.HOSTNAME}]\` **\` CLUSTER_CLOSED \`** Cluster ${clusterProcess.clusterId} closed with code \`${code}\` and signal \`${signal}\` @ \`${Date.now()}\``)
@ -27,6 +29,7 @@ const manager = new ClusterManager(client, token, {
await basecamp(`\`\`\`js\n${error}\`\`\``)
});
})
await manager.run();
console.log(`v2 | ready. took ${(Date.now() - time) / 1000}.`)
})();