title: Discord.py - Remove all users from 1 role
body: <p>I posted yesterday already due my problem, but we could not solve it.</p>
  <p>I have following code</p>
  <pre><code>from discord.ext import commands
  from discord.utils import get
  import discord
  
  client = commands.Bot(command_prefix='.', help_command=None)
  
  
  @client.command()
  async def swipe(ctx, role: discord.Role):
      for member in role.members:
          await member.remove_roles(role)
          await ctx.send(f&quot;Successfully removed all members from {role.mention}.&quot;)
  
  
  @client.command()
  async def add(ctx, role: discord.Role, user: discord.Member):
      if ctx.author.guild_permissions.administrator:
          await user.add_roles(role)
          await ctx.send(f&quot;**Successfully give {role.mention} to {user.mention}.**&quot;)
  
  
  @client.command()
  async def remove(ctx, role: discord.Role, user: discord.Member):
      if ctx.author.guild_permissions.administrator:
          await user.remove_roles(role)
          await ctx.send(f&quot;**Successfully removed {role.mention} from {user.mention}.**&quot;)
  
  
  
  client.run('censored')
  </code></pre>
  <p>My command &quot;add&quot; and &quot;remove&quot; works perfectly.
  My command &quot;swipe&quot; does not want to work.
  The bot has administration permissions, and the selected role is in the hierarchy below the bot.</p>
  <p>I also added <code>if ctx.author.guild_permissions.administrator:</code> to check if there's a problem, but it changed nothing.</p>
  <p>I won't get any error in my trace back, but the users are still in the role after I use this command &quot;swipe&quot;.</p>
  <p>To rule out error I also created a new Discord-Server with another user and tried it there. Same result.</p>
  <p>Whats wrong with my command?</p>
  <pre><code> @client.command()
      async def swipe(ctx, role: discord.Role):
          for member in role.members:
              await member.remove_roles(role)
              await ctx.send(f&quot;Successfully removed all members from {role.mention}.&quot;)
  </code></pre>