This commit is contained in:
Dragon Fire
2020-03-21 20:52:03 -04:00
parent faa9cdeb81
commit 6ea6349100
2 changed files with 7 additions and 5 deletions
+3 -2
View File
@@ -112,6 +112,7 @@ module.exports = class AnimeCommand extends Command {
if (!this.personalList) await this.fetchPersonalList();
const entry = this.personalList.find(ani => ani.mediaId === id);
const malScore = await this.fetchMALScore(anime.idMal);
const malURL = `https://myanimelist.net/anime/${anime.idMal}`;
const embed = new MessageEmbed()
.setColor(0x02A9FF)
.setAuthor('AniList', 'https://i.imgur.com/iUIRC7v.png', 'https://anilist.co/')
@@ -122,9 +123,9 @@ module.exports = class AnimeCommand extends Command {
.addField(' Status', statuses[anime.status], true)
.addField(' Episodes', anime.episodes || '???', true)
.addField(' Season', anime.season ? `${seasons[anime.season]} ${anime.startDate.year}` : '???', true)
.addField(' Average Score', anime.meanScore ? `${anime.meanScore}/100` : '???', true)
.addField(' Average Score', anime.meanScore ? `${anime.meanScore}%` : '???', true)
.addField(` ${ANILIST_USERNAME}'s Score`, entry && entry.score ? `${entry.score}/10` : '?/10', true)
.addField(` MAL Score`, malScore ? `${malScore}/10` : '???', true);
.addField(` MAL Score`, malScore ? `[${malScore}](${malURL})` : '???', true);
return msg.embed(embed);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+4 -3
View File
@@ -104,8 +104,9 @@ module.exports = class MangaCommand extends Command {
if (!id) return msg.say('Could not find any results.');
const manga = await this.fetchManga(id);
if (!this.personalList) await this.fetchPersonalList();
const entry = this.personalList.find(manga => manga.mediaId === id);
const entry = this.personalList.find(ma => ma.mediaId === id);
const malScore = await this.fetchMALScore(manga.idMal);
const malURL = `https://myanimelist.net/manga/${anime.idMal}`;
const embed = new MessageEmbed()
.setColor(0x02A9FF)
.setAuthor('AniList', 'https://i.imgur.com/iUIRC7v.png', 'https://anilist.co/')
@@ -116,9 +117,9 @@ module.exports = class MangaCommand extends Command {
.addField(' Status', statuses[manga.status], true)
.addField(' Chapters / Volumes', `${manga.chapters || '???'}/${manga.volumes || '???'}`, true)
.addField(' Year', manga.startDate.year || '???', true)
.addField(' Average Score', manga.meanScore ? `${manga.meanScore}/100` : '???', true)
.addField(' Average Score', manga.meanScore ? `${manga.meanScore}%` : '???', true)
.addField(` ${ANILIST_USERNAME}'s Score`, entry && entry.score ? `${entry.score}/10` : '?/10', true)
.addField(` MAL Score`, malScore ? `${malScore}/10` : '???', true);
.addField(` MAL Score`, malScore ? `[${malScore}](${malURL})` : '???', true);
return msg.embed(embed);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);