title: Discord Bot isn't working to detect if a member has the muted role already
body: <p><strong>So I am pretty new to this. I can't seem to find out why my bot doesn't detect when a player has the muted role or not.</strong></p>
  <p>I thought that if I put &quot;If (Mute)&quot; it will detect if a member has the role &quot;Muted&quot;. The only thing it does is say &quot;That member is muted already&quot;, even though the member doesn't have the role at all. I've even switched it around to check if the member has the &quot;Member&quot; role, and if it does, remove that role and add the mute role, of which it does, but then it still won't detect if the member has the muted role, and will only do &quot;@member has been muted!&quot;, not &quot;That member is muted already&quot;</p>
  <p><strong>Code:</strong></p>
  <pre><code>
  module.exports = {
      name: 'mute',
      description: &quot;Mute members&quot;,
      execute(message, args, Discord, client) {
  
          const Admin = message.member.roles.cache.find(role =&gt; role.id === 'AdminIDGoesHere');
          const Mod = message.member.roles.cache.find(role =&gt; role.id === 'ModIdGoesHere');
  
          if (Admin || Mod) {
  
              const target = message.mentions.users.first();
              let memberTarget = message.guild.members.cache.get(target.id);
              let Mute = message.guild.roles.cache.find(role =&gt; role.id === 'MutedIdGoesHere');
              let Member = message.guild.roles.cache.find(role =&gt; role.id === 'MemberIdGoesHere');
  
              if (target) {
  
                  if (Mute) {
  
                      message.reply(&quot;That member is muted already!&quot;)
  
                  } else {
  
                      memberTarget.roles.add(Mute);
                      memberTarget.roles.remove(Member);
                      message.reply(`&lt;@${memberTarget.user.id}&gt; has been muted!`).then(msg =&gt; {
                          msg.delete({ timeout: 5000 });
                      })
                  }
  
  
              } else {
                  message.reply(&quot;Couldn't find that member!&quot;).then(msg =&gt; {
                      msg.delete({ timeout: 5000 });
                  })
              }
  
  
          } else {
              message.reply(&quot;You don't have permission to do that!&quot;).then(msg =&gt; {
                  msg.delete({ timeout: 5000 })
              })
          }
  
      }
  }
  </code></pre>
  <p>And like I said, I'm pretty new to this so lol. I've looked up for hours on how to do this and I feel like its a simple fix that I just can't see, think of, or find. Any help will be appreciated. Thanks.</p>