title: Is there a way of kicking everyone with a certain role in discord.py?
body: <p>I'm trying to make a command that kicks all the members with a certain role. It's not going very well - this is my current code:</p>
  <pre><code>import discord 
  from discord.ext import commands
  from discord.ext.commands import has_permissions
  
  client = commands.Bot(command_prefix = &quot;k!&quot;)
  
  @client.command(pass_context=True)
  @has_permissions(administrator=True)
  async def kickall(ctx):
      role_id = 754061046704242799
      for role_id in roles: #roles undefined lol
          try:
              await member.kick()
          except:
              continue
  </code></pre>