Make Code Prettier

This commit is contained in:
Daniel Odendahl Jr
2017-05-04 02:40:56 +00:00
parent e5f93b63cb
commit cf87f126d6
71 changed files with 354 additions and 343 deletions
+4 -4
View File
@@ -15,15 +15,15 @@ module.exports = class CatCommand extends Command {
}
async run(msg) {
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.');
try {
const { body } = await request
.get('http://random.cat/meow');
return msg.channel.send({files: [body.file]})
return msg.channel.send({ files: [body.file] })
.catch(err => msg.say(`An Error Occurred: ${err}`));
} catch (err) {
} catch(err) {
return msg.say('An Unknown Error Occurred.');
}
}
+4 -4
View File
@@ -12,15 +12,15 @@ module.exports = class DogCommand extends Command {
}
async run(msg) {
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.');
try {
const { body } = await request
.get('https://random.dog/woof.json');
return msg.channel.send({files: [body.url]})
return msg.channel.send({ files: [body.url] })
.catch(err => msg.say(`An Error Occurred: ${err}`));
} catch (err) {
} catch(err) {
return msg.say('An Unknown Error Occurred.');
}
}
+3 -3
View File
@@ -15,11 +15,11 @@ module.exports = class XiaoCommand extends Command {
}
run(msg) {
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 xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
return msg.channel.send({files: [xiao]})
return msg.channel.send({ files: [xiao] })
.catch(err => msg.say(`An Error Occurred: ${err}`));
}
};