java – I want to make my nuke command only for those role which have ManageMessages permission.How do i do this?


Main.js nuke commands

if (command === 'nuke'){
        client.commands.get('nuke').execute(message, args);

nuke.js file in commands folder

module.exports = {
name: 'nuke',
description: "the bot will reply nuke gif!",
execute(message, args){
    
        if(message.member.roles.cache.has('755968860817195029'))
    {
    message.channel.bulkDelete("100").then(message.channel.send("NEWS HEADLINES:- **A BOMB JUST DROPPED HERE WHICH DELETED ALL THE MESSAGES (R.I.P.)**"));
    (message.channel.send("https://tenor.com/view/kozhi-nuclear-bomb-gif-18586883"));
}

else {
message.channel.send(“It seems you dont have required permissions to do this commands!”)

}

}
}