Need some help with kick/ban permision

hey everyone im trying to make a kick/ban command but i dont know how to set up the permisions can someone help me this is my code

module.exports = {
name: ‘ban’,
description: “This command bans a member!”,
execute(message, args){
const target = message.mentions.users.first();
if(target){
const memberTarget = message.guild.members.cache.get(target.id);
memberTarget.ban();
message.channel.send(“User has been banned”);
}else{
message.channel.send(You coudn't ban that member!);
}
}
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.