Fix a bug in manga and anime

This commit is contained in:
Daniel Odendahl Jr
2018-12-06 17:21:35 +00:00
parent 77cb708671
commit ff15041d79
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ 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.replace(/(<br>)+/g, '\n')))
.setDescription(anime.description ? shorten(anime.description.replace(/(<br>)+/g, '\n')) : 'No description.')
.addField(' Status', anime.status, true)
.addField(' Episodes', anime.episodes, true)
.addField(' Season', `${anime.season} ${anime.startDate.year}`, true)
+1 -1
View File
@@ -58,7 +58,7 @@ 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.replace(/(<br>)+/g, '\n')))
.setDescription(manga.description ? shorten(manga.description.replace(/(<br>)+/g, '\n')) : 'No description.')
.addField(' Status', manga.status, true)
.addField(' Chapters / Volumes', `${manga.chapters || '???'}/${manga.volumes || '???'}`, true)
.addField(' Year', manga.startDate.year, true)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "98.3.0",
"version": "98.3.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {