Style changes

This commit is contained in:
Daniel Odendahl Jr
2017-10-09 12:52:59 +00:00
parent bf19c9e398
commit c25facec0e
18 changed files with 22 additions and 42 deletions
+1 -2
View File
@@ -44,8 +44,7 @@ module.exports = class MemeCommand extends Command {
async run(msg, { type, top, bottom }) {
try {
const memes = await snekfetch
.get('https://api.imgflip.com/get_memes');
const memes = await snekfetch.get('https://api.imgflip.com/get_memes');
const memeList = memes.body.data.memes;
if (type === 'list') return msg.say(list(memeList.map(meme => meme.name), 'or'), { split: { char: ' ' } });
if (!memeList.some(meme => meme.name.toLowerCase() === type)) {
+1 -2
View File
@@ -22,8 +22,7 @@ module.exports = class RobohashCommand extends Command {
async run(msg, { text }) {
try {
const { body } = await snekfetch
.get(`https://robohash.org/${text}`);
const { body } = await snekfetch.get(`https://robohash.org/${text}`);
return msg.say({ files: [{ attachment: body, name: 'robohash.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);