From ff15041d7910f63f80fa088e3268ffe7659d54ed Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 6 Dec 2018 17:21:35 +0000 Subject: [PATCH] Fix a bug in manga and anime --- commands/search/anime.js | 2 +- commands/search/manga.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/search/anime.js b/commands/search/anime.js index 093508c2..f75ad76f 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -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(/(
)+/g, '\n'))) + .setDescription(anime.description ? shorten(anime.description.replace(/(
)+/g, '\n')) : 'No description.') .addField('❯ Status', anime.status, true) .addField('❯ Episodes', anime.episodes, true) .addField('❯ Season', `${anime.season} ${anime.startDate.year}`, true) diff --git a/commands/search/manga.js b/commands/search/manga.js index 60c6b185..6aeab87b 100644 --- a/commands/search/manga.js +++ b/commands/search/manga.js @@ -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(/(
)+/g, '\n'))) + .setDescription(manga.description ? shorten(manga.description.replace(/(
)+/g, '\n')) : 'No description.') .addField('❯ Status', manga.status, true) .addField('❯ Chapters / Volumes', `${manga.chapters || '???'}/${manga.volumes || '???'}`, true) .addField('❯ Year', manga.startDate.year, true) diff --git a/package.json b/package.json index ce47938f..96198082 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "98.3.0", + "version": "98.3.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {