mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Catch some stuff
This commit is contained in:
@@ -38,7 +38,11 @@ module.exports = class UnbanCommand extends Command {
|
||||
await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`);
|
||||
const verification = await verify(msg.channel, msg.author);
|
||||
if (!verification) return msg.say('Aborting.');
|
||||
await msg.guild.unban(member, `${msg.author.tag}: ${reason}`);
|
||||
try {
|
||||
await msg.guild.unban(member, `${msg.author.tag}: ${reason}`);
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to unban ${member.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully unbanned ${member.tag}.`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user