forked from Supositware/Haha-Yes
Cant kick/ban urself
This commit is contained in:
parent
8bde63f24e
commit
6773a3e391
2 changed files with 8 additions and 4 deletions
|
@ -20,8 +20,10 @@ module.exports = class BanCommand extends Command {
|
|||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
const member = message.mentions.members.first();
|
||||
async run(message, { member }) {
|
||||
if(member.id === message.author.id) {
|
||||
message.say("Why would you ban yourself ?")
|
||||
} else
|
||||
member.ban().then(member => {
|
||||
message.reply(`${member.user.username} was succesfully banned.`);
|
||||
});
|
||||
|
|
|
@ -20,8 +20,10 @@ module.exports = class KickCommand extends Command {
|
|||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
const member = message.mentions.members.first();
|
||||
async run(message, { member }) {
|
||||
if(member.id === message.author.id) {
|
||||
message.say("Why would you kick yourself ?")
|
||||
} else
|
||||
member.kick().then(member => {
|
||||
message.reply(`${member.user.username} was succesfully kicked.`);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue