mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 00:06:42 +02:00
Fix Unban
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user