This commit is contained in:
Daniel Odendahl Jr
2017-09-23 20:17:08 +00:00
parent 62e222c231
commit d1313f1c7d
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class SafebooruCommand extends Command {
const posts = msg.channel.nsfw ? parsed.post : parsed.post.filter(post => post.rating === 's');
return msg.say(stripIndents`
${query ? `Results for ${query}:` : 'Random Image:'}
https:${posts[Math.floor(Math.random() * posts.length)].file_url}
https:${posts[Math.floor(Math.random() * posts.length)]._attributes.file_url}
`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);