From 1cb782c44c75996c326aac8bbf9a4ffe6b05cc6f Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 15 Apr 2017 03:07:45 +0000 Subject: [PATCH] Pet Image Error Handling Improvement --- commands/search/neopet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 6d44ef97..c6f8d2a5 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -34,7 +34,7 @@ module.exports = class NeopetCommand extends Command { }); const $ = cheerio.load(response.text); const link = $('textarea').first().text(); - if (!link) return message.say(':x: Error! Pet not found!'); + if (!link.includes('cp')) return message.say(':x: Error! Pet not found!'); return message.say(link); } catch (err) {