From f386855ed153284efe6d4eeeaa67d57b985f7f65 Mon Sep 17 00:00:00 2001 From: junior Date: Fri, 3 Apr 2020 13:24:26 -0400 Subject: [PATCH] Add a console message when stopping the server with ctrl-c --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 23e85d6..87820f8 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,10 @@ client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); +process.on('SIGINT', function() { + console.log("Closing down..."); +}); + let last = ""; client.on('message', msg => {