Change Variable Names, Remove Useless Commands

This commit is contained in:
Daniel Odendahl Jr
2017-04-29 19:53:01 +00:00
parent 3c773a8952
commit 988912f471
52 changed files with 236 additions and 312 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ module.exports = class BanCommand extends Command {
await member.ban(7);
await message.say(':ok_hand:');
const embed = new RichEmbed()
.setAuthor(message.author.tag, message.author.avatarURL)
.setAuthor(message.author.tag, message.author.displayAvatarURL)
.setColor(0xFF0000)
.setTimestamp()
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`);
+1 -1
View File
@@ -51,7 +51,7 @@ module.exports = class KickCommand extends Command {
await member.kick();
await message.say(':ok_hand:');
const embed = new RichEmbed()
.setAuthor(message.author.tag, message.author.avatarURL)
.setAuthor(message.author.tag, message.author.displayAvatarURL)
.setColor(0xFFA500)
.setTimestamp()
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`);
+1 -1
View File
@@ -17,7 +17,7 @@ module.exports = class LockdownCommand extends Command {
return true;
return 'Please enter either `start` or `stop`.';
},
parse: text => text.toLowerCase()
parse: type => type.toLowerCase()
}]
});
}
+2 -3
View File
@@ -34,11 +34,10 @@ module.exports = class PruneCommand extends Command {
return message.say('This Command requires the `Read Message History` Permission.');
if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return message.say('This Command requires the `Manage Messages` Permission.');
let { count } = args;
count = count + 1;
const { count } = args;
try {
const messages = await message.channel.fetchMessages({
limit: count
limit: count + 1
});
await message.channel.bulkDelete(messages, true);
return null;
+10 -10
View File
@@ -13,13 +13,13 @@ module.exports = class UnbanCommand extends Command {
description: 'Unbans a user and logs the unban to the mod_logs.',
guildOnly: true,
args: [{
key: 'memberID',
key: 'id',
prompt: 'What member do you want to unban? Please enter the ID of the user.',
type: 'string',
validate: userID => {
if (userID.length === 18)
validate: id => {
if (id.length === 18)
return true;
return `${userID} is not a valid ID. Please enter the user you wish to unban's ID.`;
return `${id} is not a valid ID. Please enter the user you wish to unban's ID.`;
}
}, {
key: 'reason',
@@ -46,19 +46,19 @@ module.exports = class UnbanCommand extends Command {
return message.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.');
if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS'))
return message.say('This Command requires the `Embed Links` Permission.');
const { memberID, reason } = args;
const { id, reason } = args;
const bans = await message.guild.fetchBans();
if (!bans.has(memberID))
if (!bans.has(id))
return message.say('This ID is not in the Guild Banlist.');
const unbanUser = await bans.get(memberID);
const member = await bans.get(id);
try {
await message.guild.unban(unbanUser);
await message.guild.unban(member);
await message.say(':ok_hand:');
const embed = new RichEmbed()
.setAuthor(message.author.tag, message.author.avatarURL)
.setAuthor(message.author.tag, message.author.displayAvatarURL)
.setColor(0x00AE86)
.setTimestamp()
.setDescription(`**Member:** ${unbanUser.tag} (${unbanUser.id})\n**Action:** Unban\n**Reason:** ${reason}`);
.setDescription(`**Member:** ${member.tag} (${member.id})\n**Action:** Unban\n**Reason:** ${reason}`);
return modlogs.send({embed});
} catch (err) {
return message.say('An Unknown Error Occurred.');
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class WarnCommand extends Command {
try {
await message.say(':ok_hand:');
const embed = new RichEmbed()
.setAuthor(message.author.tag, message.author.avatarURL)
.setAuthor(message.author.tag, message.author.displayAvatarURL)
.setColor(0xFFFF00)
.setTimestamp()
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`);