From 57f0768756a22d03929882b0c7db2290f99f8d6f Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 14 May 2017 17:24:37 +0000 Subject: [PATCH] Fix Bugs --- commands/search/anime.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/search/anime.js b/commands/search/anime.js index 46a33647..86bc20a2 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -29,7 +29,8 @@ module.exports = class AnimeCommand extends Command { const { query } = args; try { const { text } = await request - .get(`https://${ANIMELIST_LOGIN}@myanimelist.net/api/anime/search.xml?q=${query}`); + .get(`https://${ANIMELIST_LOGIN}@myanimelist.net/api/anime/search.xml?q=${query}`) + .buffer(true); const $ = cheerio.load(text, { xmlMode: true }); const embed = new RichEmbed() .setColor(0x2D54A2) @@ -48,7 +49,7 @@ module.exports = class AnimeCommand extends Command { $('end_date').first().text(), true); return msg.embed(embed); } catch (err) { - return msg.say('Error: No Results.'); + return msg.say(err); } } };