title: How to the list of people that has a certain role
body: <p>I searched for it, but didn't find anything that could really help. Basically, I would like that when I run <code>.highrank</code> in a discord channel, the bots gives me a list of the people that have this role.</p>
  <p>This is the current code I have:</p>
  <pre><code>@client.command()
          async def highrank(ctx):
              role =
             await ctx.send(role.members)
  </code></pre>
  <p>I do not know how to make sure that this will give me a list of the people with the high rank role in the server.</p>
  <p>Edit: I found this, but I only get the bot name and ID when I do the command, and only if the bot has the role.</p>
  <pre><code>@client.command(pass_context=True)
          async def members(ctx, *args):
              server = ctx.message.guild
              role_name = (' '.join(args))
              role_id = server.roles[0]
              for role in server.roles:
                  if role_name == role.name:
                      role_id = role
                      break
              else:
                  await ctx.send(&quot;Role doesn't exist&quot;)
                  return
              for member in server.members:
                  if role_id in member.roles:
                      await ctx.send(f&quot;{member.display_name} - {member.id}&quot;)
  </code></pre>