title: Keep getting syntax error around async def on_ready(): whilst making discord bot
body: <p>I've been learning python for a little bit and decided to take what I've learnt and build a discord bot to test my abilities. I've coded everything and it looks fine to me (which doesn't mean much, I'm sure) but I get a code for syntax error every time I try to run it. So, I scaled it back to the bare minimum and it <em>still</em> won't work. I've looked through a lot of questions and I see that this usually happens when you're not using an updated version of Python, but I've triple checked that I am, indeed, running Python 3.6.4.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>import discord
  import discord.ext.commands 
  from discord.ext.commands import Bot
  import asyncio
  
  bot = commands.Bot(command_prefix='!')
  
  @bot.event
  async def on_ready():
      print ("Bot Online!")
      print (bot.user.name)
  
  
  bot.run("token was here")
  </code></pre>
  
  <p>and when I run it through Python Launcher, this is my error:</p>
  
  <pre><code>Kalyns-MacBook-Air:~ kalynwoodbury$ cd 
  '/Users/kalynwoodbury/Desktop/bot2/' &amp;&amp; '/usr/bin/pythonw'  
  '/Users/kalynwoodbury/Desktop/bot2/Bot1.py'  &amp;&amp; echo Exit status: $? &amp;&amp; exit 1
   File "/Users/kalynwoodbury/Desktop/bot2/Bot1.py", line 9
      async def on_ready():
      ^
  SyntaxError: invalid syntax
  Kalyns-MacBook-Air:bot2 kalynwoodbury$ 
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>EDIT: The application says Python 3.6. Yesterday I uninstalled it and downloaded it again, making sure to press 3.6.4 and the installer said Python 3.6.4. I have never been so sure of anything in my life. Making sure I had the right version was the absolute first thing I looked for.</p>
  
  <p>EDIT: If I try to use python3 bot.py it gives me the same error code, but for that line.</p>