diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 2aebfa20..16a1ac39 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -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)