This commit is contained in:
Daniel Odendahl Jr
2017-10-13 17:49:26 +00:00
parent a673fb43fa
commit b57e817988
34 changed files with 35 additions and 133 deletions
+1 -4
View File
@@ -45,10 +45,7 @@ module.exports = class MemeCommand extends Command {
const search = await snekfetch.get(`https://memegen.link/api/search/${type}`);
if (!search.body.length) return msg.say('Could not find any results.');
const { body } = await snekfetch.get(search.body[0].template.blank.replace(/\/_/, `/${top}/${bottom}`));
return msg.say({ files: [{
attachment: body,
name: 'meme.jpg'
}] });
return msg.say({ files: [{ attachment: body, name: 'meme.jpg' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}