title: discord bot: client.start(Token) not working
body: <p>trying to run a discord bot</p>
  <p>this is the code</p>
  <pre><code>import discord
  from discord.ext import commands
  
  TOKEN: str = &quot;Token&quot;
  
  client = commands.Bot(command_prefix = '.')
  
  @client.event
  async def on_ready():
      print('Connected')
  
  client.start(TOKEN)
  </code></pre>
  <p>I get this error:</p>
  <pre><code>C:\Users\josep\AppData\Local\Programs\Python\Python38\python.exe C:/Users/josep/Desktop/unsettler/unsettler.py
  C:/Users/josep/Desktop/unsettler/unsettler.py:12: RuntimeWarning: coroutine 'Client.start' was never awaited
    client.start(TOKEN)
  RuntimeWarning: Enable tracemalloc to get the object allocation traceback
  </code></pre>
  <p>I tried using client.run instead of client.start, but it triggers more errors. How do I fix this?</p>
  <p>edit: the errors I got from client run:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\http.py&quot;, line 291, in static_login
      data = await self.request(Route('GET', '/users/@me'))
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\http.py&quot;, line 245, in request
      raise HTTPException(r, data)
  discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
  </code></pre>
  <p>The above exception was the direct cause of the following exception:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:/Users/josep/Desktop/unsettler/unsettler.py&quot;, line 12, in &lt;module&gt;
      client.run(TOKEN)
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py&quot;, line 708, in run
      return future.result()
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py&quot;, line 687, in runner
      await self.start(*args, **kwargs)
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py&quot;, line 650, in start
      await self.login(*args, bot=bot)
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py&quot;, line 499, in login
      await self.http.static_login(token.strip(), bot=bot)
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\http.py&quot;, line 295, in static_login
      raise LoginFailure('Improper token has been passed.') from exc
  discord.errors.LoginFailure: Improper token has been passed.
  Exception ignored in: &lt;function _ProactorBasePipeTransport.__del__ at 0x00000216FCD9FDC0&gt;
  Traceback (most recent call last):
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py&quot;, line 116, in __del__
      self.close()
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py&quot;, line 108, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py&quot;, line 711, in call_soon
      self._check_closed()
    File &quot;C:\Users\josep\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py&quot;, line 504, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed
  </code></pre>