Space after conditionals

This commit is contained in:
Daniel Odendahl Jr
2017-05-08 13:46:36 +00:00
parent 7e20086b2a
commit 8ba552b21a
78 changed files with 313 additions and 379 deletions
+4 -4
View File
@@ -15,7 +15,7 @@ module.exports = class MemeCommand extends Command {
prompt: 'What meme type do you want to use?',
type: 'string',
validate: type => {
if(codes.includes(type.toLowerCase())) return true;
if (codes.includes(type.toLowerCase())) return true;
return 'Invalid meme type. Use `help meme` to view a list of meme types.';
},
parse: type => type.toLowerCase()
@@ -37,11 +37,11 @@ module.exports = class MemeCommand extends Command {
}
run(msg, args) {
if(msg.channel.type !== 'dm')
if(!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { type, top, bottom } = args;
return msg.channel.send({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] })
.catch(err => msg.say(`An Error Occurred: ${err}`));
.catch (err => msg.say(`An Error Occurred: ${err}`));
}
};