From ed1905d8f431f3446bfac56832f5fd0eae68d967 Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 4 Dec 2021 21:19:51 -0600 Subject: [PATCH] Added test mode --- Structures/Client.js | 10 ++++++++-- package.json | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Structures/Client.js b/Structures/Client.js index f04bc30..4b70462 100644 --- a/Structures/Client.js +++ b/Structures/Client.js @@ -116,8 +116,14 @@ class Client extends Discord.Client { console.log(`\u001b[34;1m`, "▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬"); console.log(" "); - - this.login(token); + if (process.title != "npm test") { + this.login(token); + } else { + console.log( + `\u001b[31;1m`, + "RUNNING IN TEST MODE, IF NOT INTENDED, PLEASE USE npm start" + ); + } } } diff --git a/package.json b/package.json index 277c4e8..28f13e3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customization to match your own brand.", "main": "index.js", "scripts": { - "start": "npm i && node index.js" + "start": "npm i && node index.js", + "test": "node index.js" }, "repository": { "type": "git",