Fix Images

This commit is contained in:
Daniel Odendahl Jr
2017-07-11 00:08:20 +00:00
parent 19b8da5eee
commit 87b2f18803
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ module.exports = class WikiaCommand extends Command {
constructor(client) {
super(client, {
name: 'wikia',
aliases: ['fandom'],
group: 'search',
memberName: 'wikia',
description: 'Searches a specified Wikia wiki for your query.',
@@ -45,7 +46,7 @@ module.exports = class WikiaCommand extends Command {
.setURL(search.body.items[0].url)
.setAuthor('Wikia', 'https://i.imgur.com/WzXWJka.png')
.setDescription(body.sections[0].content.map((i) => i.text).join('\n\n').substr(0, 2000))
.setThumbnail(body.sections[0].images[0]);
.setThumbnail(body.sections[0].images[0] ? body.sections[0].images[0].src : null);
return msg.embed(embed);
} catch (err) {
return msg.say('No Results or Invalid Wiki.');
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "27.1.0",
"version": "27.1.1",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {