title: discord.py how to use client.login instead of client.run
body: <p>I have searching the web for 2 hours on how to this i eventually just gave up.
  so basically im trying to make a discord bot (i know how to make one) but im trying to use client.login / client.connect instead of client.run i just want an example of a discord bot that can sign into any account with the token and do something. And i know your gonna ask "Where is the code?" well i don't have the code im just looking for an example not a fix.
  but if you must see</p>
  
  <pre><code>#!/usr/bin/env python3
  import requests
  import discord
  import asyncio
  token = open("token.txt", "r").read()  # I've opted to just save my token to a text file.
  #User = discord.User()
  client = discord.Client()
  #@client.event
  async def on_ready():
      print("on ready executed")
      for guild in client.guilds:
          for memberd in guild.members:
              str = memberd.id
              user = client.get_user(str)
              await user.send('test')
              print(memberd)
      client.login(token)
  #client.run(token)
  </code></pre>