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