From c1a22399040ea334f14911363d2baca65afddf87 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 30 Oct 2018 23:05:33 +0000 Subject: [PATCH] Fixes --- commands/search/anime.js | 6 +++--- commands/search/manga.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/commands/search/anime.js b/commands/search/anime.js index 0eeaf72d..872e9c2c 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -23,7 +23,7 @@ const resultGraphQL = stripIndents` status episodes isAdult - averageScore + meanScore } } `; @@ -58,11 +58,11 @@ module.exports = class AnimeCommand extends Command { .setURL(`https://anilist.co/anime/${anime.id}`) .setThumbnail(anime.coverImage.large || null) .setTitle(anime.title.userPreferred) - .setDescription(shorten(anime.description)) + .setDescription(shorten(anime.description.replace(/
/g, '\n'))) .addField('❯ Status', anime.status, true) .addField('❯ Episodes', anime.episodes, true) .addField('❯ Season', `${anime.season} ${anime.startDate.year}`, true) - .addField('❯ Average Score', `${anime.averageScore}/100`, true); + .addField('❯ Average Score', `${anime.meanScore}/100`, true); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/search/manga.js b/commands/search/manga.js index bae0d743..8b13f1dd 100644 --- a/commands/search/manga.js +++ b/commands/search/manga.js @@ -23,7 +23,7 @@ const resultGraphQL = stripIndents` volumes chapters isAdult - averageScore + meanScore } } `; @@ -58,11 +58,11 @@ module.exports = class MangaCommand extends Command { .setURL(`https://anilist.co/manga/${manga.id}`) .setThumbnail(manga.coverImage.large || null) .setTitle(manga.title.userPreferred) - .setDescription(shorten(manga.description)) + .setDescription(shorten(manga.description.replace(/
/g, '\n'))) .addField('❯ Status', manga.status, true) - .addField('❯ Chapters / Volumes', `${manga.chapters}/${manga.volumes}`, true) + .addField('❯ Chapters / Volumes', `${manga.chapters || '???'}/${manga.volumes || '???'}`, true) .addField('❯ Year', manga.startDate.year, true) - .addField('❯ Average Score', `${manga.averageScore}/100`, true); + .addField('❯ Average Score', `${manga.meanScore}/100`, true); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);