Package fix #13
1 changed files with 8 additions and 1 deletions
9
index.js
9
index.js
|
@ -1,7 +1,6 @@
|
||||||
const express = require("express"),
|
const express = require("express"),
|
||||||
fs = require("fs"),
|
fs = require("fs"),
|
||||||
chalk = require("chalk"),
|
chalk = require("chalk"),
|
||||||
config = require("./config/config.json"),
|
|
||||||
emoji = require("./misc/emoji_list.json");
|
emoji = require("./misc/emoji_list.json");
|
||||||
class reqMod {
|
class reqMod {
|
||||||
constructor(name, status) {
|
constructor(name, status) {
|
||||||
|
@ -12,6 +11,14 @@ class reqMod {
|
||||||
const requiredModules = [
|
const requiredModules = [
|
||||||
new reqMod("handle_console", false)
|
new reqMod("handle_console", false)
|
||||||
];
|
];
|
||||||
|
let config;
|
||||||
|
if (fs.existsSync("./config/config.json")) {
|
||||||
|
config = require("./config/config.json");
|
||||||
|
} else {
|
||||||
|
console.log("[Config] Config file doesn't exist! You probably haven't copied the example config in the config directory.");
|
||||||
|
console.log("[Config] Exiting...");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
global.actualDir = __dirname;
|
global.actualDir = __dirname;
|
||||||
global.internals = {
|
global.internals = {
|
||||||
version:"Open Source",
|
version:"Open Source",
|
||||||
|
|
Loading…
Reference in a new issue