Revert some stuff

This commit is contained in:
Daniel Odendahl Jr
2017-10-22 23:25:43 +00:00
parent 53a99ab85f
commit f75372d2c2
18 changed files with 229 additions and 91 deletions
+1 -5
View File
@@ -1,6 +1,5 @@
const { Command } = require('discord.js-commando');
const snekfetch = require('snekfetch');
const { stripIndents } = require('common-tags');
module.exports = class DanbooruCommand extends Command {
constructor(client) {
@@ -34,10 +33,7 @@ module.exports = class DanbooruCommand extends Command {
limit: 1
});
if (!body.length || !body[0].file_url) return msg.say('Could not find any results.');
return msg.say(stripIndents`
Result for ${query}:
https://danbooru.donmai.us${body[0].file_url}
`);
return msg.say(`https://danbooru.donmai.us${body[0].file_url}`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}