From f8759dee86b05634ee97979e8f342d64b5d7ba98 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 21 Mar 2021 22:49:07 -0400 Subject: [PATCH] Fix book with no authors --- commands/search/book.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/search/book.js b/commands/search/book.js index 963e8d9d..14ce93b1 100644 --- a/commands/search/book.js +++ b/commands/search/book.js @@ -50,7 +50,7 @@ module.exports = class BookCommand extends Command { .setAuthor('Google Books', 'https://i.imgur.com/N3oHABo.png', 'https://books.google.com/') .setDescription(data.description ? shorten(data.description) : 'No description available.') .setThumbnail(data.imageLinks ? data.imageLinks.thumbnail : null) - .addField('❯ Authors', data.authors.length ? data.authors.join(', ') : '???') + .addField('❯ Authors', data.authors && data.authors.length ? data.authors.join(', ') : '???') .addField('❯ Publish Date', data.publishedDate || '???', true) .addField('❯ Page Count', data.pageCount ? formatNumber(data.pageCount) : '???', true); return msg.embed(embed);