mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Catch some stuff
This commit is contained in:
@@ -50,11 +50,15 @@ module.exports = class SoftbanCommand extends Command {
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM.');
|
||||
}
|
||||
await member.ban({
|
||||
days: 7,
|
||||
reason: `${msg.author.tag}: ${reason} (Softban)`
|
||||
});
|
||||
await msg.guild.unban(member.user, 'Softban');
|
||||
try {
|
||||
await member.ban({
|
||||
days: 7,
|
||||
reason: `${msg.author.tag}: ${reason} (Softban)`
|
||||
});
|
||||
await msg.guild.unban(member.user, 'Softban');
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to softban ${member.user.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully softbanned ${member.user.tag}.`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user