From 1e16650ffe0912872a046671a99f4ca39d341d02 Mon Sep 17 00:00:00 2001 From: Cedric Hoelzl Date: Fri, 20 Sep 2019 14:27:03 +0200 Subject: [PATCH] fix --- config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 52f2fad..8334846 100644 --- a/config.js +++ b/config.js @@ -49,9 +49,10 @@ module.exports = function(url, cmds){ //bot.error(response.statusCode); return reject(500);//response.statusCode); } - console.log(body) - console.log(body["reply"]) - event.reply(body["reply"]).catch(err=>bot.error(err)); + var resp = JSON.parse(body) + if(resp.reply==undefined || resp.reply=='') + resp.reply = "BeepBoop"; + event.reply(resp.reply).catch(err=>bot.error(err)); return resolve(200); });