From b8ef2ee9ec47473bb95feab843b41696dd491f43 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 27 Nov 2018 17:21:42 -0500 Subject: [PATCH] bug fixes --- bot/modules/claimbot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/modules/claimbot.js b/bot/modules/claimbot.js index bbc97d5..955a728 100644 --- a/bot/modules/claimbot.js +++ b/bot/modules/claimbot.js @@ -50,7 +50,7 @@ function init(discordBot_) { }, 60 * 1000); //announceClaims(); } - ).catch(console.error); + ); } function announceClaimsV2() { @@ -137,8 +137,8 @@ function getClaimsForLastBlock() { request(options, function(error, response, body) { if (error) return reject(error); - if (response.statusCode !== 200 || !body) return reject(response); - if (!body.success || body.error) return reject(response); + if (response.statusCode !== 200 || body === null) return reject(response); + if (body.success === false || body.error !== null) return reject(body); let claimsInBlock = body.data; return resolve(claimsInBlock); });