From 868109fe65c5de30543f8b2dd76f00c215fcf743 Mon Sep 17 00:00:00 2001 From: CBenni Date: Mon, 11 Dec 2017 16:51:06 +0100 Subject: [PATCH] FIxerinoed config --- index.js | 8 +++++++- package.json | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f58b2fc..cab816f 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +var _ = require('lodash'); var express = require("express"); var request = require("request"); var Discord = require('discord.js'); @@ -8,7 +9,12 @@ const Image = Canvas.Image; const twemoji = require("./twemoji"); var app = express() -var config = require("./config"); +var config = require("./config.default.json"); +try { + _.extend(config, require("./config")); +}catch(err) { + console.log("No config.json found!"); +} var cache = {}; diff --git a/package.json b/package.json index 5f178c7..766b2d3 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "canvas": "^1.6.5", "discord.js": "^11.1.0", "express": "^4.15.2", + "lodash": "^4.17.4", "request": "^2.81.0" } }