aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorAlee <Alee14498@gmail.com>2019-10-22 19:58:52 +0000
committerAlee <Alee14498@gmail.com>2019-10-22 19:58:52 +0000
commitb09e7677a0ab138075dab56e1b61f551fcbc1b94 (patch)
treed19222862886f54261ed3618ce03f0abfa95be51 /bot.js
parent8abc8f59e0a3844259b64fa9621f806ce10a343a (diff)
downloadPokeBot-b09e7677a0ab138075dab56e1b61f551fcbc1b94.tar.gz
PokeBot-b09e7677a0ab138075dab56e1b61f551fcbc1b94.tar.bz2
PokeBot-b09e7677a0ab138075dab56e1b61f551fcbc1b94.zip
Skips DBL if it doesn't exist
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js9
1 files changed, 8 insertions, 1 deletions
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,