Fix Unban

This commit is contained in:
Daniel Odendahl Jr
2017-03-30 21:16:34 +00:00
parent 352926a703
commit 17bf526d12
+2 -5
View File
@@ -47,16 +47,13 @@ module.exports = class UnbanCommand extends commando.Command {
console.log(`[Command] ${message.content}`);
if (!message.guild.channels.exists("name", "mod_logs")) return message.say(":x: Error! Could not find the mod_logs channel! Please create it!");
let memberID = args.memberID;
console.log(memberID);
let reason = args.reason;
let bans = await message.guild.fetchBans();
let unbanUserObj = await bans.get(memberID);
if (!bans.has(memberID)) return message.say(':x: Error! Could not find this user in the bans.');
try {
let unbanUser = await bans.get(memberID).unban();
let unbanUser = await message.guild.unban(unbanUserObj);
let okHandMsg = await message.say(":ok_hand:");
console.log(unbanUser.username);
console.log(unbanUser.discriminator);
console.log(unbanUser.id);
const embed = new Discord.RichEmbed()
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
.setColor(0x00AE86)