Skip to content

Commit

Permalink
🔄️ Make the system restart itself after an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maseshi committed Dec 11, 2022
1 parent a58befa commit 1528dd4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/handlers/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ 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

0 comments on commit 1528dd4

Please sign in to comment.