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
+8 -8
View File
@@ -19,7 +19,7 @@ module.exports = class UnbanCommand extends Command {
prompt: 'What member do you want to unban? Please enter the ID of the user.',
type: 'string',
validate: id => {
if (id.length === 18)
if(id.length === 18)
return true;
return `${id} is not a valid ID. Please enter the user you wish to unban's ID.`;
}
@@ -29,7 +29,7 @@ module.exports = class UnbanCommand extends Command {
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 140)
if(reason.length < 140)
return true;
return `Please keep your reason under 140 characters, you have ${reason.length}.`;
}
@@ -43,16 +43,16 @@ module.exports = class UnbanCommand extends Command {
}
async run(msg, args) {
if (!msg.channel.permissionsFor(this.client.user).has('BAN_MEMBERS'))
if(!msg.channel.permissionsFor(this.client.user).has('BAN_MEMBERS'))
return msg.say('This Command requires the `Ban Members` Permission.');
const modlogs = msg.guild.channels.get(msg.guild.settings.get('modLog', 'mod_logs'));
if (!modlogs)
if(!modlogs)
return msg.say('This Command requires a channel set with the `modchannel` command.');
if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS'))
if(!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS'))
return msg.say('This Command requires the `Embed Links` Permission.');
const { id, reason } = args;
const bans = await msg.guild.fetchBans();
if (!bans.has(id))
if(!bans.has(id))
return msg.say('This ID is not in the Guild Banlist.');
const member = bans.get(id);
try {
@@ -67,8 +67,8 @@ module.exports = class UnbanCommand extends Command {
**Action:** Unban
**Reason:** ${reason}
`);
return modlogs.send({embed});
} catch (err) {
return modlogs.send({ embed });
} catch(err) {
return msg.say('An Unknown Error Occurred.');
}
}