Freaking please

This commit is contained in:
Daniel Odendahl Jr
2017-05-18 02:59:20 +00:00
parent b8c9a66163
commit 6c289cdb63
+1
View File
@@ -37,6 +37,7 @@ module.exports = class Rule34Command extends Command {
limit: 1
});
const { posts } = await xml(text);
console.log(posts);
if (posts.count === 0) throw new Error('No Results.');
return msg.say(`Result for ${query}:`, { files: [`https:${posts.post[0].$.file_url}`] })
.catch(err => msg.say(`${err.name}: ${err.message}`));