mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Fix book with no authors
This commit is contained in:
@@ -50,7 +50,7 @@ module.exports = class BookCommand extends Command {
|
|||||||
.setAuthor('Google Books', 'https://i.imgur.com/N3oHABo.png', 'https://books.google.com/')
|
.setAuthor('Google Books', 'https://i.imgur.com/N3oHABo.png', 'https://books.google.com/')
|
||||||
.setDescription(data.description ? shorten(data.description) : 'No description available.')
|
.setDescription(data.description ? shorten(data.description) : 'No description available.')
|
||||||
.setThumbnail(data.imageLinks ? data.imageLinks.thumbnail : null)
|
.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('❯ Publish Date', data.publishedDate || '???', true)
|
||||||
.addField('❯ Page Count', data.pageCount ? formatNumber(data.pageCount) : '???', true);
|
.addField('❯ Page Count', data.pageCount ? formatNumber(data.pageCount) : '???', true);
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
|
|||||||
Reference in New Issue
Block a user