Instead of this, can you try:
let ifHasRole = message.member.roles.find(role => role.name === 'Muted');
if(!ifHasRole){
return message.channel.send('He is not muted');
}
Instead of this, can you try:
let ifHasRole = message.member.roles.find(role => role.name === 'Muted');
if(!ifHasRole){
return message.channel.send('He is not muted');
}