Can someone help me.... the cmd is not defined

if(cmd === ‘kick’){

if(!msg.member.hasPersmission('KICK_MEMBERS')) return msg.channel.send("You dont have permission to access this command.");

let toKick = msg.mentions.member.first();

let reason = args.slice(1).join(" ");

if(!args[0])return msg.channel.send(':x: Please mention someone to kick.');

if(!toKick)return msg.channel.send(`${args[0]} is not a member.`);

if(!reason)return msg.channel.send('Specify a reason');

if(!toKick.kickable){

 return msg.channel.send(':x: I cannot kick someone that moderator/admin');

}

We can’t help you from only this code because we don’t see where cmd is defined.

2 Likes

how to defined cmd ???

var cmd = //(whatever)

2 Likes