From 52cb4df6170985f2ba9b5ac68252f8760d3fb961 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 25 May 2017 23:55:21 +0000 Subject: [PATCH] Fix parseString --- commands/search/anime.js | 2 +- commands/search/gelbooru.js | 2 +- commands/search/manga.js | 2 +- commands/search/rule34.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/search/anime.js b/commands/search/anime.js index ab74ee67..aff51895 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -33,7 +33,7 @@ module.exports = class AnimeCommand extends Command { .query({ q: query }); - const { anime } = await xml.parseString(text); + const { anime } = await xml.parseStringAsync(text); const synopsis = anime.entry[0].synopsis[0].substr(0, 2000) .replace(/(
)/g, '') .replace(/(')/g, '\'') diff --git a/commands/search/gelbooru.js b/commands/search/gelbooru.js index c0cc68a6..2685c97a 100644 --- a/commands/search/gelbooru.js +++ b/commands/search/gelbooru.js @@ -33,7 +33,7 @@ module.exports = class GelbooruCommand extends Command { tags: query, limit: 1 }); - const { posts } = await xml.parseString(text); + const { posts } = await xml.parseStringAsync(text); if (posts.$.count === '0') throw new Error('No Results.'); return msg.say(`Result for ${query}: https:${posts.post[0].$.file_url}`); } catch (err) { diff --git a/commands/search/manga.js b/commands/search/manga.js index c2310566..31d76467 100644 --- a/commands/search/manga.js +++ b/commands/search/manga.js @@ -33,7 +33,7 @@ module.exports = class MangaCommand extends Command { .query({ q: query }); - const { manga } = await xml.parseString(text); + const { manga } = await xml.parseStringAsync(text); const synopsis = manga.entry[0].synopsis[0].substr(0, 2000) .replace(/(
)/g, '') .replace(/(')/g, '\'') diff --git a/commands/search/rule34.js b/commands/search/rule34.js index c5aaf4c0..8e3aa6e7 100644 --- a/commands/search/rule34.js +++ b/commands/search/rule34.js @@ -33,7 +33,7 @@ module.exports = class Rule34Command extends Command { tags: query, limit: 1 }); - const { posts } = await xml.parseString(text); + const { posts } = await xml.parseStringAsync(text); if (posts.$.count === '0') throw new Error('No Results.'); return msg.say(`Result for ${query}: https:${posts.post[0].$.file_url}`); } catch (err) {