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