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();
const memberTarget = message.guild.members.cache.get(;
memberTarget.ban();“User has been banned”);
}else{ coudn't ban that member!);

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