This commit is contained in:
Daniel Odendahl Jr
2017-10-28 15:03:06 +00:00
parent b90428c779
commit c3875c8f80
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ module.exports = class MyAnimeListAnimeCommand extends Command {
.get(`https://${MAL_LOGIN}@myanimelist.net/api/anime/search.xml`)
.query({ q: query });
const body = xml2js(text, { compact: true }).anime;
const data = body.length ? body.entry[0] : body.entry;
const data = body.entry.length ? body.entry[0] : body.entry;
const embed = new MessageEmbed()
.setColor(0x2D54A2)
.setAuthor('My Anime List', 'https://i.imgur.com/5rivpMM.png')
+1 -1
View File
@@ -30,7 +30,7 @@ module.exports = class MyAnimeListMangaCommand extends Command {
.get(`https://${MAL_LOGIN}@myanimelist.net/api/manga/search.xml`)
.query({ q: query });
const body = xml2js(text, { compact: true }).manga;
const data = body.length ? body.entry[0] : body.entry;
const data = body.entry.length ? body.entry[0] : body.entry;
const embed = new MessageEmbed()
.setColor(0x2D54A2)
.setAuthor('My Anime List', 'https://i.imgur.com/5rivpMM.png')