I\'m creating a bot for Discord, and I just wrote this simple code:
import discord
TOKEN = \"token\"
client = discord.Client()
@client.event
async def on
The version of discord.py you are using does not support Python 3.7 (in which async
becomes a reserved keyword), as explained in this issue.
This version of discord.py, which is the default branch on the GitHub repo, is sadly the one installed by Pip.
You can either:
python3 -m pip install --user -U https://github.com/Rapptz/discord.py/archive/rewrite.zip
You can manually edit the file and change that line from create_task = asyncio.async
to create_task = getattr(asyncio, 'async')
See more info here: https://github.com/Rapptz/discord.py/issues/1249