Skip to content

Commit

Permalink
Merge pull request #1 from MarcusOtter/main
Browse files Browse the repository at this point in the history
🏗️ Destroy client on SIGINT (MarcusOtter#88)
  • Loading branch information
saltydk authored Feb 20, 2022
2 parents 253c2de + 5025bad commit 9011550
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
CLIENT.on("guildDelete", guild => { resetConfigToDefault(guild.id); });

CLIENT.login(getApiToken());

process.on("SIGINT", () => {
CLIENT.destroy();
console.log("Destroyed client");
process.exit(0);
});
})();

0 comments on commit 9011550

Please sign in to comment.