This commit is contained in:
Daniel Odendahl Jr
2018-10-30 23:05:33 +00:00
parent c57fad7317
commit c1a2239904
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ const resultGraphQL = stripIndents`
status status
episodes episodes
isAdult isAdult
averageScore meanScore
} }
} }
`; `;
@@ -58,11 +58,11 @@ module.exports = class AnimeCommand extends Command {
.setURL(`https://anilist.co/anime/${anime.id}`) .setURL(`https://anilist.co/anime/${anime.id}`)
.setThumbnail(anime.coverImage.large || null) .setThumbnail(anime.coverImage.large || null)
.setTitle(anime.title.userPreferred) .setTitle(anime.title.userPreferred)
.setDescription(shorten(anime.description)) .setDescription(shorten(anime.description.replace(/<br>/g, '\n')))
.addField(' Status', anime.status, true) .addField(' Status', anime.status, true)
.addField(' Episodes', anime.episodes, true) .addField(' Episodes', anime.episodes, true)
.addField(' Season', `${anime.season} ${anime.startDate.year}`, 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); return msg.embed(embed);
} catch (err) { } catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+4 -4
View File
@@ -23,7 +23,7 @@ const resultGraphQL = stripIndents`
volumes volumes
chapters chapters
isAdult isAdult
averageScore meanScore
} }
} }
`; `;
@@ -58,11 +58,11 @@ module.exports = class MangaCommand extends Command {
.setURL(`https://anilist.co/manga/${manga.id}`) .setURL(`https://anilist.co/manga/${manga.id}`)
.setThumbnail(manga.coverImage.large || null) .setThumbnail(manga.coverImage.large || null)
.setTitle(manga.title.userPreferred) .setTitle(manga.title.userPreferred)
.setDescription(shorten(manga.description)) .setDescription(shorten(manga.description.replace(/<br>/g, '\n')))
.addField(' Status', manga.status, true) .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(' Year', manga.startDate.year, true)
.addField(' Average Score', `${manga.averageScore}/100`, true); .addField(' Average Score', `${manga.meanScore}/100`, true);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);