In [1]:
import discord
TOKEN= 'NDMwNjk1OTIyNDczODkzOTAx.Dgj-sA.VPMf09qgRnKr5blegUegKxmK0lo'
client_id = '430695922473893901'

In [3]:
client = discord.Client()
@client.event
async def on_ready():
    for member in client.get_all_members():
        print(member.display_name)
    await client.logout()

client.run(TOKEN)


---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-c39f69c5b8e1> in <module>()
      6     await client.logout()
      7 
----> 8 client.run(TOKEN)

/home/trax/trax/env/lib/python3.5/site-packages/discord/client.py in run(self, *args, **kwargs)
    517 
    518         try:
--> 519             self.loop.run_until_complete(self.start(*args, **kwargs))
    520         except KeyboardInterrupt:
    521             self.loop.run_until_complete(self.logout())

/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/base_events.py in run_until_complete(self, future)
    312         Return the Future's result, or raise its exception.
    313         """
--> 314         self._check_closed()
    315 
    316         new_task = not isinstance(future, futures.Future)

/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/base_events.py in _check_closed(self)
    282     def _check_closed(self):
    283         if self._closed:
--> 284             raise RuntimeError('Event loop is closed')
    285 
    286     def run_forever(self):

RuntimeError: Event loop is closed

In [ ]:
client.user.name

In [ ]: