Skip to content

Commit

Permalink
🔄️ Modify the restart policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maseshi committed Dec 12, 2022
1 parent f458842 commit 0057360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/handlers/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = (client) => {

process.on("SIGINT", () => {
console.log(orangeBackground + whiteColor + " Bot is about to shut down. " + clearStyle);
if (client.mode === "start") process.exit(1);
});

process.on('SIGUSR1', () => {
Expand Down Expand Up @@ -67,6 +66,7 @@ module.exports = (client) => {
console.info(boldStyle + "Discord.js:" + clearStyle + " v" + discord.version);
console.info(boldStyle + "Node.js: " + clearStyle + process.version);
console.groupEnd();
if (client.mode === "start") process.exit(1);
});

process.on("uncaughtExceptionMonitor", (err, origin) => {
Expand Down Expand Up @@ -99,10 +99,10 @@ module.exports = (client) => {
console.info(boldStyle + "Discord.js:" + clearStyle + " v" + discord.version);
console.info(boldStyle + "Node.js: " + clearStyle + process.version);
console.groupEnd();
if (client.mode === "start") process.exit(1);
});

process.on("exit", (code) => {
console.log(grayBackground + blackColor + " Bot is about to shut down with the code: " + code + " " + clearStyle);
if (client.mode === "start") process.exit(1);
});
};

0 comments on commit 0057360

Please sign in to comment.