From b09e7677a0ab138075dab56e1b61f551fcbc1b94 Mon Sep 17 00:00:00 2001 From: Alee Date: Tue, 22 Oct 2019 19:58:52 +0000 Subject: Skips DBL if it doesn't exist --- bot.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index 4c87850..b81da71 100644 --- a/bot.js +++ b/bot.js @@ -4,7 +4,14 @@ const config = require('./config.json'); const fs = require('fs'); const readline = require('readline'); const DBL = require('dblapi.js'); -bot.dbl = new DBL(config.dbltoken, bot); +if (typeof config.dbltoken == 'undefined') { + console.log("Skipping DBL..."); +} else { + bot.dbl = new DBL(config.dbltoken, bot); + console.log("DBL has been found..."); + +} + const rl = readline.createInterface({ input: process.stdin, -- cgit v1.2.3