function whoHasFunc(argv, context){
   var m = context.msg;
   var sender = context.msg.author;
   var peopleWithRole = "";
   m.guild.members.forEach(p =>{
     role = m.guild.roles.find("name", argv.args.role);
     if(role != null && p.roles.has(role.id)){
      peopleWithRole += p.displayName + '\n';
     }
   });
   m.channel.send(peopleWithRole);
}
//supposed to check who has a certain permission
supposed to check who has a certain permission
supposed to check who has a certain permission
function whoHasFunc(argv, context){
   var m = context.msg;
   var sender = context.msg.author;
   var peopleWithRole = "";
   m.guild.members.forEach(p =>{
     role = m.guild.roles.find("name", argv.args.role);
     if(role != null && p.roles.has(role.id)){
      peopleWithRole += p.displayName + '\n';
     }
   });
   m.channel.send(peopleWithRole);
}
function whoHasFunc ( argv , context ) { var m = context . msg ; var sender = context . msg . author ; var peopleWithRole = "" ; m . guild . members . forEach ( p => { role = m . guild . roles . find ( "name" , argv . args . role ) ; if ( role != null && p . roles . has ( role . id ) ) { peopleWithRole += p . displayName + '\n' ; } } ) ; m . channel . send ( peopleWithRole ) ; }
supposed to check who has a certain permission
supposed to check who has a certain permission