title: Getting Member of a discord server given server id
body: <p>I want to create a script that given a server id, it should return all the member of that discord server.
  and given a user authentification token, it should check if he is a member of that server.</p>
  <p>I have been looking how to do this but in vain!
  I have tried those 3 questions but they don't give me any information on what I want to do.</p>
  <p><a href="https://stackoverflow.com/questions/47733376/how-do-i-make-a-list-of-all-members-in-a-discord-server-using-discord-py">Question 1 </a></p>
  <p><a href="https://stackoverflow.com/questions/37689289/joining-a-server-with-the-discord-python-api">Question 2</a></p>
  <p><a href="https://stackoverflow.com/questions/47732711/find-all-users-userid-in-a-server">Question 3</a></p>
  <p>Here is what i have tried  according to the documentation and get started tutorial:</p>
  <pre><code>import discord
  import asyncio
  import os
  
  
  client = discord.Client()
  email  = os.getenv('Email')
  password = os.getenv('Password')
  server = discord.Server(id='416940353564704768')
  @client.event
  async def on_ready():
      print('Logged in as')
      print(client.user.name)
      print(client.user.id)
      print('------')
      print('get all channel a client belong to ')
      if server.members:
          for member in server.members:
              print('name{}'.format(member.user.name) )
      else:
          print('any')
  
  client.run(email, password)
  </code></pre>
  <p>But it always prints any.
  Any helps will be appreciated, it looks like I'm missing something on how discord works.</p>