Added test mode

This commit is contained in:
Noah committed 2021-12-04 21:19:51 -06:00
1 parent 72c0a2efa3
commit ed1905d8f4
2 files changed
+10 -3

No files matched your search

+8 -2
View File
@@ -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"
);
}
}
}
+2 -1
View File
@@ -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",