title: Can not seem to get mute commands to work with Discord py
body: <p>I can not find a mute command for my discord bot, and I do not know how to write one. The tutorials and pieces of code out there are not working. The most recent code produces no errors messages, but the command will not initiate. How?</p>
  <pre><code>@commands.has_permissions(manage_messages=True)
  async def mute(ctx, member: discord.member, *, reason=None):
    guild =ctx.guild
    mutedRole = discord.Utils.get(guild.roles, name=&quot;Muted&quot;)
    if not mutedRole == await guild.create_role(name=&quot;Muted&quot;):
      for channel in guild.channels:
        await channel.set_permissions(mutedRole, speak=False, sendmessages=False, read_message_history=False, read_messages=False)
    await member.add_roles(mutedRole, reason = reason)
    await ctx.send(f&quot;Muted {member.mention} for reason {reason}&quot;)
    await member.send(f&quot;You were muted in {guild.name} for {reason}&quot;)```
  </code></pre>